Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-25 02:49:12 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-25 02:49:12 +0400
commit3263838430ad3ccf5db934b37c645a83238ea89a (patch)
tree518c07c89416143325400e7e42da5adda9071f9b /winsup/cygwin/lib/getopt.c
parent35f879a6d0b6c24045570cf882d1474e1ab0de00 (diff)
* 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.c7
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 == '-')