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 07a30026e9e099ae5335a2f5288b9f7be648403f..a1758037d8284d6c2a0e9287082b2a5cbdbc1f22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index cca1d7f3c6091f4b69a1a513bf2ac2b8d594a93d..b851cbc4c0bf13e7e88854bd93fb6ac0675c628e 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 10ba1c9e5c0d1899852b876932e40d0d662731c7..8cf10dd0c2e6ee82e2da61a6d9492d609655ee07 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 7cd07f590b75f388a14268b283be75d547d8b968..cf9921089b90ac189647c1c9d69055203313a8f4 100644 (file)
@@ -7,7 +7,6 @@ lib/fchown-stub.c
 m4/chown.m4
 
 Depends-on:
-errno
 open
 unistd
 sys_stat