]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix definition and testing of S_ISSOCK.
authorUlrich Drepper <drepper@redhat.com>
Sun, 4 Apr 2010 08:51:01 +0000 (01:51 -0700)
committerUlrich Drepper <drepper@redhat.com>
Sun, 4 Apr 2010 08:51:01 +0000 (01:51 -0700)
ChangeLog
conform/data/sys/stat.h-data
io/sys/stat.h

index 7db74b326cdb91fe8dfbcff2a41c8215742f936c..a178be5de4a9c854fdceec8fe7b8d3637fb698a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-04-04  Ulrich Drepper  <drepper@redhat.com>
 
+       * conform/data/sys/stat.h-data: Fix testing of S_IS* macros.
+
+       [BZ #11279]
+       * io/sys/stat.h: Always define S_ISSOCK for XPG6 and up.
+
        [BZ #11287]
        * csu/Makefile ($(objpfx)version-info.h): Handle newer kernel headers
        which don't define UTS_RELEASE.
index df39fd3d810843b50b06c9e69ae6b4305c7f4cb1..b0e10a4c7f4a75f095103395d6b542c06ffa1acc 100644 (file)
@@ -66,15 +66,14 @@ constant S_ISGID
 constant S_ISVTX
 #endif
 
-#if !defined POSIX && !defined POSIX2008
-macro S_IFMT
+#if !defined POSIX
 macro S_ISBLK
 macro S_ISCHR
 macro S_ISDIR
 macro S_ISFIFO
 macro S_ISREG
 macro S_ISLNK
-macro S_IFSOCK
+macro S_ISSOCK
 #endif
 
 // How to represent optional tests?
index 733a9278882a43d230f418e7484d1681925039cd..ac740cad38274dae63ad47a240a4e8b3f4a9d731 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009
+/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -143,9 +143,11 @@ __BEGIN_DECLS
 # define S_ISLNK(mode)  0
 #endif
 
-#if (defined __USE_BSD || defined __USE_UNIX98) \
+#if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \
     && defined __S_IFSOCK
 # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
+#elif defined __USE_XOPEN2K
+# define S_ISSOCK(mode) 0
 #endif
 
 /* These are from POSIX.1b.  If the objects are not implemented using separate