diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-30 04:14:30 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-30 04:14:30 +0300 |
commit | ba6e108396b448981f781b7ca4a70856f6d90625 (patch) | |
tree | b58e604abb8a719887ce5c9c379c2b52a8a4c7a2 /winsup/cygwin/lib | |
parent | 4700b8293a51a466b9558244c376ff1e614de80e (diff) |
* lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT behavior.
Diffstat (limited to 'winsup/cygwin/lib')
-rw-r--r-- | winsup/cygwin/lib/getopt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c index effa5d774..1a4439a1e 100644 --- a/winsup/cygwin/lib/getopt.c +++ b/winsup/cygwin/lib/getopt.c @@ -77,11 +77,8 @@ extern char __declspec(dllimport) *__progname; #define IGNORE_FIRST (*options == '-' || *options == '+') #define PRINT_ERROR ((opterr) && ((*options != ':') \ || (IGNORE_FIRST && options[1] != ':'))) -#if defined(__CYGWIN__) || defined(__MINGW32__) -# define IS_POSIXLY_CORRECT (1) -#else -# define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) -#endif + +#define IS_POSIXLY_CORRECT (getenv("POSIXLY_INCORRECT_GETOPT") == NULL) #define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) /* XXX: GNU ignores PC if *options == '-' */ |