From 2bfdb22e236bbf11f46b974ef7c00af44a640fd9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 16 Sep 2003 03:39:55 +0000 Subject: [PATCH] * getopt.cc (opterr): Reinstate initialization. (optind): Ditto. (optopt): Ditto. * pinfo.cc: Include cygheap.h or suffer compile error. * shared.h: Reset magic number. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/libc/getopt.c | 6 +++--- winsup/cygwin/pinfo.cc | 1 + winsup/cygwin/shared_info.h | 2 +- 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,3 +1,11 @@ +2003-09-15 Christopher Faylor + + * 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 * exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using 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