* Peter Rosin wrote on Wed, Mar 17, 2010 at 10:50:40AM CET: > Hmm, my last argument made me think that it's perhaps not wise for > libtool to rely on the last error to not change over a successful > call either. But that potential problem was there before this patch > too, so I'm proposing a separate patch for that in a followup mail...
Ah, so my comment was not purely hot air, just mostly. ;-) > So, ok to push this as attached? Yes, and the followup, too. Thanks, Ralf > 2010-03-17 Peter Rosin <p...@lysator.liu.se> > > Use Get/SetThreadErrorMode if they are available. > * libltdl/loaders/loadlibrary.c (wrap_geterrormode): Replaced... > (wrap_getthreaderrormode): ...by this function that checks > first for GetThreadErrorMode, then GetErrorMode and makes use > of either of those or... > (fallback_getthreaderrormode): ...else falls back to this > replacement function that implements the old workaround, which > was previously implemented in... > (fallback_geterrormode): ...this now renamed function. > (geterrormode): Replaced... > (getthreaderrormode): ...by this function pointer that points > at either of wrap_getthreaderrormode, GetThreadErrorMode, > GetErrorMode or fallback_getthreaderrormode. > (wrap_setthreaderrormode): New function that checks if > SetThreadErrorMode is supported by the system and makes use of > it if it is. > (fallback_setthreaderrormode): New function that is used > otherwise that implements the old version using SetErrorMode. > (setthreaderrormode): New function pointer that points at > either of wrap_setthreaderrormode, SetThreadErrorMode or > fallback_setthreaderrormode. > (vm_open): Adjust to the above.