This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26.9000-1235-g9a17932
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 29 Jan 2018 21:24:24 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-1235-g9a17932
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 9a1793289b08339660985cb2baada60debc70bf2 (commit)
from e01e0ddc42e5909af0409d28bc4fd52ebfdbc7db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a1793289b08339660985cb2baada60debc70bf2
commit 9a1793289b08339660985cb2baada60debc70bf2
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Sun Jan 28 18:48:04 2018 +0100
Reject invalid definitions of _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC, _POSIX_VDISABLE
POSIX requires that the constants _POSIX_CHOWN_RESTRICTED,
_POSIX_NO_TRUNC, and _POSIX_VDISABLE are always defined to a value other
than -1.
diff --git a/ChangeLog b/ChangeLog
index 6fefbee..07e751e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-29 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/posix/fpathconf.c (__fpathconf): Verify the values of
+ _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC, _POSIX_VDISABLE.
+ * sysdeps/posix/pathconf.c (__pathconf): Likewise.
+
2018-01-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
* mach/Versions: Fix version when __mach_host_self_ was added.
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c
index 80af77e..a9d1645 100644
--- a/sysdeps/posix/fpathconf.c
+++ b/sysdeps/posix/fpathconf.c
@@ -103,25 +103,22 @@ __fpathconf (int fd, int name)
#endif
case _PC_CHOWN_RESTRICTED:
-#ifdef _POSIX_CHOWN_RESTRICTED
- return _POSIX_CHOWN_RESTRICTED;
-#else
- return -1;
+#if _POSIX_CHOWN_RESTRICTED == -1
+# error "Invalid value for _POSIX_CHOWN_RESTRICTED"
#endif
+ return _POSIX_CHOWN_RESTRICTED;
case _PC_NO_TRUNC:
-#ifdef _POSIX_NO_TRUNC
- return _POSIX_NO_TRUNC;
-#else
- return -1;
+#if _POSIX_NO_TRUNC == -1
+# error "Invalid value for _POSIX_NO_TRUNC"
#endif
+ return _POSIX_NO_TRUNC;
case _PC_VDISABLE:
-#ifdef _POSIX_VDISABLE
- return _POSIX_VDISABLE;
-#else
- return -1;
+#if _POSIX_VDISABLE == -1
+# error "Invalid value for _POSIX_VDISABLE"
#endif
+ return _POSIX_VDISABLE;
case _PC_SYNC_IO:
#ifdef _POSIX_SYNC_IO
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index 2059e55..0f893ec 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -101,25 +101,22 @@ __pathconf (const char *path, int name)
#endif
case _PC_CHOWN_RESTRICTED:
-#ifdef _POSIX_CHOWN_RESTRICTED
- return _POSIX_CHOWN_RESTRICTED;
-#else
- return -1;
+#if _POSIX_CHOWN_RESTRICTED == -1
+# error "Invalid value for _POSIX_CHOWN_RESTRICTED"
#endif
+ return _POSIX_CHOWN_RESTRICTED;
case _PC_NO_TRUNC:
-#ifdef _POSIX_NO_TRUNC
- return _POSIX_NO_TRUNC;
-#else
- return -1;
+#if _POSIX_NO_TRUNC == -1
+# error "Invalid value for _POSIX_NO_TRUNC"
#endif
+ return _POSIX_NO_TRUNC;
case _PC_VDISABLE:
-#ifdef _POSIX_VDISABLE
- return _POSIX_VDISABLE;
-#else
- return -1;
+#if _POSIX_VDISABLE == -1
+# error "Invalid value for _POSIX_VDISABLE"
#endif
+ return _POSIX_VDISABLE;
case _PC_SYNC_IO:
#ifdef _POSIX_SYNC_IO
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/posix/fpathconf.c | 21 +++++++++------------
sysdeps/posix/pathconf.c | 21 +++++++++------------
3 files changed, 24 insertions(+), 24 deletions(-)
hooks/post-receive
--
GNU C Library master sources