libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Change lt_dlerror to return NULL instaed of "unknown error"


From: Scott James Remnant
Subject: Re: [PATCH] Change lt_dlerror to return NULL instaed of "unknown error"
Date: Tue, 07 Oct 2003 17:42:15 +0100

On Fri, 2003-09-12 at 14:53, Peter O'Gorman wrote:

> On Thursday, September 11, 2003, at 6:56 AM, Scott James Remnant wrote:
> 
> > [ Patch resubmitted -- ping! :-) ]
> >
> > This is the behaviour as described in the documentation.  Nothing I've
> > found relies on the different behaviour in the implementation so this
> > patch changes it to match the docs.
> >
> Hi Scott,
> 
> I was just about to use my shiny new commit bit on this, you are of 
> course correct, ltdl should not return LT_DLSTRERROR (UNKNOWN) even if 
> there were no error.
> 
More accurately, ltdl should only return LT_DLSTRERROR (UNKNOWN) when an
unknown error has occurred, and NULL if no error has occurred.

> However I realized that it was probably added because there are likely 
> places in the code where an error occurs but the error string is not 
> set. In this case returning NULL from lt_dlerror is also incorrect. I 
> am not about to look through the code looking for places where this 
> happens (it might not even happen as far as I know), but I suggest you 
> modify your patch so that if lt_dlopen, lt_dlsym lt_dlclose are 
> returning failure and the error has not been set then set the unknown 
> error.
> 
I've checked through as thoroughly as I can, and I can't find any places
where this is true...  Every error'd return path seems to hit a seterror
call.  A couple actually set UNKNOWN which threw me, but it that doesn't
confuse this patch (it'll return UNKNOWN not NULL). 

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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