[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openat problems on decent linux systems
From: |
Paul Eggert |
Subject: |
Re: openat problems on decent linux systems |
Date: |
Mon, 11 Dec 2006 22:16:04 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Arkadiusz Miskiewicz <address@hidden> writes:
> Please take a look at thread:
> http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2006-December/018341.html
>
> The problem is that coreutils uses own internal copies
> of openat() and fchmodat() even if glibc already provides
> these functions (starting from glibc 2.4).
Sorry, I don't follow. fchmodat() I can see, but
coreutils should use glibc's openat() if available.
Perhaps you meant to write "mkdirat()" instead of "openat()"?
> + needcompat=no
> + AC_CHECK_FUNC(mkdirat, [], [needcompat=yes])
> + AC_CHECK_FUNC(fchmodat, [], [needcompat=yes])
> + AC_CHECK_FUNC(fchownat, [], [needcompat=yes])
Why is the fchownat line needed? fchownat is compiled only if openat
is included.
How about the following patch instead? It seems a bit more
straightforward. However, I don't fully understand the problem so I
may well have gotten it wrong.
2006-12-11 Paul Eggert <address@hidden>
* m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
and fchmodat unconditionally, since glibc 2.4 has them.
Problem reported by Arkadiusz Miskiewicz.
--- m4/openat.m4 20 Nov 2006 22:01:30 -0000 1.9
+++ m4/openat.m4 12 Dec 2006 06:12:43 -0000
@@ -1,4 +1,4 @@
-#serial 11
+#serial 12
# See if we need to use our replacement for Solaris' openat et al functions.
dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -10,16 +10,12 @@ dnl with or without modifications, as lo
AC_DEFUN([gl_FUNC_OPENAT],
[
- # No system provides these functions; compile them unconditionally.
- AC_LIBOBJ([mkdirat])
- AC_LIBOBJ([fchmodat])
-
AC_LIBOBJ([openat-die])
AC_LIBOBJ([openat-proc])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([lchmod])
AC_CHECK_FUNCS_ONCE([fdopendir])
- AC_REPLACE_FUNCS(openat)
+ AC_REPLACE_FUNCS([fchmodat mkdirat openat])
case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
yes+yes) ;;
yes+*) AC_LIBOBJ([fstatat]);;