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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-30 04:14:30 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-30 04:14:30 +0300
commitba6e108396b448981f781b7ca4a70856f6d90625 (patch)
treeb58e604abb8a719887ce5c9c379c2b52a8a4c7a2 /winsup
parent4700b8293a51a466b9558244c376ff1e614de80e (diff)
* lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT behavior.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/lib/getopt.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 13286903f..2b5b4e5cc 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,4 +1,9 @@
-2003-01-28 Corinna Vinschen <corinna@vinschen.de>
+2003-01-29 Christopher Faylor <cgf@redhat.com>
+
+ * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
+ behavior.
+
+2003-01-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::accept): On successful execution
set connection state of returned socket to CONNECTED.
@@ -80,7 +85,7 @@
* syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
update the euid and call cygheap->user.set_name. Remove special
handling of ILLEGAL_UID.
- (setgid32): Add a debug_printf. On Win95, always set the egid.
+ (setgid32): Add a debug_printf. On Win95, always set the egid.
Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
* child_info.h (class cygheap_exec_info): Remove uid.
* spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
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 == '-' */