Skip to content

Commit 3b08d52

Browse files
committed
Define __EXTENSIONS__ on Solaris, too.
Apparently, if you define _POSIX_C_SOURCE on Solaris, that's interpreted as "you get ONLY what's defined by POSIX". Results from BF member hake show that that breaks perl.h, and doubtless it'd cause more problems if we got past that. Adopt the suggestion from standards(7) that we also need to define __EXTENSIONS__, in hopes of un-breaking things. Discussion: https://postgr.es/m/[email protected]
1 parent 498f130 commit 3b08d52

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -7593,7 +7593,7 @@ fi
75937593
# On Solaris, we need these #defines to get POSIX-conforming versions
75947594
# of many interfaces (sigwait, getpwuid_r, shmdt, ...).
75957595
if test "$PORTNAME" = "solaris"; then
7596-
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS"
7596+
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
75977597
fi
75987598

75997599
# We already have this in Makefile.win32, but configure needs it too

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ fi
696696
# On Solaris, we need these #defines to get POSIX-conforming versions
697697
# of many interfaces (sigwait, getpwuid_r, shmdt, ...).
698698
if test "$PORTNAME" = "solaris"; then
699-
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS"
699+
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
700700
fi
701701

702702
# We already have this in Makefile.win32, but configure needs it too

meson.build

+5-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ elif host_system == 'sunos'
263263
export_fmt = '-Wl,-M@0@'
264264
# We need these #defines to get POSIX-conforming versions
265265
# of many interfaces (sigwait, getpwuid_r, shmdt, ...).
266-
cppflags += [ '-D_POSIX_C_SOURCE=200112L', '-D_POSIX_PTHREAD_SEMANTICS' ]
266+
cppflags += [
267+
'-D_POSIX_C_SOURCE=200112L',
268+
'-D__EXTENSIONS__',
269+
'-D_POSIX_PTHREAD_SEMANTICS',
270+
]
267271

268272
elif host_system == 'windows'
269273
portname = 'win32'

0 commit comments

Comments
 (0)