This is the mail archive of the cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: cygwin1.dll startup and GDB
Maybe this will fix things.
There's no need to call OpenFileMapping with a NULL pointer so
don't do it.
cgf
Index: shared.cc
===================================================================
RCS file: /cvs/cvsfiles/devo/winsup/shared.cc,v
retrieving revision 1.55
diff -u -p -r1.55 shared.cc
--- shared.cc 1999/04/01 03:56:55 1.55
+++ shared.cc 1999/04/28 02:10:52
@@ -49,11 +49,15 @@ open_shared (const char *name, HANDLE &s
if (!shared_h)
{
- char *mapname = name ? shared_name (name, 0) : NULL;
-
- shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
- TRUE, mapname);
-
+ char *mapname;
+ if (!name)
+ mapname = NULL;
+ else
+ {
+ mapname = shared_name (name, 0);
+ shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
+ TRUE, mapname);
+ }
if (!shared_h &&
!(shared_h = CreateFileMappingA ((HANDLE) 0xffffffff,
&sec_all,