diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2004-02-05 03:17:46 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2004-02-05 03:17:46 +0000 |
commit | b5ce07f7149f0432acdcf329415870b8e63290b9 (patch) | |
tree | 8fccc650ac471bc7324001954fa0a4d911238d53 /winsup/mingw | |
parent | d11508dd22f03396c70f75d6c16006f4e711d323 (diff) | |
download | cygnal-b5ce07f7149f0432acdcf329415870b8e63290b9.tar.gz cygnal-b5ce07f7149f0432acdcf329415870b8e63290b9.tar.bz2 cygnal-b5ce07f7149f0432acdcf329415870b8e63290b9.zip |
* mingwex/getopt.c: Define IS_POSIXLY_CORRECT as per
NetBSD getopt_long.c.
Diffstat (limited to 'winsup/mingw')
-rw-r--r-- | winsup/mingw/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/mingw/mingwex/getopt.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index f51d6f692..b71b46ded 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,5 +1,10 @@ 2004-02-05 Danny Smith <dannysmith@users.sourceforge.net> + * mingwex/getopt.c: Define IS_POSIXLY_CORRECT as per + NetBSD getopt_long.c. + +2004-02-05 Danny Smith <dannysmith@users.sourceforge.net> + * mingwex/strtold.c (__asctoe64) Reorganise. Fix setting error codes and handling of special chars. diff --git a/winsup/mingw/mingwex/getopt.c b/winsup/mingw/mingwex/getopt.c index b5d5a23b9..6b19df7dd 100644 --- a/winsup/mingw/mingwex/getopt.c +++ b/winsup/mingw/mingwex/getopt.c @@ -73,7 +73,11 @@ extern char __declspec(dllimport) *__progname; #define PRINT_ERROR ((opterr) && ((*options != ':') \ || (IGNORE_FIRST && options[1] != ':'))) -#define IS_POSIXLY_CORRECT (getenv("POSIXLY_INCORRECT_GETOPT") == NULL) +/* This differs from the cygwin implementation, which effectively defaults to + PC, but is consistent with the NetBSD implementation and doc's. */ +#ifndef IS_POSIXLY_CORRECT +#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#endif #define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) /* XXX: GNU ignores PC if *options == '-' */ |