On Mon, Jan 01, 2001 at 11:39:41PM -0500, James Abbatiello wrote:
> Might something like the attached work?  It doesn't break 2.1.2, and 
> keeps the hacks isolated to library/port.c.  Andreas?
> 
> 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();

You don't really want to do that.
That way you have to do that check *every* time you call that function.
Much better to do it once upon startup (somewhere in that file preferrably),
IMHO.

Andreas Mohr

Reply via email to