8000 Define _POSIX_C_SOURCE as 200112L on Solaris. · postgres/postgres@32a7deb · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","url":"/postgres/postgres/commit/32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","authoredDate":"2024-12-03T12:44:43.000-05:00","committedDate":"2024-12-03T12:44:43.000-05:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eDefine _POSIX_C_SOURCE as 200112L on Solaris.\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"This is an attempt to suppress some compiler warnings that appeared in\nthe wake of commit \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/postgres/postgres/commit/7f798aca1d5df290aafad41180baea0ae311b4ee/hovercard\" href=\"https://github.com/postgres/postgres/commit/7f798aca1d5df290aafad41180baea0ae311b4ee\"\u003e\u003ctt\u003e7f798ac\u003c/tt\u003e\u003c/a\u003e: it seems that by default Solaris/illumos\ndeclares shmdt() to take \"char *\" not \"void *\". We'd like the system\nheaders to provide modern POSIX APIs, and POSIX 2001 seems to be as\nmodern as is available there.\n\nillumos' standards(7) man page suggests that we might also need to\ndefine __EXTENSIONS__, but let's see what happens with just this.\n\nDiscussion: \u003ca href=\"https://postgr.es/m/1654508.1733162761@sss.pgh.pa.us\" rel=\"nofollow\"\u003ehttps://postgr.es/m/1654508.1733162761@sss.pgh.pa.us\u003c/a\u003e","authors":[{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false}],"committerAttribution":false,"committer":{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false},"parents":["3c5f9f12c807760f6d512957a863113b07a79dcb"],"globalRelayId":"C_kwDOAA4m0toAKDMyYTdkZWIyYTAyYmMzYzgxZDYxZWViOTQzYjAzZWQyMDEwZWFhYzk","sha1":"3c5f9f12c807760f6d512957a863113b07a79dcb","sha2":"32a7deb2a02bc3c81d61eeb943b03ed2010eaac9"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":7589,"text":"@@ -7590,10 +7590,10 @@ $as_echo \"#define PROFILE_PID_DIR 1\" \u003e\u003econfdefs.h","html":"@@ -7590,10 +7590,10 @@ $as_echo \u0026quot;#define PROFILE_PID_DIR 1\u0026quot; \u0026gt;\u0026gt;confdefs.h","displayNoNewLineWarning":false,"position":0,"left":7589,"right":7589},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7590,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":1,"left":7590,"right":7590},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7591,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":2,"left":7591,"right":7591},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7592,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":7592,"right":7592},{"stylingDirective":null,"type":"DELETION","blobLineNumber":7593,"text":"-# On Solaris, we need this #define to get POSIX-conforming versions","html":"-# On Solaris, we need \u003cspan class=\"x x-first x-last\"\u003ethis #define\u003c/span\u003e to get POSIX-conforming versions","displayNoNewLineWarning":false,"position":4,"left":7593,"right":7592},{"stylingDirective":null,"type":"DELETION","blobLineNumber":7594,"text":"-# of many interfaces (sigwait, getpwuid_r, ...).","html":"-# of many interfaces (sigwait, getpwuid_r, ...).","displayNoNewLineWarning":false,"position":5,"left":7594,"right":7592},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":7593,"text":"+# On Solaris, we need these #defines to get POSIX-conforming versions","html":"+# On Solaris, we need \u003cspan class=\"x x-first x-last\"\u003ethese #defines\u003c/span\u003e to get POSIX-conforming versions","displayNoNewLineWarning":false,"position":6,"left":7594,"right":7593},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":7594,"text":"+# of many interfaces (sigwait, getpwuid_r, shmdt, ...).","html":"+# of many interfaces (sigwait, getpwuid_r, \u003cspan class=\"x x-first x-last\"\u003eshmdt, \u003c/span\u003e...).","displayNoNewLineWarning":false,"position":7,"left":7594,"right":7594},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7595,"text":" if test \"$PORTNAME\" = \"solaris\"; then","html":" if test \u0026quot;$PORTNAME\u0026quot; = \u0026quot;solaris\u0026quot;; then","displayNoNewLineWarning":false,"position":8,"left":7595,"right":7595},{"stylingDirective":null,"type":"DELETION","blobLineNumber":7596,"text":"- CPPFLAGS=\"$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS\"","html":"- CPPFLAGS=\u0026quot;$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS\u0026quot;","displayNoNewLineWarning":false,"position":9,"left":7596,"right":7595},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":7596,"text":"+ CPPFLAGS=\"$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS\"","html":"+ CPPFLAGS=\u0026quot;$CPPFLAGS -\u003cspan class=\"x x-first x-last\"\u003eD_POSIX_C_SOURCE=200112L -\u003c/span\u003eD_POSIX_PTHREAD_SEMANTICS\u0026quot;","displayNoNewLineWarning":false,"position":10,"left":7596,"right":7596},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7597,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":11,"left":7597,"right":7597},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7598,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":7598,"right":7598},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7599,"text":" # We already have this in Makefile.win32, but configure needs it too","html":" # We already have this in Makefile.win32, but configure needs it too","displayNoNewLineWarning":false,"position":13,"left":7599,"right":7599}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":20331,"linesChanged":6,"newTreeEntry":{"lineCount":20331,"path":"configure","mode":100755,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"configure","mode":100755},"linesAdded":3,"linesDeleted":3,"path":"configure","pathDigest":"90d08e583c4c9c6f391b2ae90f819f600a6326928ea9512c9e0c6d98e9f29ac2","status":"MODIFIED","truncatedReason":null,"oldOid":"3c5f9f12c807760f6d512957a863113b07a79dcb","newOid":"32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","copilotChatReference":null,"deletedSha":"3c5f9f12c807760f6d512957a863113b07a79dcb","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":692,"text":"@@ -693,10 +693,10 @@ if test \"$enable_profiling\" = yes \u0026\u0026 test \"$ac_cv_prog_cc_g\" = yes; then","html":"@@ -693,10 +693,10 @@ if test \u0026quot;$enable_profiling\u0026quot; = yes \u0026amp;\u0026amp; test \u0026quot;$ac_cv_prog_cc_g\u0026quot; = yes; then","displayNoNewLineWarning":false,"position":0,"left":692,"right":692},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":693,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":1,"left":693,"right":693},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":694,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":2,"left":694,"right":694},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":695,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":695,"right":695},{"stylingDirective":null,"type":"DELETION","blobLineNumber":696,"text":"-# On Solaris, we need this #define to get POSIX-conforming versions","html":"-\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e On Solaris, we need \u003cspan class=\"x x-first x-last\"\u003ethis #define\u003c/span\u003e to get POSIX-conforming versions\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":696,"right":695},{"stylingDirective":null,"type":"DELETION","blobLineNumber":697,"text":"-# of many interfaces (sigwait, getpwuid_r, ...).","html":"-\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e of many interfaces (sigwait, getpwuid_r, ...).\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":697,"right":695},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":696,"text":"+# On Solaris, we need these #defines to get POSIX-conforming versions","html":"+\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e On Solaris, we need \u003cspan class=\"x x-first x-last\"\u003ethese #defines\u003c/span\u003e to get POSIX-conforming versions\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":697,"right":696},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":697,"text":"+# of many interfaces (sigwait, getpwuid_r, shmdt, ...).","html":"+\u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e of many interfaces (sigwait, getpwuid_r, \u003cspan class=\"x x-first x-last\"\u003eshmdt, \u003c/span\u003e...).\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":697,"right":697},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":698,"text":" if test \"$PORTNAME\" = \"solaris\"; then","html":" if test \u0026quot;$PORTNAME\u0026quot; = \u0026quot;solaris\u0026quot;; then","displayNoNewLineWarning":false,"position":8,"left":698,"right":698},{"stylingDirective":null,"type":"DELETION","blobLineNumber":699,"text":"- CPPFLAGS=\"$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS\"","html":"- CPPFLAGS=\"$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS\"","displayNoNewLineWarning":false,"position":9,"left":699,"right":698},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":699,"text":"+ CPPFLAGS=\"$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_POSIX_PTHREAD_SEMANTICS\"","html":"+ CPPFLAGS=\"$CPPFLAGS -\u003cspan class=\"x x-first x-last\"\u003eD_POSIX_C_SOURCE=200112L -\u003c/span\u003eD_POSIX_PTHREAD_SEMANTICS\"","displayNoNewLineWarning":false,"position":10,"left":699,"right":699},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":700,"text":" fi","html":" fi","displayNoNewLineWarning":false,"position":11,"left":700,"right":700},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":701,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":701,"right":701},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":702,"text":" # We already have this in Makefile.win32, but configure needs it too","html":" \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e We already have this in Makefile.win32, but configure needs it too\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":702,"right":702}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2490,"linesChanged":6,"newTreeEntry":{"lineCount":2490,"path":"configure.ac","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"configure.ac","mode":100644},"linesAdded":3,"linesDeleted":3,"path":"configure.ac","pathDigest":"49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810","status":"MODIFIED","truncatedReason":null,"oldOid":"3c5f9f12c807760f6d512957a863113b07a79dcb","newOid":"32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","copilotChatReference":null,"deletedSha":"3c5f9f12c807760f6d512957a863113b07a79dcb","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":260,"text":"@@ -261,7 +261,9 @@ elif host_system == 'openbsd'","html":"@@ -261,7 +261,9 @@ elif host_system == \u0026#39;openbsd\u0026#39;","displayNoNewLineWarning":false,"position":0,"left":260,"right":260},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":261,"text":" elif host_system == 'sunos'","html":" \u003cspan class=\"pl-k\"\u003eelif\u003c/span\u003e host_system \u003cspan class=\"pl-k\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003esunos\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":261,"right":261},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":262,"text":" portname = 'solaris'","html":" portname \u003cspan class=\"pl-k\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003esolaris\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":262,"right":262},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":263,"text":" export_fmt = '-Wl,-M@0@'","html":" export_fmt \u003cspan class=\"pl-k\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e-Wl,-M@0@\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":263,"right":263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":264,"text":"- cppflags += '-D_POSIX_PTHREAD_SEMANTICS'","html":"- cppflags \u003cspan class=\"pl-k\"\u003e+=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e-D_POSIX_PTHREAD_SEMANTICS\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":264,"right":263},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":264,"text":"+ # We need these #defines to get POSIX-conforming versions","html":"+ \u003cspan class=\"pl-c\"\u003e# We need these #defines to get POSIX-conforming versions\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":264,"right":264},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":265,"text":"+ # of many interfaces (sigwait, getpwuid_r, shmdt, ...).","html":"+ \u003cspan class=\"pl-c\"\u003e# of many interfaces (sigwait, getpwuid_r, shmdt, ...).\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":264,"right":265},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":266,"text":"+ cppflags += [ '-D_POSIX_C_SOURCE=200112L', '-D_POSIX_PTHREAD_SEMANTICS' ]","html":"+ cppflags \u003cspan class=\"pl-k\"\u003e+=\u003c/span\u003e [ \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e-D_POSIX_C_SOURCE=200112L\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e-D_POSIX_PTHREAD_SEMANTICS\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e ]","displayNoNewLineWarning":false,"position":7,"left":264,"right":266},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":267,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":265,"right":267},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":268,"text":" elif host_system == 'windows'","html":" \u003cspan class=\"pl-k\"\u003eelif\u003c/span\u003e host_system \u003cspan class=\"pl-k\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003ewindows\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":266,"right":268},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":269,"text":" portname = 'win32'","html":" portname \u003cspan class=\"pl-k\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003ewin32\u003cspan class=\"pl-pds\"\u003e\u0026#39;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":267,"right":269}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3730,"linesChanged":4,"newTreeEntry":{"lineCount":3730,"path":"meson.build","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"meson.build","mode":100644},"linesAdded":3,"linesDeleted":1,"path":"meson.build","pathDigest":"30d8f6be6320feeacf686be94f48c70869b52630e01ea625f0f15adc0d57c3e4","status":"MODIFIED","truncatedReason":null,"oldOid":"3c5f9f12c807760f6d512957a863113b07a79dcb","newOid":"32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","copilotChatReference":null,"deletedSha":"3c5f9f12c807760f6d512957a863113b07a79dcb","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/32a7deb2a02bc3c81d61eeb943b03ed2010eaac9","fileTreeExpanded":true,"headerInfo":{"additions":9,"deletions":7,"filesChanged":3,"filesChangedString":"3"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":3,"truncated":false,"byteCount":1597,"lineShownCount":39},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"KW_SSrSjXOyt-TVvjrr4kpZ2g7E_WqtCevH84CAMuciMMSeo9sE_BGeWpvlYsESeziU6OKoNptH6sCcLSAtLTQ"},"/users/diffview?diff=unified":{"post":"vDDqeKucwd4vK3ma_kM1N8-HByOFxFoCaoGKBX5G1PoZbh-a6f6iNuVE6gwoSYk7l9S-qhCTV5HqwFHuFkEmfw"},"/notifications/thread":{"post":"pQBCqBGbf9zsl0px38ZzihDy9APhjl6BomhEpbp18PtXzlHLaYuy_16TSl9QmGEI8PLQzlu_Rd9zU6iWHNR69g"}}},"title":"Define _POSIX_C_SOURCE as 200112L on Solaris. · postgres/postgres@32a7deb","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}

Commit 32a7deb

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

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 need this #define to get POSIX-conforming versions
7594-
# of many interfaces (sigwait, getpwuid_r, ...).
7593+
# On Solaris, we need these #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 need this #define to get POSIX-conforming versions
697-
# of many interfaces (sigwait, getpwuid_r, ...).
696+
# On Solaris, we need these #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)
0