summaryrefslogtreecommitdiff
path: root/modules/sys_stat
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-09-01 09:18:16 -0600
committerEric Blake <ebb9@byu.net>2009-09-02 19:14:45 -0600
commitdd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae (patch)
tree7926e1b2496c9bee62d53ca388b4544bcdd275c0 /modules/sys_stat
parent4475e25b6a19e31e5783781f2132cdbd05bcf7c4 (diff)
downloadgnulib-dd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae.tar.gz
fchdir: use more consistent macro convention
* lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd. * lib/sys_stat.in.h (rpl_fstat): Declare via make-time REPLACE_FCHDIR, rather than relying on config.h macros. * lib/unistd.in.h (fchdir): Move all fchdir internal declarations inside a single make-time REPLACE_FCHDIR block, rather than using the config.h FCHDIR_REPLACEMENT. * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already AC_SUBST'd, also AC_DEFINE it. Don't define FCHDIR_REPLACEMENT. Manage fstat replacement. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up REPLACE_FCHDIR. * modules/sys_stat (Files): Add m4/unistd_h.m4. (Makefile.am): Substitute REPLACE_FCHDIR. * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. * lib/dup-safer.c (dup_safer): Likewise. * lib/dup2.c (rpl_dup2): Likewise. * lib/dup3.c (rpl_dup3): Likewise. * lib/open.c (rpl_open): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/sys_stat')
-rw-r--r--modules/sys_stat2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/sys_stat b/modules/sys_stat
index e4fba73abe..40f1c18801 100644
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -4,6 +4,7 @@ A <sys/stat.h> for systems with missing declarations.
Files:
lib/sys_stat.in.h
m4/sys_stat_h.m4
+m4/unistd_h.m4
Depends-on:
include_next
@@ -31,6 +32,7 @@ sys/stat.h: sys_stat.in.h
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/sys_stat.in.h; \
} > $@-t && \