dlfcn.cc: clear previous dl errors before new dlopen, dlsym, dlclose call?
Sat Feb 1 04:54:00 GMT 2003
On Tue, Jan 21, 2003 at 05:17:14PM +0800, David Huang wrote:
>Is't needed to clear previous dl errors before new dlopen, dlsym,
I don't see anything in the documentation which would indicate this.
However, the current implementation seems to be wrong since it always
returns the last load error even when called repeatedly.
"If no dynamic linking errors have occurred since the last invocation of
dlerror(), dlerror() shall return NULL. Thus, invoking dlerror() a
second time, immediately following a prior invocation, shall result in
NULL being returned."
So, I've modified dlerror to do just that.
Thanks for bringing this to our attention.
More information about the Cygwin-patches