bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with lt_dlerror


From: Mr. Roman Putanowicz
Subject: problem with lt_dlerror
Date: Thu, 16 May 2002 20:14:20 +0000

Hi,

I have problems with lt_dlerror. 
According to the documentation (for version 1.4.2, 10 September 2001)
the function lt_dlerror: "Return NULL if no errors have occurred since 
initialization or since it was last called).

I am reading the code of lt_dlerror and cannot see how the function
can ever return NULL ?:
(form ltdl.c for libtool version 1.4.2)

const char *
lt_dlerror ()
{
  const char *error;

  LT_DLMUTEX_GETERROR (error);
  LT_DLMUTEX_SETERROR (0);

  return error ? error : LT_DLSTRERROR (UNKNOWN);
}

The same code is in version 1.4d

I "discovered" the above when trying to run the examples form the book
"Gnu Autconf, Automake and Libtool" by G.V. Vaughan et al.
They proposed the following idiom (Chapter 17, point 2.3 "Module Loader",
p.213):

      run = (entrypoint *) lt_dlsym (module, "run");

      /* In principle, run might legitimately be NULL, so
         I don't use `run == NULL' as an error indicator
         in general. */

    << HERE is the check for output of lt_dlerror >>


I would be grateful for suggestion how to fix lt_dlerror (if it is a bug) or
some relevant
error checking idiom.

Cheers
Romek

PS. Pleas respond to address@hidden as well, because I am not
subscribed to the list.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]