]> granicus.if.org Git - icu/commitdiff
ICU-13016 solaris porting
authorSteven R. Loomis <srl@icu-project.org>
Thu, 9 Mar 2017 02:12:45 +0000 (02:12 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Thu, 9 Mar 2017 02:12:45 +0000 (02:12 +0000)
X-SVN-Rev: 39750

icu4c/source/common/uposixdefs.h
icu4c/source/config/mh-solaris

index 5750e6522197bd28051d6a6544218cedf676e1ee..45ca1233ac731af8a0eef1c2cc0ce181263e6242 100644 (file)
 #   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__ */
index 469b2100f7a6f8bafc2deea3c0d48d31a4db0771..9fe95c0f49b5a9de88fe4ab40156d600dfac69b3 100644 (file)
@@ -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