diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-24 22:49:12 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-24 22:49:12 +0000 |
commit | 3263838430ad3ccf5db934b37c645a83238ea89a (patch) | |
tree | 518c07c89416143325400e7e42da5adda9071f9b /winsup/cygwin/lib/getopt.c | |
parent | 35f879a6d0b6c24045570cf882d1474e1ab0de00 (diff) | |
download | cygnal-3263838430ad3ccf5db934b37c645a83238ea89a.tar.gz cygnal-3263838430ad3ccf5db934b37c645a83238ea89a.tar.bz2 cygnal-3263838430ad3ccf5db934b37c645a83238ea89a.zip |
* select.cc (peek_pipe): Only grab mutex when we actually got something from
the pipe.
Diffstat (limited to 'winsup/cygwin/lib/getopt.c')
-rw-r--r-- | winsup/cygwin/lib/getopt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c index e5e4f31a0..12763ea9b 100644 --- a/winsup/cygwin/lib/getopt.c +++ b/winsup/cygwin/lib/getopt.c @@ -77,7 +77,12 @@ extern char __declspec(dllimport) *__progname; #define IGNORE_FIRST (*options == '-' || *options == '+') #define PRINT_ERROR ((opterr) && ((*options != ':') \ || (IGNORE_FIRST && options[1] != ':'))) -#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#if defined(__CYGWIN__) || defined(__MINGW32__) +# define IS_POSIXLY_CORRECT (1) +#else +# define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) +#endif + #define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) /* XXX: GNU ignores PC if *options == '-' */ #define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') |