summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-16 03:39:55 +0000
committerChristopher Faylor <me@cgf.cx>2003-09-16 03:39:55 +0000
commit2bfdb22e236bbf11f46b974ef7c00af44a640fd9 (patch)
tree7fb8e427c4d5b762b60e8a71dc76b373b68c44ad
parent8ec37f21680447bf30b37a0e2d7338162f9ca60e (diff)
downloadcygnal-2bfdb22e236bbf11f46b974ef7c00af44a640fd9.tar.gz
cygnal-2bfdb22e236bbf11f46b974ef7c00af44a640fd9.tar.bz2
cygnal-2bfdb22e236bbf11f46b974ef7c00af44a640fd9.zip
* getopt.cc (opterr): Reinstate initialization.
(optind): Ditto. (optopt): Ditto. * pinfo.cc: Include cygheap.h or suffer compile error. * shared.h: Reset magic number.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/libc/getopt.c6
-rw-r--r--winsup/cygwin/pinfo.cc1
-rw-r--r--winsup/cygwin/shared_info.h2
4 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 163da97f5..77a3d4953 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2003-09-15 Christopher Faylor <cgf@redhat.com>
+ * getopt.cc (opterr): Reinstate initialization.
+ (optind): Ditto.
+ (optopt): Ditto.
+ * pinfo.cc: Include cygheap.h or suffer compile error.
+ * shared.h: Reset magic number.
+
+2003-09-15 Christopher Faylor <cgf@redhat.com>
+
* exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using
correct check for parent state rather than inverted check.
diff --git a/winsup/cygwin/libc/getopt.c b/winsup/cygwin/libc/getopt.c
index 5d97945fa..90a202601 100644
--- a/winsup/cygwin/libc/getopt.c
+++ b/winsup/cygwin/libc/getopt.c
@@ -53,9 +53,9 @@
#ifdef __weak_alias
__weak_alias(getopt,_getopt)
#endif
-int __declspec(dllexport) opterr; /* if error message should be printed */
-int __declspec(dllexport) optind; /* index into parent argv vector */
-int __declspec(dllexport) optopt; /* character checked for validity */
+int __declspec(dllexport) opterr = 1; /* if error message should be printed */
+int __declspec(dllexport) optind = 1; /* index into parent argv vector */
+int __declspec(dllexport) optopt = '?'; /* character checked for validity */
int __declspec(dllexport) optreset; /* reset getopt */
char __declspec(dllexport) *optarg; /* argument associated with option */
#endif
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index a1f068c2f..eabf6a92c 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -27,6 +27,7 @@ details. */
#include "ntdll.h"
#include "cygthread.h"
#include "shared_info.h"
+#include "cygheap.h"
static char NO_COPY pinfo_dummy[sizeof (_pinfo)] = {0};
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
index 2d7cacd37..4fa699a94 100644
--- a/winsup/cygwin/shared_info.h
+++ b/winsup/cygwin/shared_info.h
@@ -141,7 +141,7 @@ public:
#define SHARED_INFO_CB 47112
-#define CURR_SHARED_MAGIC 0x53f1a7f4U
+#define CURR_SHARED_MAGIC 0x359218a2U
/* NOTE: Do not make gratuitous changes to the names or organization of the
below class. The layout is checksummed to determine compatibility between