[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] faccessat, etc.: support AT_FDCWD-only use
From: |
Jim Meyering |
Subject: |
Re: [PATCH 3/3] faccessat, etc.: support AT_FDCWD-only use |
Date: |
Mon, 15 Oct 2012 18:41:41 +0200 |
Paul Eggert wrote:
> * lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support
> this function only if its first argument is AT_FDCWD.
> Emacs wants faccessat for AT_EACCESS but not for any first-arg
> values other than AT_FDCWD, so it doesn't want all the openat
> machinery with fchdir etc.
> * modules/faccessat, modules/fchmodat, modules/fchownat (Files):
> * modules/fstatat, modules/mkdirat, modules/openat (Files):
> * modules/unlinkat (Files):
> Remove lib/openat-priv.h, as at-internal supplies this file.
> Removing this file here allows us to support programs like Emacs
> that avoid at-internal.
> ---
> ChangeLog | 13 +++++++++++++
> lib/at-func.c | 31 +++++++++++++++++++++++--------
> modules/faccessat | 1 -
> modules/fchmodat | 1 -
> modules/fchownat | 1 -
> modules/fstatat | 1 -
> modules/mkdirat | 1 -
> modules/openat | 1 -
> modules/unlinkat | 1 -
> 9 files changed, 36 insertions(+), 15 deletions(-)
Hi Paul,
I built coreutils with the latest from gnulib and
noticed a link failure on FreeBSD 9.0-RELEASE-p3:
src/chown-core.o: In function `change_file_owner':
/u/coreutils-8.19.164-a6345/src/chown-core.c:407: undefined reference to
`lchownat'
/u/coreutils-8.19.164-a6345/src/chown-core.c:439: undefined reference to
`chownat'
make[2]: *** [src/chgrp] Error 1
make[2]: *** Waiting for unfinished jobs....
src/chmod.o: In function `process_file':
/u/coreutils-8.19.164-a6345/src/chmod.c:271: undefined reference to `chmodat'
make[2]: *** [src/chmod] Error 1
make[2]: Leaving directory `/u/coreutils-8.19.164-a6345'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/u/coreutils-8.19.164-a6345'
make: *** [all] Error 2
I haven't fixed it but note that it looks inline-related:
Here's a diff of preprocessed src/chmod.c without-vs-with
the latest gnulib changes:
-static inline int
+
+#define FSTATAT_INLINE _GL_INLINE
+
+
+inline int
statat (int fd, char const *name, struct stat *st)
{
return fstatat (fd, name, st, 0);
}
-static inline int
+inline int
lstatat (int fd, char const *name, struct stat *st)
{
return fstatat (fd, name, st, 0x200);
}