diff options
Diffstat (limited to 'lib/unistd.in.h')
-rw-r--r-- | lib/unistd.in.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index bb514dbff0..60a7530b4a 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -301,16 +301,24 @@ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " #endif -#if @REPLACE_DUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup rpl_dup -# endif +#if @GNULIB_DUP@ +# if @REPLACE_DUP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup rpl_dup +# endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); -#else +# else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); -#endif +# endif _GL_CXXALIASWARN (dup); +#elif defined GNULIB_POSIXCHECK +# undef dup +# if HAVE_RAW_DECL_DUP +_GL_WARN_ON_USE (dup, "dup is unportable - " + "use gnulib module dup for portability"); +# endif +#endif #if @GNULIB_DUP2@ |