From 8a98cf0bf0670969256cf630f26d53582adc6111 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 8 Nov 2011 13:02:02 +0100 Subject: [PATCH] openat: Conditionalize dependencies. * lib/openat.c: Reduce the scope of some #includes. * modules/openat (Depends-on): Add conditions. --- ChangeLog | 6 ++++++ lib/openat.c | 8 ++++---- modules/openat | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6efe313c6..e1d120047 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-11-08 Bruno Haible + + openat: Conditionalize dependencies. + * lib/openat.c: Reduce the scope of some #includes. + * modules/openat (Depends-on): Add conditions. + 2011-11-07 Jim Meyering maint.mk: extract GPG key ID without using a temporary file diff --git a/lib/openat.c b/lib/openat.c index a12fe20dc..322532605 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -47,10 +47,6 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode) #include #include -#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ -#include "openat-priv.h" -#include "save-cwd.h" - #if HAVE_OPENAT /* Like openat, but work around Solaris 9 bugs with trailing slash. */ @@ -144,6 +140,10 @@ rpl_openat (int dfd, char const *filename, int flags, ...) #else /* !HAVE_OPENAT */ +# include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +# include "openat-priv.h" +# include "save-cwd.h" + /* Replacement for Solaris' openat function. First, try to simulate it via open ("/proc/self/fd/FD/FILE"). diff --git a/modules/openat b/modules/openat index 995c280cb..f2da9bc11 100644 --- a/modules/openat +++ b/modules/openat @@ -9,20 +9,20 @@ m4/openat.m4 m4/mode_t.m4 Depends-on: -at-internal -dosname -errno -extensions -fchdir fcntl-h -fstat +extensions largefile -open -openat-die -openat-h -save-cwd -stdbool -sys_stat +openat-h [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1] +stdbool [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1] +sys_stat [test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1] +fstat [test $REPLACE_OPENAT = 1] +at-internal [test $HAVE_OPENAT = 0] +dosname [test $HAVE_OPENAT = 0] +errno [test $HAVE_OPENAT = 0] +fchdir [test $HAVE_OPENAT = 0] +open [test $HAVE_OPENAT = 0] +openat-die [test $HAVE_OPENAT = 0] +save-cwd [test $HAVE_OPENAT = 0] configure.ac: gl_FUNC_OPENAT -- 2.11.0