[BRLTTY] Clumping all the braille driver modules into one big app?

Dave Mielke dave at mielke.cc
Thu Aug 28 21:45:58 EDT 2008


[quoted lines by Willie Walker on 2008/08/28 at 20:58 -0400]

>The problem is that brltty is jumping to dlerror too soon -- it should 
>first check the result of dlsym.  The reason for this is that dlerror 
>returns the message for the _last failed_ dlsym, not the result of the 
>_last call_ to dlsym.  

There appears to be a philosophical difference between Solaris and Linux here. 
The Linux man page for dlsym() says the following:

   Since the value of the symbol could actually be NULL (so that a NULL return 
   from dlsym() need not indicate an error), the correct way to test for an 
   error is to call dlerror() to clear any old error conditions, then call 
   dlsym(), and then call dlerror() again, saving its return value into a 
   variable, and check whether this saved value is not NULL.

>Internally, the Sun C library is doing some magic, which results in a 
>caught/expected failure on the _ex_unwind symbol.  The change above checks the 
>result of the call to dlsym before jumping directly to dlerror.
>
>I hope you guys can accept this change!

Yes, it'll be included but with an additional test that dlerror() returns 
non-NULL. That should make the same code work on both platforms.

-- 
Dave Mielke           | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave at mielke.cc | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the BRLTTY mailing list