On 05/24/2011 01:27 PM, Sam Steingold wrote: >> * Eric Blake <roy...@erqung.pbz> [2011-05-24 12:24:34 -0600]: >> >> strerror(-1) in thread 1 >> strerror(-2) in thread 2 > > thanks for the explanation. > > My further questions are: > you are not using the standard win32 FormatMessage() function. > how do you hangle the gazillion windows error messages?
strerror[_r]() only handles the messages that map to errno values. And if you use sockets, gnulib already maps quite a few windows errors to errno values. If you care about windows errors that do not map to errno values, you are probably writing a windows-specific program, at which point gnulib isn't going to help you. > (same goes for system-supplied strerror - is it ever used?) If the underlying strerror_r translates, then yes, we have a mismatch where some, but not all, errno values are translated to the user's locale. But this question was already asked last week: http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00421.html and if someone does the work, we could certainly support translating the gnulib-added errno values as well. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature