diff options
author | J. Rassi <rassi@10gen.com> | 2016-05-17 12:11:35 -0400 |
---|---|---|
committer | J. Rassi <rassi@10gen.com> | 2016-05-17 12:19:34 -0400 |
commit | 9e57365ae31417ea8334f1444444486c34d78f66 (patch) | |
tree | 8f9a981aed5c89db50d7c30099789e29afb98557 /src/third_party/icu4c-57.1 | |
parent | 8034ccf683e36a0dcd16c1d4548c44fb6be6214f (diff) | |
download | mongo-9e57365ae31417ea8334f1444444486c34d78f66.tar.gz |
SERVER-22371 Define _XOPEN_SOURCE_EXTENDED=0 for ICU on Solaris
Diffstat (limited to 'src/third_party/icu4c-57.1')
-rw-r--r-- | src/third_party/icu4c-57.1/source/SConscript | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/third_party/icu4c-57.1/source/SConscript b/src/third_party/icu4c-57.1/source/SConscript index ce63d4bf472..de0be5acf60 100644 --- a/src/third_party/icu4c-57.1/source/SConscript +++ b/src/third_party/icu4c-57.1/source/SConscript @@ -12,6 +12,20 @@ env.Append( ], ) +if env.TargetOSIs('solaris'): + # On Solaris, compile of certain files fails if the below define is not enabled. Specifically, + # files that include "source/common/uposixdefs.h" will have _XOPEN_SOURCE=600 and + # _XOPEN_SOURCE_EXTENDED=1 defined by default; if the file also includes <sys/feature_tests.h>, + # then the application is assumed to conform to the XPG4v2 specification, which generates an + # error because XPG4v2 programs are incompatible with C99. If we keep _XOPEN_SOURCE=600 but + # force _XOPEN_SOURCE_EXTENDED=0, then <sys/feature_tests.h> chooses XPG6, which resolves the + # error (since XPG6 is compatible with C99). + env.Append( + CPPDEFINES=[ + ('_XOPEN_SOURCE_EXTENDED', 0), + ], + ) + def removeIfPresent(lst, item): try: lst.remove(item) |