[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use Get/SetThreadErrorMode if it is available (on Windows 7 and abov
From: |
Ralf Wildenhues |
Subject: |
Re: Use Get/SetThreadErrorMode if it is available (on Windows 7 and above). |
Date: |
Tue, 16 Mar 2010 22:43:11 +0100 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hello Peter,
* Peter Rosin wrote on Mon, Mar 15, 2010 at 11:55:16AM CET:
> 2010-01-21 Peter Rosin <address@hidden>
>
> 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.
I cannot see big problems with this patch from looking over it.
I think GCS wants no whitespace after opening parentheses, you could
line-wrap before '='.
When you use GetProcAdress in the setup function, you may be setting the
error that can be read with GetLastError. Is there a chance the code
(since your last patch) interferes with a previous error set there?
Thanks,
Ralf