This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
[patch] Re: dlopen bug!
- To: Jorrit Tyberghein <Jorrit dot Tyberghein at uz dot kuleuven dot ac dot be>
- Subject: [patch] Re: dlopen bug!
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Wed, 11 Nov 1998 14:17:27 -0600
- Cc: gnu-win32 at cygnus dot com
Jorrit Tyberghein <Jorrit.Tyberghein@uz.kuleuven.ac.be> writes:
> Hi, I'm using CygWin B20 on NT4 (SP3) and I think I have found a bug
> in dlopen.
Thanks for the bug report. Here's a fix:
Wed Nov 11 14:10:01 CST 1998 Mumit Khan <khan@xraylith.wisc.edu>
* dlfcn.cc (get_full_path_of_dll): Reinitialize ret each time.
Index: dlfcn.cc
===================================================================
RCS file: /mounts/sdb5/src/cdk-b20/CVSROOT/b20/winsup/dlfcn.cc,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 dlfcn.cc
--- dlfcn.cc 1998/11/05 21:47:13 1.1.1.1
+++ dlfcn.cc 1998/11/11 20:09:31
@@ -56,7 +56,7 @@ get_full_path_of_dll (const char* str)
if (str == 0)
return str;
- static const char *ret = 0;
+ static const char *ret;
char buf[MAX_PATH];
char name[MAX_PATH];
@@ -67,6 +67,8 @@ get_full_path_of_dll (const char* str)
// empty string?
if (len == 0)
return str;
+
+ ret = 0; // remember that ret is static!
// trailing "." => no extension
if (str[len - 1] == '.')
Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".