Set errno to ENOSYS when a function is entirely unsupported.
authorBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2009 20:36:55 +0000 (22:36 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2009 20:36:55 +0000 (22:36 +0200)
ChangeLog
lib/chown.c
lib/lchown.c
modules/chown

index 07a3002..a175803 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-09-06  Bruno Haible  <bruno@clisp.org>
 
+       Set errno to ENOSYS when a function is entirely unsupported.
+       * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Set errno to ENOSYS instead of
+       EOPNOTSUPP.
+       * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
+       * modules/chown (Depends-on): Remove errno.
+
+2009-09-06  Bruno Haible  <bruno@clisp.org>
+
        * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms.
 
 2009-09-06  Bruno Haible  <bruno@clisp.org>
index cca1d7f..b851cbc 100644 (file)
@@ -103,7 +103,7 @@ rpl_chown (const char *file, uid_t uid, gid_t gid)
   return chown (file, uid, gid);
 
 #else /* !HAVE_CHOWN */
-  errno = EOPNOTSUPP;
+  errno = ENOSYS;
   return -1;
 #endif
 }
index 10ba1c9..8cf10dd 100644 (file)
@@ -52,7 +52,7 @@ lchown (const char *file, uid_t uid, gid_t gid)
   return chown (file, uid, gid);
 
 #else /* !HAVE_CHOWN */
-  errno = EOPNOTSUPP;
+  errno = ENOSYS;
   return -1;
 #endif
 }
index 7cd07f5..cf99210 100644 (file)
@@ -7,7 +7,6 @@ lib/fchown-stub.c
 m4/chown.m4
 
 Depends-on:
-errno
 open
 unistd
 sys_stat