diff options
author | Bruno Haible <bruno@clisp.org> | 2009-09-07 01:33:12 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-09-07 01:33:12 +0200 |
commit | 1e2ae3ac85372153b80e024986877314429d0d25 (patch) | |
tree | d99776ca271a02fcad291a1b2affc05a9c8a95d7 /lib/sys_stat.in.h | |
parent | 25fe3af36f864541e9c2b90aaff2ab6215105b47 (diff) | |
download | gnulib-1e2ae3ac85372153b80e024986877314429d0d25.tar.gz |
Remove dependency from unistd_h.m4, sys_stat_h.m4, fcntl_h.m4 to openat.m4.
Diffstat (limited to 'lib/sys_stat.in.h')
-rw-r--r-- | lib/sys_stat.in.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 33482d28f4..0c4522931b 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -302,40 +302,49 @@ extern int rpl_lstat (const char *name, struct stat *buf); lstat (p, b)) #endif -#if @GNULIB_OPENAT@ -# if @REPLACE_FSTATAT@ -# undef fstatat -# define fstatat rpl_fstatat -# endif -# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@ -int fstatat (int fd, char const *name, struct stat *st, int flags); -# endif +#if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ -int fchmodat (int fd, char const *file, mode_t mode, int flag); -# endif - -# if !@HAVE_MKDIRAT@ -int mkdirat (int fd, char const *file, mode_t mode); +extern int fchmodat (int fd, char const *file, mode_t mode, int flag); # endif - #elif defined GNULIB_POSIXCHECK # undef fchmodat # define fchmodat(d,n,m,f) \ (GL_LINK_WARNING ("fchmodat is not portable - " \ "use gnulib module openat for portability"), \ fchmodat (d, n, m, f)) +#endif + + +#if @GNULIB_FSTATAT@ +# if @REPLACE_FSTATAT@ +# undef fstatat +# define fstatat rpl_fstatat +# endif +# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@ +extern int fstatat (int fd, char const *name, struct stat *st, int flags); +# endif +#elif defined GNULIB_POSIXCHECK # undef fstatat # define fstatat(d,n,s,f) \ (GL_LINK_WARNING ("fstatat is not portable - " \ "use gnulib module openat for portability"), \ fstatat (d, n, s, f)) +#endif + + +#if @GNULIB_MKDIRAT@ +# if !@HAVE_MKDIRAT@ +extern int mkdirat (int fd, char const *file, mode_t mode); +# endif +#elif defined GNULIB_POSIXCHECK # undef mkdirat # define mkdirat(d,n,m) \ (GL_LINK_WARNING ("mkdirat is not portable - " \ "use gnulib module openat for portability"), \ mkdirat (d, n, m)) -#endif /* @GNULIB_OPENAT@ */ +#endif + #if @REPLACE_FCHDIR@ # define fstat rpl_fstat |