On 03/05/2013 06:10 PM, Bruno Haible wrote: > Hi Eric, > OK for the argumentation for the POSIXy systems. But for the Windows/mingw > libc, I would be more careful. mingw is a moving target (it moves closer > towards POSIX over time), and has EINTR. It is not unreasonable to expect > that EINTR for open() or close() may occur in mingw at some point. > > Btw, in my experience, in many documentation pages of Windows API and > Microsoft libc functions, there is at least one detail in the documentation > that does not match the actual behaviour. Therefore, just because the doc > doesn't mention EINTR as a possible return code, doesn't mean that EINTR > cannot occur as a return code. > >> * lib/execute.c (nonintr_close, nonintr_open): Delete. > > I would have changed the > #ifdef EINTR > to > #if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined > __CYGWIN__) > similar to the approach taken in lib/spawn-pipe.c, which is a "brother" of > lib/execute.c. > > Are you OK with this partial revert?
Sure; that seems reasonable, and also avoids the warning. But since we already have an #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) condition, and know that EINTR is defined, why not just move the entire block of code into the one condition where it is used instead of going through a complex condition to define it? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature