summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-09-06 22:36:55 +0200
committerBruno Haible <bruno@clisp.org>2009-09-06 22:36:55 +0200
commitdd62ffcdad44eac2bc21f57a98bf1a57c893f989 (patch)
tree575d217fc9c88a19474fa1091ad3e99bd9b29dc8
parent39dcff84b285160052e0bb26bd51411b89a37e33 (diff)
downloadgnulib-dd62ffcdad44eac2bc21f57a98bf1a57c893f989.tar.gz
Set errno to ENOSYS when a function is entirely unsupported.
-rw-r--r--ChangeLog8
-rw-r--r--lib/chown.c2
-rw-r--r--lib/lchown.c2
-rw-r--r--modules/chown1
4 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 07a30026e9..a1758037d8 100644
--- 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>
diff --git a/lib/chown.c b/lib/chown.c
index cca1d7f3c6..b851cbc4c0 100644
--- a/lib/chown.c
+++ b/lib/chown.c
@@ -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
}
diff --git a/lib/lchown.c b/lib/lchown.c
index 10ba1c9e5c..8cf10dd0c2 100644
--- a/lib/lchown.c
+++ b/lib/lchown.c
@@ -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
}
diff --git a/modules/chown b/modules/chown
index 7cd07f590b..cf9921089b 100644
--- a/modules/chown
+++ b/modules/chown
@@ -7,7 +7,6 @@ lib/fchown-stub.c
m4/chown.m4
Depends-on:
-errno
open
unistd
sys_stat