Fix gnu11 fallout on Solaris 10+
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 5 Nov 2014 09:52:42 +0000 (09:52 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Wed, 5 Nov 2014 09:52:42 +0000 (09:52 +0000)
libobjc:
* thr.c (_XOPEN_SOURCE): Define as 600.

libiberty:
* sigsetmask.c (_POSIX_SOURCE): Remove.

libgomp:
* config/posix/lock.c (_XOPEN_SOURCE) Define as 600.

From-SVN: r217117

libgomp/ChangeLog
libgomp/config/posix/lock.c
libiberty/ChangeLog
libiberty/sigsetmask.c
libobjc/ChangeLog
libobjc/thr.c

index 661653e..b004551 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
+
 2014-10-06  Marek Polacek  <polacek@redhat.com>
 
        * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
index e1e38f4..c65e041 100644 (file)
@@ -30,8 +30,9 @@
    to do better and streamline the locking as well as reduce the size
    of the types exported.  */
 
-/* We need Unix98 extensions to get recursive locks.  */
-#define _XOPEN_SOURCE 500
+/* We need UNIX98/XPG5 extensions to get recursive locks.  Request XPG6 since
+   Solaris requires this for C99 and later.  */
+#define _XOPEN_SOURCE 600
 
 #include "libgomp.h"
 
index d30a80b..ff06b18 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * sigsetmask.c (_POSIX_SOURCE): Remove.
+
 2014-10-28  Yury Gribov  <y.gribov@samsung.com>
 
        * strtoll.c: New file.
index 3b708b1..f7a2424 100644 (file)
@@ -15,7 +15,6 @@ be the value @code{1}).
 
 */
 
-#define _POSIX_SOURCE
 #include <ansidecl.h>
 /* Including <sys/types.h> seems to be needed by ISC. */
 #include <sys/types.h>
index 6559fcc..1d0814d 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * thr.c (_XOPEN_SOURCE): Define as 600.
+
 2014-07-27  Alan Modra  <amodra@gmail.com>
            Matthias Klose  <doko@ubuntu.com>
 
index 27c7fe6..988c0ff 100644 (file)
@@ -27,8 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define _LIBOBJC
 /* The line below is needed for declarations of functions such as
    pthread_mutexattr_settype, without which gthr-posix.h may fail to
-   compile within libobjc.  */
-#define _XOPEN_SOURCE 500
+   compile within libobjc.  While we only need XPG5 for this, Solaris
+   requires XPG6 for C99 and later.  */
+#define _XOPEN_SOURCE 600
 #include "config.h"
 #include "tconfig.h"
 #include "coretypes.h"