6 Commits

Author SHA1 Message Date
Peter Wang
34bfc9e847 Make getopt produce messages with `this' quoting style.
getopt/getopt.c:
    Make getopt produce messages with `this' quoting style,
    matching the rest of the Mercury system.
2019-06-10 13:29:33 +10:00
Peter Wang
5f9eea8b5f Avoid compiler warning about unused value.
getopt/getopt.c:
    As above.
2019-06-10 13:29:33 +10:00
Peter Wang
3174789d5f Modify musl getopt implementation for portability.
getopt/getopt.c:
getopt/getopt_long.c:
    Don't use wide character routines.

    Reduce the included system headers.
2019-06-10 13:29:33 +10:00
Peter Wang
5a259546af Modify getopt implementation to compile outside of musl.
getopt/getopt.c:
    Delete uses of weak_alias macro.

    Rename __optreset to optreset.

    Delete error message localisation.

    Forgo locking when printing error messages.

getopt/getopt.h:
    Declare __getopt_msg prototype.

getopt/getopt_long.c:
    Rename __optreset to optreset.
2019-06-10 13:29:33 +10:00
Peter Wang
ef3505fdc9 Add copyright notice to musl getopt files.
getopt/getopt.c:
getopt/getopt.h:
getopt/getopt_long.c:
    As above.
2019-06-10 13:29:33 +10:00
Peter Wang
618ad889b6 Import getopt implementation from musl v1.1.22
getopt/getopt.c:
getopt/getopt.h:
getopt/getopt_long.c:
    New files.
2019-06-10 13:29:33 +10:00