From: Steven R. Loomis Date: Thu, 9 Mar 2017 02:12:45 +0000 (+0000) Subject: ICU-13016 solaris porting X-Git-Tag: release-59-rc~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f19978a35e808e9ac130a776d68f79975ab866bc;p=icu ICU-13016 solaris porting X-SVN-Rev: 39750 --- diff --git a/icu4c/source/common/uposixdefs.h b/icu4c/source/common/uposixdefs.h index 5750e652219..45ca1233ac7 100644 --- a/icu4c/source/common/uposixdefs.h +++ b/icu4c/source/common/uposixdefs.h @@ -58,4 +58,14 @@ # define _XOPEN_SOURCE_EXTENDED 1 #endif +/** + * Solaris says: + * "...it is invalid to compile an XPG6 or a POSIX.1-2001 application with anything other + * than a c99 or later compiler." + * Apparently C++11 is not "or later". Work around this. + */ +#if defined(__cplusplus) && (defined(sun) || defined(__sun)) && !defined (_STDC_C99) +# define _STDC_C99 +#endif + #endif /* __UPOSIXDEFS_H__ */ diff --git a/icu4c/source/config/mh-solaris b/icu4c/source/config/mh-solaris index 469b2100f7a..9fe95c0f49b 100644 --- a/icu4c/source/config/mh-solaris +++ b/icu4c/source/config/mh-solaris @@ -5,6 +5,10 @@ ## Copyright (c) 1999-2010, International Business Machines Corporation and ## others. All Rights Reserved. +## Flags for ICU 59+ +CXXFLAGS += -std=c++11 +CFLAGS += -std=c99 + ## Flags for position independent code SHAREDLIBCFLAGS = -KPIC SHAREDLIBCXXFLAGS = -KPIC