aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-09-13 15:32:04 +0000
committerChristopher Faylor <me@cgf.cx>2006-09-13 15:32:04 +0000
commitaa45b3b73d945ca6f6f8101614131f5c39e5d8ac (patch)
tree39476e8f32da785eeff0a190144d46a123ceaab3 /winsup/utils
parent8f9f25dad8e03228f8fb714b4f1500136b5a9c3e (diff)
downloadnewlib-aa45b3b73d945ca6f6f8101614131f5c39e5d8ac.zip
newlib-aa45b3b73d945ca6f6f8101614131f5c39e5d8ac.tar.gz
newlib-aa45b3b73d945ca6f6f8101614131f5c39e5d8ac.tar.bz2
Check in previously mentioned change to cygcheck.cc
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/cygcheck.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 527cca6..0cbde87 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1835,6 +1835,10 @@ main (int argc, char **argv)
bool ok = true;
load_cygwin (argc, argv);
+ /* Need POSIX sorting while parsing args, but don't forget the
+ user's original environment. */
+ char *posixly = getenv ("POSIXLY_CORRECT");
+ if (posixly == NULL)
(void) putenv("POSIXLY_CORRECT=1");
while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
switch (i)
@@ -1877,6 +1881,8 @@ main (int argc, char **argv)
/*NOTREACHED*/}
argc -= optind;
argv += optind;
+ if (posixly == NULL)
+ putenv ("POSIXLY_CORRECT=");
if (argc == 0 && !sysinfo && !keycheck && !check_setup && !list_package)
if (givehelp)