Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32a7deb

Browse files
committed
Define _POSIX_C_SOURCE as 200112L on Solaris.
This is an attempt to suppress some compiler warnings that appeared inthe wake of commit7f798ac: it seems that by default Solaris/illumosdeclares shmdt() to take "char *" not "void *". We'd like the systemheaders to provide modern POSIX APIs, and POSIX 2001 seems to be asmodern as is available there.illumos' standards(7) man page suggests that we might also need todefine __EXTENSIONS__, but let's see what happens with just this.Discussion:https://postgr.es/m/1654508.1733162761@sss.pgh.pa.us
1 parent3c5f9f1 commit32a7deb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

‎configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7590,10 +7590,10 @@ $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
75907590
fi
75917591
fi
75927592

7593-
# On Solaris, we needthis #define to get POSIX-conforming versions
7594-
# of many interfaces (sigwait, getpwuid_r, ...).
7593+
# On Solaris, we needthese #defines to get POSIX-conforming versions
7594+
# of many interfaces (sigwait, getpwuid_r,shmdt,...).
75957595
if test "$PORTNAME" = "solaris"; then
7596-
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7596+
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS"
75977597
fi
75987598

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

‎configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,10 @@ if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
693693
fi
694694
fi
695695

696-
# On Solaris, we needthis #define to get POSIX-conforming versions
697-
# of many interfaces (sigwait, getpwuid_r, ...).
696+
# On Solaris, we needthese #defines to get POSIX-conforming versions
697+
# of many interfaces (sigwait, getpwuid_r,shmdt,...).
698698
if test "$PORTNAME" = "solaris"; then
699-
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
699+
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS"
700700
fi
701701

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

‎meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ elif host_system == 'openbsd'
261261
elif host_system=='sunos'
262262
portname='solaris'
263263
export_fmt='-Wl,-M@0@'
264-
cppflags+='-D_POSIX_PTHREAD_SEMANTICS'
264+
# We need these #defines to get POSIX-conforming versions
265+
# of many interfaces (sigwait, getpwuid_r, shmdt, ...).
266+
cppflags+= ['-D_POSIX_C_SOURCE=200112L','-D_POSIX_PTHREAD_SEMANTICS' ]
265267

266268
elif host_system=='windows'
267269
portname='win32'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp