X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..a01113dcd0f39d5da295ef82785beff9ed86fe38:/icuSources/common/uposixdefs.h diff --git a/icuSources/common/uposixdefs.h b/icuSources/common/uposixdefs.h index c1ab8991..45ca1233 100644 --- a/icuSources/common/uposixdefs.h +++ b/icuSources/common/uposixdefs.h @@ -1,10 +1,12 @@ +// © 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 * @@ -52,22 +54,18 @@ * * 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__ */