[EMAIL PROTECTED] wrote:

> 
> On Mon, 1 Jan 2001, Andreas Mohr wrote:
> 
>>> right?  If you get this, it doesn't.  I added the dummy dlopen, but I
>>> haven't removed all the dlerror()s.  Is that what you meant?
>> 
>> Exactly this.
>> Good to hear.
>> 2.2-6 works with it, too.
>> 
>> And 2.2-7 obviously doesn't exist. At least ftp.us.debian.org only carries
>> 2.2-6 and -8.
>> 
>> 
>>> This glibc must be a terrible hack.  Maybe we should do our own?  Can't
>>> be as hard as winelib... the interfaces are fairly well defined :-)
>> 
>> ROTFL !
>> 
>> Hmm, maybe we really ought to add that dummy dlopen() to Wine startup then.
>> I'm afraid we don't have much choice here :-\
>> 
>> I already filed a bug report to Debian, BTW.
>> Not sure whether it's a fault of their packaging or the libc version itself,
>> of course.
>> 
>> Well, at least it's good to have a workaround only exactly one day
>> after the release of that version...
>> 
>> Andreas Mohr
>> 
> 
> With perfect hindsight it seems libdl has problems iitializing
> itself and a dummy dlopen is obvious, but it needs a geniius to see the
> obvious the first time.  I wonder if giving it a chance to get through
> one open before forcing it to recurse would fix the original problem,
> but I wouldn't bet on it.
> 

Might something like the attached work?  It doesn't break 2.1.2, and 
keeps the hacks isolated to library/port.c.  Andreas?


-- 
James Abbatiello


Index: library/port.c
===================================================================
RCS file: /home/wine/wine/library/port.c,v
retrieving revision 1.8
diff -u -r1.8 port.c
--- library/port.c      2000/12/19 19:38:48     1.8
+++ library/port.c      2001/01/02 04:04:55
@@ -452,6 +452,8 @@
 #ifdef HAVE_DL_API
     void *ret;
     char *s;
+    static void *dummy = NULL;
+    if (!dummy) dummy = dlopen( NULL, RTLD_LAZY );
     dlerror(); dlerror();
     ret = dlopen( filename, flag );
     s = dlerror();

Reply via email to