X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdirent.in.h;h=8414f2636357b3f9190e8dbeacc6a89f57ac817b;hb=14b6d70139486b63e66257aad1abe2a9615f4d96;hp=e6849286b176bacaf8754946e4245e8473f1698a;hpb=497bb5fc57d14e07115482157ed318d078a83083;p=gnulib.git diff --git a/lib/dirent.in.h b/lib/dirent.in.h index e6849286b..8414f2636 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -50,11 +50,22 @@ _GL_CXXALIAS_SYS (closedir, int, (DIR *)); _GL_CXXALIASWARN (closedir); #if @GNULIB_DIRFD@ -# if !@HAVE_DECL_DIRFD@ && !defined dirfd /* Return the file descriptor associated with the given directory stream, or -1 if none exists. */ -_GL_EXTERN_C int dirfd (DIR *dir) _GL_ARG_NONNULL ((1)); +# if @REPLACE_DIRFD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dirfd +# define dirfd rpl_dirfd +# endif +_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (dirfd, int, (DIR *)); +# else +# if !(@HAVE_DECL_DIRFD@ || defined dirfd) +_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (dirfd, int, (DIR *)); # endif +_GL_CXXALIASWARN (dirfd); #elif defined GNULIB_POSIXCHECK # undef dirfd # if HAVE_RAW_DECL_DIRFD