changeset 11964:ebddaf9cb5db

Set errno to ENOSYS when a function is entirely unsupported.
author Bruno Haible <bruno@clisp.org>
date Sun, 06 Sep 2009 22:36:55 +0200
parents a23404c39980
children 26b974ecc6ff
files ChangeLog lib/chown.c lib/lchown.c modules/chown
diffstat 4 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/chown.c
+++ b/lib/chown.c
@@ -103,7 +103,7 @@
   return chown (file, uid, gid);
 
 #else /* !HAVE_CHOWN */
-  errno = EOPNOTSUPP;
+  errno = ENOSYS;
   return -1;
 #endif
 }
--- a/lib/lchown.c
+++ b/lib/lchown.c
@@ -52,7 +52,7 @@
   return chown (file, uid, gid);
 
 #else /* !HAVE_CHOWN */
-  errno = EOPNOTSUPP;
+  errno = ENOSYS;
   return -1;
 #endif
 }
--- a/modules/chown
+++ b/modules/chown
@@ -7,7 +7,6 @@
 m4/chown.m4
 
 Depends-on:
-errno
 open
 unistd
 sys_stat