summaryrefslogtreecommitdiff
path: root/lib/lchown.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-10-05 22:49:57 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-10-05 22:49:57 +0000
commit4131c37368040602add83fb12dfda11505f884e7 (patch)
treeccb283e2f6c6b3f028874834a19d63b1dde134cc /lib/lchown.c
parent2e749d9876b6c6cbc098dff94b94d4df3981cbb0 (diff)
downloadgnulib-4131c37368040602add83fb12dfda11505f884e7.tar.gz
[lib/ChangeLog]
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>. * dirchownmod.c: Include lchown.h. * lchown.c: Don't include files that lchown.h now includes. Don't declare chown, since lchown.h now does that. * 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. * mkstemp.h: Include <unistd.h>. * openat.c: Include lchown.h. [m4/ChangeLog] * lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
Diffstat (limited to 'lib/lchown.c')
-rw-r--r--lib/lchown.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/lchown.c b/lib/lchown.c
index f015cde9fc..855db8f556 100644
--- a/lib/lchown.c
+++ b/lib/lchown.c
@@ -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.