]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make sys/stat.h define S_IFSOCK, S_ISSOCK for XPG4 (bug 20076).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 17 May 2016 15:50:00 +0000 (15:50 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 17 May 2016 15:50:00 +0000 (15:50 +0000)
sys/stat.h should define S_IFSOCK and S_ISSOCK for XPG4 (XNS), but
does not.  This patch corrects the relevant header conditionals.

Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).

[BZ #20076]
* io/sys/stat.h (S_IFSOCK): Define for [__USE_XOPEN_EXTENDED]
instead of [__USE_UNIX98].
(S_ISSOCK): Likewise.
* conform/Makefile (test-xfail-XPG4/sys/stat.h/conform): Remove
variable.

ChangeLog
conform/Makefile
io/sys/stat.h

index 7d38ded1b730f6e676635b892a98cc09c6dcd2a0..2be1e2167633cb71b800fb6b5315e9bf8c9b06fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-05-17  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #20076]
+       * io/sys/stat.h (S_IFSOCK): Define for [__USE_XOPEN_EXTENDED]
+       instead of [__USE_UNIX98].
+       (S_ISSOCK): Likewise.
+       * conform/Makefile (test-xfail-XPG4/sys/stat.h/conform): Remove
+       variable.
+
        [BZ #20074]
        * stdlib/stdlib.h (rand_r): Declare if [__USE_POSIX199506], not if
        [__USE_POSIX].
index 8e9ad85772d08b1dc4610d2bd376f1233c56d52f..f668b2e19a489985f474d5e62ab3f4b8df4f07ca 100644 (file)
@@ -174,7 +174,6 @@ test-xfail-XPG4/arpa/inet.h/conform = yes
 test-xfail-XPG4/netdb.h/conform = yes
 test-xfail-XPG4/netinet/in.h/conform = yes
 test-xfail-XPG4/signal.h/conform = yes
-test-xfail-XPG4/sys/stat.h/conform = yes
 test-xfail-XPG4/sys/wait.h/conform = yes
 test-xfail-XPG4/ucontext.h/conform = yes
 test-xfail-POSIX/sys/wait.h/conform = yes
index 416d5647d46084bbfe7fdcf1843c674243e7fa67..6925f61ae52a1bfabc61e45cac323febeeb0960a 100644 (file)
@@ -115,7 +115,7 @@ __BEGIN_DECLS
 # ifdef __S_IFLNK
 #  define S_IFLNK      __S_IFLNK
 # endif
-# if (defined __USE_MISC || defined __USE_UNIX98) \
+# if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
      && defined __S_IFSOCK
 #  define S_IFSOCK     __S_IFSOCK
 # endif
@@ -140,7 +140,7 @@ __BEGIN_DECLS
 # define S_ISLNK(mode)  0
 #endif
 
-#if (defined __USE_UNIX98 || defined __USE_XOPEN2K) \
+#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K) \
     && defined __S_IFSOCK
 # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
 #elif defined __USE_XOPEN2K