+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
-* Copyright (C) 2011, International Business Machines
+* Copyright (C) 2011-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: uposixdefs.h
-* encoding: US-ASCII
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
*
* z/OS needs this definition for timeval and to get usleep.
*/
-#if !defined(_XOPEN_SOURCE_EXTENDED)
+#if !defined(_XOPEN_SOURCE_EXTENDED) && defined(__TOS_MVS__)
# define _XOPEN_SOURCE_EXTENDED 1
#endif
-/*
- * There is an issue with turning on _XOPEN_SOURCE_EXTENDED on certain platforms.
- * A compatibility issue exists between turning on _XOPEN_SOURCE_EXTENDED and using
- * standard C++ string class. As a result, standard C++ string class needs to be
- * turned off for the follwing platforms:
- * -AIX/VACPP
- * -Solaris/GCC
+/**
+ * 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 (U_PLATFORM == U_PF_AIX && !defined(__GNUC__)) || (U_PLATFORM == U_PF_SOLARIS && defined(__GNUC__))
-# if _XOPEN_SOURCE_EXTENDED && !defined(U_HAVE_STD_STRING)
-# define U_HAVE_STD_STRING 0
-# endif
+#if defined(__cplusplus) && (defined(sun) || defined(__sun)) && !defined (_STDC_C99)
+# define _STDC_C99
#endif
#endif /* __UPOSIXDEFS_H__ */