The more I look at this patch, the less I like it. I would summarise
why I think it's wrong here, but it's better if you look at the
message I posted on the gnulib mailing list here first:
http://lists.gnu.org/archive/html/bug-gnulib/2009-11/msg00434.html
Directly accessing errno on Windows is wrong: you won't see the true
reasons for an error by doing that. However depending on what the
call is and whether it was replaced by gnulib, the alternatives are a
lot more complicated.
This patch series attempts to Do The Right Thing with gnulib code as
it stands at the moment (assuming my understanding of gnulib error
handling is correct -- see above link).
I feel however that it's probably better to change gnulib error
handling to be more rational.
There's also an additional complication I discovered: MinGW error
values are often wrong. So that's a MinGW bug to take to the nice
upstream folks on the MinGW project.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html