]> git.saurik.com Git - apple/icu.git/blob - icuSources/tools/toolutil/platform_xopen_source_extended.h
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / platform_xopen_source_extended.h
1 /*
2 **********************************************************************
3 * Copyright (c) 2009, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 */
7 #ifndef _PLATFORM_XOPEN_SOURCE_EXTENDED_H
8 #define _PLATFORM_XOPEN_SOURCE_EXTENDED_H
9
10 #include "unicode/utypes.h"
11
12 /*
13 * z/OS needs this definition for timeval and to get usleep.
14 * We move this definition out of the various source files because
15 * there might be some platform issues when this is defined.
16 * See below.
17 */
18 #if !defined(_XOPEN_SOURCE_EXTENDED)
19 #define _XOPEN_SOURCE_EXTENDED 1
20 #endif
21
22 /*
23 * There is an issue with turning on _XOPEN_SOURCE_EXTENDED on certain platforms.
24 * A compatibility issue exists between turning on _XOPEN_SOURCE_EXTENDED and using
25 * standard C++ string class. As a result, standard C++ string class needs to be
26 * turned off for the follwing platforms:
27 * -AIX/VACPP
28 * -Solaris/GCC
29 */
30 #if (defined(U_AIX) && !defined(__GNUC__)) || (defined(U_SOLARIS) && defined(__GNUC__))
31 # if _XOPEN_SOURCE_EXTENDED && !defined(U_HAVE_STD_STRING)
32 # define U_HAVE_STD_STRING 0
33 # endif
34 #endif
35
36 #endif /* _PLATFORM_XOPEN_SOURCE_EXTENDED_H */