Skip to content

Commit 8c76862

Browse files
committed
Fix gnu11 fallout on Solaris 10+
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
1 parent f9d53c2 commit 8c76862

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

libgomp/ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2014-11-05 Rainer Orth <[email protected]>
2+
3+
* config/posix/lock.c (_XOPEN_SOURCE) Define as 600.
4+
15
2014-10-06 Marek Polacek <[email protected]>
26

37
* testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.

libgomp/config/posix/lock.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
to do better and streamline the locking as well as reduce the size
3131
of the types exported. */
3232

33-
/* We need Unix98 extensions to get recursive locks. */
34-
#define _XOPEN_SOURCE 500
33+
/* We need UNIX98/XPG5 extensions to get recursive locks. Request XPG6 since
34+
Solaris requires this for C99 and later. */
35+
#define _XOPEN_SOURCE 600
3536

3637
#include "libgomp.h"
3738

libiberty/ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2014-11-05 Rainer Orth <[email protected]>
2+
3+
* sigsetmask.c (_POSIX_SOURCE): Remove.
4+
15
2014-10-28 Yury Gribov <[email protected]>
26

37
* strtoll.c: New file.

libiberty/sigsetmask.c

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ be the value @code{1}).
1515
1616
*/
1717

18-
#define _POSIX_SOURCE
1918
#include <ansidecl.h>
2019
/* Including <sys/types.h> seems to be needed by ISC. */
2120
#include <sys/types.h>

libobjc/ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2014-11-05 Rainer Orth <[email protected]>
2+
3+
* thr.c (_XOPEN_SOURCE): Define as 600.
4+
15
2014-07-27 Alan Modra <[email protected]>
26
Matthias Klose <[email protected]>
37

libobjc/thr.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
2727
#define _LIBOBJC
2828
/* The line below is needed for declarations of functions such as
2929
pthread_mutexattr_settype, without which gthr-posix.h may fail to
30-
compile within libobjc. */
31-
#define _XOPEN_SOURCE 500
30+
compile within libobjc. While we only need XPG5 for this, Solaris
31+
requires XPG6 for C99 and later. */
32+
#define _XOPEN_SOURCE 600
3233
#include "config.h"
3334
#include "tconfig.h"
3435
#include "coretypes.h"

0 commit comments

Comments
 (0)