On 09/19/2011 04:37 PM, Paul Eggert wrote:
For example, it's not reasonable to replace code like this:

   return dup2 (a, b);

with code like this:

   TRY_MSVC_INVAL
     {
       return dup2 (a, b);
     }
   CATCH_MSVC_INVAL
     {
       errno = EBADF;
       return -1;
     }
   DONE_MSVC_INVAL

I agree. Especially since the dup2 module was already trying to avoid the 'invalid argument handler' in the first place by pre-validating the fd before ever calling dup2, so that all the rest of gnulib can merely rely on the dup2 module and rpl_dup2 doing the right thing.

Fix the root of the problem (dup2), not all the callers (everyone that uses dup2).

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to