X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-dup3.c;h=033193df6201fd7e7f88652c1f22325fa234296c;hb=12597d104c0c1d6368eed9a9f1ebacd03f99542e;hp=a719234103637847b56f91941242909432747a9e;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-dup3.c b/tests/test-dup3.c index a71923410..033193df6 100644 --- a/tests/test-dup3.c +++ b/tests/test-dup3.c @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,6 +32,8 @@ SIGNATURE_CHECK (dup3, int, (int, int, int)); /* Get declarations of the Win32 API functions. */ # define WIN32_LEAN_AND_MEAN # include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" #endif #include "binary-io.h" @@ -75,7 +77,7 @@ main () { int use_cloexec; -#if defined O_CLOEXEC +#if O_CLOEXEC for (use_cloexec = 0; use_cloexec <= 1; use_cloexec++) #else use_cloexec = 0; @@ -87,7 +89,7 @@ main () char buffer[1]; o_flags = 0; -#if defined O_CLOEXEC +#if O_CLOEXEC if (use_cloexec) o_flags |= O_CLOEXEC; #endif