Add lib/fchown-stub.c.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 10 Jul 2004 06:29:25 +0000 (06:29 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 10 Jul 2004 06:29:25 +0000 (06:29 +0000)
ChangeLog
lib/ChangeLog
lib/fchown-stub.c [new file with mode: 0644]
modules/chown

index 314d12b..f491123 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * modules/chown (Files): Add lib/fchown-stub.c, since
+       gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
+
 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        * modules/argz: Omit "#include".
index 64f0d07..1afa10b 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fchown-stub.c: New file.
+
 2004-06-24  Jim Meyering  <jim@meyering.net>
 
        * obstack.h (obstack_base): Cast to (void *), per documentation.
diff --git a/lib/fchown-stub.c b/lib/fchown-stub.c
new file mode 100644 (file)
index 0000000..beb336c
--- /dev/null
@@ -0,0 +1,15 @@
+#include <config.h>
+#include <sys/types.h>
+#include <errno.h>
+
+/* A trivial substitute for `fchown'.
+
+   DJGPP 2.03 and earlier (and perhaps later) don't have `fchown',
+   so we pretend no-one has permission for this operation. */
+
+int
+fchown (int fd, uid_t uid, gid_t gid)
+{
+  errno = EPERM;
+  return -1;
+}
index ab05ad4..1d5d41b 100644 (file)
@@ -3,6 +3,7 @@ chown() function: change ownership of a file.
 
 Files:
 lib/chown.c
+lib/fchown-stub.c
 m4/chown.m4
 
 Depends-on: