* lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't exist.
* m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
-2006-08-19 Bruno Haible <bruno@clisp.org>
+2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ BeOS portability.
+ * dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't exist.
+ Problem reported by Bruno Haible.
+
+2006-08-21 Bruno Haible <bruno@clisp.org>
BeOS portability.
* mbchar.h: Include <wctype.h> only if it exists.
# define O_NOFOLLOW 0
#endif
+#ifndef HAVE_FCHMOD
+# define HAVE_FCHMOD 0
+# undef fchmod
+# define fchmod(fd, mode) (-1)
+#endif
+
/* Change the ownership and mode bits of the directory DIR.
If MKDIR_MODE is not (mode_t) -1, mkdir (DIR, MKDIR_MODE) has just
{
mode_t chmod_mode =
mode | (dir_mode & CHMOD_MODE_BITS & ~mode_bits);
- result = (0 <= fd
+ result = (HAVE_FCHMOD && 0 <= fd
? fchmod (fd, chmod_mode)
: mkdir_mode != (mode_t) -1
? lchmod (dir, chmod_mode)
2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
+ * mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
+
* argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
* dev-ino.m4, same-inode.m4: Remove.
-# mkdir-p.m4 serial 12
+# mkdir-p.m4 serial 13
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Prerequisites of lib/dirchownmod.c.
AC_REQUIRE([gl_FUNC_LCHMOD])
AC_REQUIRE([gl_FUNC_LCHOWN])
+ AC_CHECK_FUNCS_ONCE([fchmod])
])