Bruno Haible <[EMAIL PROTECTED]> writes: > On Darwin-7.9.0 with CPPFLAGS=-Wall: Builds fine. All tests pass. The > "rm -rf" HFS+ bug workaround works fine. The "rm -rf" hardlinks / NFS bug > is still open.
I'm not familiar with that one, but suspect that the approach suggested in <http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00304.html> should fix it. Jim probably has a better clue, though. > at-func.c:39: warning: implicit declaration of function `lchown' > dirchownmod.c:102: warning: implicit declaration of function `lchown' > (lchown is not provided by the system; gnulib's substitute is used.) > mkstemp-safer.c:34: warning: implicit declaration of function `mkstemp' Thanks for reporting these. I installed the following in an attempt to fix them. 2006-10-05 Paul Eggert <[EMAIL PROTECTED]> Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>. * lib/dirchownmod.c: Include lchown.h. * lib/lchown.c: Don't include files that lchown.h now includes. Don't declare chown, since lchown.h now does that. * lib/lchown.h: Include errno.h, sys/types.h, unistd.h. (lchown): Define to rpl_chown if lchown is declared but does not exist. Declare using a prototype if lchown is not declared. Add a copyright notice. * lib/mkstemp.h: Include <unistd.h>. * lib/openat.c: Include lchown.h. * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared. Index: lib/dirchownmod.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/dirchownmod.c,v retrieving revision 1.5 diff -u -r1.5 dirchownmod.c --- lib/dirchownmod.c 16 Sep 2006 19:58:25 -0000 1.5 +++ lib/dirchownmod.c 5 Oct 2006 22:49:16 -0000 @@ -28,6 +28,7 @@ #include <unistd.h> #include "lchmod.h" +#include "lchown.h" #include "stat-macros.h" #ifndef HAVE_FCHMOD Index: lib/lchown.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/lchown.c,v retrieving revision 1.17 diff -u -r1.17 lchown.c --- lib/lchown.c 13 Sep 2006 22:38:14 -0000 1.17 +++ lib/lchown.c 5 Oct 2006 22:49:16 -0000 @@ -21,16 +21,9 @@ #include <config.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <errno.h> - #include "lchown.h" -#include "stat-macros.h" -/* Declare chown to avoid a warning. Don't include unistd.h, - because it may have a conflicting prototype for lchown. */ -int chown (); +#include "stat-macros.h" /* Work just like chown, except when FILE is a symbolic link. In that case, set errno to EOPNOTSUPP and return -1. Index: lib/lchown.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/lchown.h,v retrieving revision 1.3 diff -u -r1.3 lchown.h --- lib/lchown.h 7 Aug 2004 00:09:39 -0000 1.3 +++ lib/lchown.h 5 Oct 2006 22:49:16 -0000 @@ -1,3 +1,36 @@ +/* Declare a replacement for lchown on hosts that lack it. + + Copyright (C) 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering. */ + +#include <errno.h> +#include <sys/types.h> +#include <unistd.h> + +#if HAVE_DECL_LCHOWN +# if ! HAVE_LCHOWN +# undef lchown +# define lchown rpl_chown +# endif +#else +int lchown (char const *, uid_t, gid_t); +#endif + /* Some systems don't have EOPNOTSUPP. */ #ifndef EOPNOTSUPP # ifdef ENOTSUP Index: lib/mkstemp.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/mkstemp.h,v retrieving revision 1.1 diff -u -r1.1 mkstemp.h --- lib/mkstemp.h 20 Sep 2006 18:44:04 -0000 1.1 +++ lib/mkstemp.h 5 Oct 2006 22:49:16 -0000 @@ -19,6 +19,7 @@ /* written by Jim Meyering */ #include <stdlib.h> +#include <unistd.h> #ifdef __MKSTEMP_PREFIX # define _GL_CONCAT(x, y) x ## y Index: lib/openat.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/openat.c,v retrieving revision 1.14 diff -u -r1.14 openat.c --- lib/openat.c 30 Sep 2006 00:37:48 -0000 1.14 +++ lib/openat.c 5 Oct 2006 22:49:16 -0000 @@ -26,6 +26,7 @@ #include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ #include "fcntl--.h" +#include "lchown.h" #include "lstat.h" #include "openat-priv.h" #include "save-cwd.h" Index: m4/lchown.m4 =================================================================== RCS file: /cvsroot/gnulib/gnulib/m4/lchown.m4,v retrieving revision 1.10 diff -u -r1.10 lchown.m4 --- m4/lchown.m4 21 Aug 2006 21:46:31 -0000 1.10 +++ m4/lchown.m4 5 Oct 2006 22:49:16 -0000 @@ -1,4 +1,4 @@ -#serial 9 +#serial 10 dnl Copyright (C) 1998, 2001, 2003, 2004, 2005, 2006 Free Software dnl Foundation, Inc. @@ -15,5 +15,6 @@ AC_REQUIRE([AC_TYPE_UID_T]) AC_REQUIRE([gl_FUNC_CHOWN]) AC_REQUIRE([gl_STAT_MACROS]) + AC_CHECK_DECLS_ONCE([lchown]) AC_REPLACE_FUNCS(lchown) ]) _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils