17c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/* 27c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru****************************************************************************** 37c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 41b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert* Copyright (C) 1997-2015, International Business Machines 57c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* Corporation and others. All Rights Reserved. 67c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 77c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru****************************************************************************** 87c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 97c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* FILE NAME : platform.h 107c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 117c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* Date Name Description 127c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 05/13/98 nos Creation (content moved here from ptypes.h). 137c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 03/02/99 stephen Added AS400 support. 147c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 03/30/99 stephen Added Linux support. 157c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru* 04/13/99 stephen Reworked for autoconf. 167c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru****************************************************************************** 177c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru*/ 187c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 1985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#ifndef _PLATFORM_H 2085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#define _PLATFORM_H 2185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 22103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#include "unicode/uconfig.h" 23103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#include "unicode/uvernum.h" 24103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 257c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/** 26103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \file 27103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \brief Basic types for the platform. 28103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 29103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * This file used to be generated by autoconf/configure. 30103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Starting with ICU 49, platform.h is a normal source file, 31103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * to simplify cross-compiling and working with non-autoconf/make build systems. 32103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 33103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * When a value in this file does not work on a platform, then please 34103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * try to derive it from the U_PLATFORM value 35103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (for which we might need a new value constant in rare cases) 36103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * and/or from other macros that are predefined by the compiler 37103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * or defined in standard (POSIX or platform or compiler) headers. 38103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 3954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * As a temporary workaround, you can add an explicit <code>#define</code> for some macros 40103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * before it is first tested, or add an equivalent -D macro definition 41103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * to the compiler's command line. 42103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 43103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Note: Some compilers provide ways to show the predefined macros. 44103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * For example, with gcc you can compile an empty .c file and have the compiler 45103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * print the predefined macros with 46103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \code 47103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * gcc -E -dM -x c /dev/null | sort 48103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \endcode 49103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (You can provide an actual empty .c file rather than /dev/null. 50103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <code>-x c++</code> is for C++.) 517c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru */ 527c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 53103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 5454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Define some things so that they can be documented. 5554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * @internal 5654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius */ 5754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#ifdef U_IN_DOXYGEN 5854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/* 5954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Problem: "platform.h:335: warning: documentation for unknown define U_HAVE_STD_STRING found." means that U_HAVE_STD_STRING is not documented. 6054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Solution: #define any defines for non @internal API here, so that they are visible in the docs. If you just set PREDEFINED in Doxyfile.in, they won't be documented. 6154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius */ 6254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 6354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/* None for now. */ 6454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#endif 6554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 6654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/** 67103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM 68103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * The U_PLATFORM macro defines the platform we're on. 69103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 70103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * We used to define one different, value-less macro per platform. 71103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * That made it hard to know the set of relevant platforms and macros, 72103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * and hard to deal with variants of platforms. 73103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 74103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Starting with ICU 49, we define platforms as numeric macros, 75103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * with ranges of values for related platforms and their variants. 76103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * The U_PLATFORM macro is set to one of these values. 77103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 78103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Historical note from the Solaris Wikipedia article: 79103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * AT&T and Sun collaborated on a project to merge the most popular Unix variants 80103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * on the market at that time: BSD, System V, and Xenix. 81103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * This became Unix System V Release 4 (SVR4). 82103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 83103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 84103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 85103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 86103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** Unknown platform. @internal */ 87103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_UNKNOWN 0 88103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** Windows @internal */ 89103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_WINDOWS 1000 90103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** MinGW. Windows, calls to Win32 API, but using GNU gcc and binutils. @internal */ 91103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_MINGW 1800 92103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 93103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Cygwin. Windows, calls to cygwin1.dll for Posix functions, 94103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * using MSVC or GNU gcc and binutils. 95103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 96103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 97103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_CYGWIN 1900 98103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/* Reserve 2000 for U_PF_UNIX? */ 99103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** HP-UX is based on UNIX System V. @internal */ 100103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_HPUX 2100 101103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** Solaris is a Unix operating system based on SVR4. @internal */ 102103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_SOLARIS 2600 103103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** BSD is a UNIX operating system derivative. @internal */ 104103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_BSD 3000 105103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** AIX is based on UNIX System V Releases and 4.3 BSD. @internal */ 106103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_AIX 3100 107103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** IRIX is based on UNIX System V with BSD extensions. @internal */ 108103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_IRIX 3200 109103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 110103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Darwin is a POSIX-compliant operating system, composed of code developed by Apple, 111103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * as well as code derived from NeXTSTEP, BSD, and other projects, 112103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * built around the Mach kernel. 113103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Darwin forms the core set of components upon which Mac OS X, Apple TV, and iOS are based. 114103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (Original description modified from WikiPedia.) 115103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 116103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 117103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_DARWIN 3500 118103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** iPhone OS (iOS) is a derivative of Mac OS X. @internal */ 119103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_IPHONE 3550 120103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** QNX is a commercial Unix-like real-time operating system related to BSD. @internal */ 121103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_QNX 3700 122103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** Linux is a Unix-like operating system. @internal */ 123103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_LINUX 4000 1241b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert/** 1251b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert * Native Client is pretty close to Linux. 1261b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert * See https://developer.chrome.com/native-client and 1271b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert * http://www.chromium.org/nativeclient 1281b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert * @internal 1291b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert */ 1301b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert#define U_PF_BROWSER_NATIVE_CLIENT 4020 131103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** Android is based on Linux. @internal */ 132103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_ANDROID 4050 1331b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert/* Maximum value for Linux-based platform is 4499 */ 134103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** z/OS is the successor to OS/390 which was the successor to MVS. @internal */ 135103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_OS390 9000 136103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** "IBM i" is the current name of what used to be i5/OS and earlier OS/400. @internal */ 137103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_PF_OS400 9400 138103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 139103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM 140103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 141103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__MINGW32__) 142103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_MINGW 143103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__CYGWIN__) 144103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_CYGWIN 145103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 146103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_WINDOWS 147103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__ANDROID__) 148103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_ANDROID 149103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Android wchar_t support depends on the API level. */ 150103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# include <android/api-level.h> 1511b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert#elif defined(__native_client__) 1521b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert# define U_PLATFORM U_PF_BROWSER_NATIVE_CLIENT 153103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(linux) || defined(__linux__) || defined(__linux) 154103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_LINUX 15559d709d503bab6e2b61931737e662dd293b40578ccornelius#elif defined(__APPLE__) && defined(__MACH__) 15659d709d503bab6e2b61931737e662dd293b40578ccornelius# include <TargetConditionals.h> 15759d709d503bab6e2b61931737e662dd293b40578ccornelius# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */ 15859d709d503bab6e2b61931737e662dd293b40578ccornelius# define U_PLATFORM U_PF_IPHONE 15959d709d503bab6e2b61931737e662dd293b40578ccornelius# else 16059d709d503bab6e2b61931737e662dd293b40578ccornelius# define U_PLATFORM U_PF_DARWIN 16159d709d503bab6e2b61931737e662dd293b40578ccornelius# endif 16254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) 163c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# if defined(__FreeBSD__) 164c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# include <sys/endian.h> 165c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# endif 166103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_BSD 167103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(sun) || defined(__sun) 168103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris from SunOS? */ 169103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_SOLARIS 170103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# if defined(__GNUC__) 171103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Solaris/GCC needs this header file to get the proper endianness. Normally, this 172103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * header file is included with stddef.h but on Solairs/GCC, the GCC version of stddef.h 173103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * is included which does not include this header file. 174103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 175103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# include <sys/isa_defs.h> 176103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# endif 177103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_AIX) || defined(__TOS_AIX__) 178103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_AIX 179103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_hpux) || defined(hpux) || defined(__hpux) 180103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_HPUX 181103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(sgi) || defined(__sgi) 182103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_IRIX 183103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__QNX__) || defined(__QNXNTO__) 184103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_QNX 185103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__TOS_MVS__) 186103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_OS390 187103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__OS400__) || defined(__TOS_OS400__) 188103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_OS400 189103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 190103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM U_PF_UNKNOWN 19127f654740f2a26ad62a5c155af9199af9e69b889claireho#endif 19227f654740f2a26ad62a5c155af9199af9e69b889claireho 19327f654740f2a26ad62a5c155af9199af9e69b889claireho/** 194103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def CYGWINMSVC 195103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defined if this is Windows with Cygwin, but using MSVC rather than gcc. 196103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Otherwise undefined. 19727f654740f2a26ad62a5c155af9199af9e69b889claireho * @internal 19827f654740f2a26ad62a5c155af9199af9e69b889claireho */ 199103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/* Commented out because this is already set in mh-cygwin-msvc 200103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#if U_PLATFORM == U_PF_CYGWIN && defined(_MSC_VER) 201103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define CYGWINMSVC 20227f654740f2a26ad62a5c155af9199af9e69b889claireho#endif 203103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius*/ 20427f654740f2a26ad62a5c155af9199af9e69b889claireho 205103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 206103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM_USES_ONLY_WIN32_API 207103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the platform uses only the Win32 API. 208103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Set to 1 for Windows/MSVC and MinGW but not Cygwin. 209103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 210103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 211103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM_USES_ONLY_WIN32_API 212103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 213103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif (U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_MINGW) || defined(CYGWINMSVC) 214103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_USES_ONLY_WIN32_API 1 215103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 216103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Cygwin implements POSIX. */ 217103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_USES_ONLY_WIN32_API 0 218103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif 219103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 220103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 221103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM_HAS_WIN32_API 222103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the Win32 API is available on the platform. 223103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Set to 1 for Windows/MSVC, MinGW and Cygwin. 224103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 225103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 226103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM_HAS_WIN32_API 227103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 228103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN 229103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_HAS_WIN32_API 1 230103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 231103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_HAS_WIN32_API 0 232103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif 233103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 234103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 235103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM_IMPLEMENTS_POSIX 236103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the platform implements (most of) the POSIX API. 237103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Set to 1 for Cygwin and most other platforms. 238103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 239103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 240103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM_IMPLEMENTS_POSIX 241103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 242f9878a236aa0d9662d8e40cafdaf2e04cd615835ccornelius#elif U_PLATFORM_USES_ONLY_WIN32_API 243103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IMPLEMENTS_POSIX 0 244103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 245103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IMPLEMENTS_POSIX 1 246b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#endif 247b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho 248103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 249103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM_IS_LINUX_BASED 250103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the platform is Linux or one of its derivatives. 251103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 252103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 253103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM_IS_LINUX_BASED 254103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 2551b7d32f919554dda9c193b32188251337bc756f1Fredrik Roubert#elif U_PF_LINUX <= U_PLATFORM && U_PLATFORM <= 4499 256103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IS_LINUX_BASED 1 257103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 258103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IS_LINUX_BASED 0 259103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif 26027f654740f2a26ad62a5c155af9199af9e69b889claireho 261103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 262103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_PLATFORM_IS_DARWIN_BASED 263103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the platform is Darwin or one of its derivatives. 264103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 265103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 266103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_PLATFORM_IS_DARWIN_BASED 267103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 268103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PF_DARWIN <= U_PLATFORM && U_PLATFORM <= U_PF_IPHONE 269103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IS_DARWIN_BASED 1 270103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 271103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_PLATFORM_IS_DARWIN_BASED 0 2727c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 2737c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 27485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** 275103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_STDINT_H 276103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether stdint.h is available. It is a C99 standard header. 277103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * We used to include inttypes.h which includes stdint.h but we usually do not need 278103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * the additional definitions from inttypes.h. 27927f654740f2a26ad62a5c155af9199af9e69b889claireho * @internal 28027f654740f2a26ad62a5c155af9199af9e69b889claireho */ 281103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_STDINT_H 282103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 283103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM_USES_ONLY_WIN32_API 2848393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600) 285103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Windows Visual Studio 9 and below do not have stdint.h & inttypes.h, but VS 2010 adds them. */ 286103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_STDINT_H 1 287103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# else 288103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_STDINT_H 0 289103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# endif 290103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_SOLARIS 291103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Solaris has inttypes.h but not stdint.h. */ 292103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_STDINT_H 0 29354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) 29454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ 29554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_HAVE_STDINT_H 0 296103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 297103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_STDINT_H 1 29885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 29985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 300103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 301103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_INTTYPES_H 302103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether inttypes.h is available. It is a C99 standard header. 303103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * We include inttypes.h where it is available but stdint.h is not. 304103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 305103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 306103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_INTTYPES_H 307103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 308103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_SOLARIS 309103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Solaris has inttypes.h but not stdint.h. */ 310103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_INTTYPES_H 1 31154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER) 31254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius /* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */ 31354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_HAVE_INTTYPES_H 1 314103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 315103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Most platforms have both inttypes.h and stdint.h, or neither. */ 316103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H 3177c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 3187c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 31985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** 320103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_IOSTREAM_SOURCE 321103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines what support for C++ streams is available. 322103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 323103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available 324103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (the ISO/IEC C++ FDIS was published in November 1997), and then 3257c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * one should qualify streams using the std namespace in ICU header 3267c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * files. 327103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Starting with ICU 49, this is the only supported version. 328103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 329103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is 330103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * available instead (in June 1985 Stroustrup published 3317c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * "An Extensible I/O Facility for C++" at the summer USENIX conference). 332103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Starting with ICU 49, this version is not supported any more. 333103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 334103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * If U_IOSTREAM_SOURCE is 0 (or any value less than 199711), 335103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * then C++ streams are not available and 3367c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * support for them will be silently suppressed in ICU. 3377c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * 338103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 3397c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru */ 3407c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#ifndef U_IOSTREAM_SOURCE 3417c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#define U_IOSTREAM_SOURCE 199711 3427c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 3437c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 34485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** 34585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho * \def U_HAVE_STD_STRING 346103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the standard C++ (STL) <string> header is available. 34727f654740f2a26ad62a5c155af9199af9e69b889claireho * @internal 34885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho */ 349103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_STD_STRING 350103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 35185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#else 352103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_STD_STRING 1 35385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 35485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 3557c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 35627f654740f2a26ad62a5c155af9199af9e69b889claireho/** @{ Compiler and environment features */ 3577c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 3587c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 359103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 36054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * \def U_GCC_MAJOR_MINOR 36154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Indicates whether the compiler is gcc (test for != 0), 36254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * and if so, contains its major (times 100) and minor version numbers. 36354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0. 36454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * 36554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * For example, for testing for whether we have gcc, and whether it's 4.6 or higher, 36654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * use "#if U_GCC_MAJOR_MINOR >= 406". 36754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * @internal 36854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius */ 36954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#ifdef __GNUC__ 37054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_GCC_MAJOR_MINOR (__GNUC__ * 100 + __GNUC_MINOR__) 37154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#else 37254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_GCC_MAJOR_MINOR 0 37354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#endif 37454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 37554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/** 376103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_IS_BIG_ENDIAN 377103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Determines the endianness of the platform. 378103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 379103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 380103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_IS_BIG_ENDIAN 381103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 382103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(BYTE_ORDER) && defined(BIG_ENDIAN) 383103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) 384103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) 385103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* gcc */ 386103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) 387103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN) 388103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN 1 389103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN) 390103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN 0 391103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_OS390 || U_PLATFORM == U_PF_OS400 || defined(__s390__) || defined(__s390x__) 392103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* These platforms do not appear to predefine any endianness macros. */ 393103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN 1 394103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) 395103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* HPPA do not appear to predefine any endianness macros. */ 396103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN 1 39754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#elif defined(sparc) || defined(__sparc) || defined(__sparc__) 39854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius /* Some sparc based systems (e.g. Linux) do not predefine any endianness macros. */ 39954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_IS_BIG_ENDIAN 1 4007c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#else 401103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IS_BIG_ENDIAN 0 40227f654740f2a26ad62a5c155af9199af9e69b889claireho#endif 4037c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 404103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 405103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_PLACEMENT_NEW 406103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Determines whether to override placement new and delete for STL. 407103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.6 408103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 409103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_PLACEMENT_NEW 410103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 411103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__BORLANDC__) 412103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_PLACEMENT_NEW 0 413103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 414103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_PLACEMENT_NEW 1 4157c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 4167c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 417103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 418103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_DEBUG_LOCATION_NEW 419103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Define this to define the MFC debug version of the operator new. 420103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 421103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 3.4 422103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 423103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_DEBUG_LOCATION_NEW 424103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 425103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_MSC_VER) 426103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_DEBUG_LOCATION_NEW 1 427103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 428103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_DEBUG_LOCATION_NEW 0 4297c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 4307c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 43154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/* Compatibility with non clang compilers */ 43254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#ifndef __has_attribute 43354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define __has_attribute(x) 0 43454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#endif 435c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifndef __has_builtin 436c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define __has_builtin(x) 0 437c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 438c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifndef __has_feature 439c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define __has_feature(x) 0 440c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 441c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifndef __has_extension 442c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define __has_extension(x) 0 443c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 44454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 44554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/** 44654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * \def U_MALLOC_ATTR 44754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Attribute to mark functions as malloc-like 44854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * @internal 44954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius */ 45054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#if defined(__GNUC__) && __GNUC__>=3 45154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_MALLOC_ATTR __attribute__ ((__malloc__)) 45254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#else 45354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_MALLOC_ATTR 45454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#endif 45554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 45654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius/** 45754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * \def U_ALLOC_SIZE_ATTR 45854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Attribute to specify the size of the allocated buffer for malloc-like functions 45954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * @internal 46054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius */ 46154dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || __has_attribute(alloc_size) 46254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X))) 46354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y))) 46454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#else 46554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_ALLOC_SIZE_ATTR(X) 46654dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_ALLOC_SIZE_ATTR2(X,Y) 46754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#endif 46854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius 469c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert/** 470c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * \def U_CPLUSPLUS_VERSION 471c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * 0 if no C++; 1, 11, 14, ... if C++. 472c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * Support for specific features cannot always be determined by the C++ version alone. 473c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * @internal 474c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert */ 475c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifdef U_CPLUSPLUS_VERSION 476c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# if U_CPLUSPLUS_VERSION != 0 && !defined(__cplusplus) 477c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# undef U_CPLUSPLUS_VERSION 478c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_CPLUSPLUS_VERSION 0 479c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# endif 480c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert /* Otherwise use the predefined value. */ 481c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#elif !defined(__cplusplus) 482c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_CPLUSPLUS_VERSION 0 483c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#elif __cplusplus >= 201402L 484c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_CPLUSPLUS_VERSION 14 485c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#elif __cplusplus >= 201103L 486c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_CPLUSPLUS_VERSION 11 487c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#else 488c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert // C++98 or C++03 489c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_CPLUSPLUS_VERSION 1 490c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 491c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert 492c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert/** 493c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * \def U_HAVE_RVALUE_REFERENCES 494c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * Set to 1 if the compiler supports rvalue references. 495c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * C++11 feature, necessary for move constructor & move assignment. 496c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * @internal 497c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert */ 498c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifdef U_HAVE_RVALUE_REFERENCES 499c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert /* Use the predefined value. */ 500c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#elif U_CPLUSPLUS_VERSION >= 11 || __has_feature(cxx_rvalue_references) \ 501c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert || defined(__GXX_EXPERIMENTAL_CXX0X__) \ 502c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert || (defined(_MSC_VER) && _MSC_VER >= 1600) /* Visual Studio 2010 */ 503c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_HAVE_RVALUE_REFERENCES 1 504c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#else 505c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_HAVE_RVALUE_REFERENCES 0 506c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 507c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert 508c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert/** 509c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * \def U_NOEXCEPT 510c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * "noexcept" if supported, otherwise empty. 511c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * Some code, especially STL containers, uses move semantics of objects only 512c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * if the move constructor and the move operator are declared as not throwing exceptions. 513c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert * @internal 514c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert */ 515c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#ifdef U_NOEXCEPT 516c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert /* Use the predefined value. */ 517c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#elif U_CPLUSPLUS_VERSION >= 11 || __has_feature(cxx_noexcept) || __has_extension(cxx_noexcept) \ 518c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert || (defined(_MSC_VER) && _MSC_VER >= 1900) /* Visual Studio 2015 */ 519c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_NOEXCEPT noexcept 520c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#else 521c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# define U_NOEXCEPT 522c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert#endif 523c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert 524103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** @} */ 5257c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 526103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/*===========================================================================*/ 527103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** @{ Character data types */ 528103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/*===========================================================================*/ 5297c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 53027f654740f2a26ad62a5c155af9199af9e69b889claireho/** 531103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform. 532103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 53327f654740f2a26ad62a5c155af9199af9e69b889claireho */ 534103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_ASCII_FAMILY 0 53527f654740f2a26ad62a5c155af9199af9e69b889claireho 53627f654740f2a26ad62a5c155af9199af9e69b889claireho/** 537103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform. 538103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 53927f654740f2a26ad62a5c155af9199af9e69b889claireho */ 540103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_EBCDIC_FAMILY 1 54127f654740f2a26ad62a5c155af9199af9e69b889claireho 542103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 543103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_CHARSET_FAMILY 544103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 545103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <p>These definitions allow to specify the encoding of text 546103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * in the char data type as defined by the platform and the compiler. 547103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * It is enough to determine the code point values of "invariant characters", 548103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * which are the ones shared by all encodings that are in use 549103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * on a given platform.</p> 550103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 551103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <p>Those "invariant characters" should be all the uppercase and lowercase 552103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * latin letters, the digits, the space, and "basic punctuation". 553103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Also, '\\n', '\\r', '\\t' should be available.</p> 554103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 555103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <p>The list of "invariant characters" is:<br> 556103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \code 557103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * A-Z a-z 0-9 SPACE " % & ' ( ) * + , - . / : ; < = > ? _ 558103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \endcode 559103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <br> 560103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * (52 letters + 10 numbers + 20 punc/sym/space = 82 total)</p> 561103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 562103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <p>This matches the IBM Syntactic Character Set (CS 640).</p> 563103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 564103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * <p>In other words, all the graphic characters in 7-bit ASCII should 565103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * be safely accessible except the following:</p> 566103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 567103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \code 568103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '\' <backslash> 569103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '[' <left bracket> 570103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * ']' <right bracket> 571103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '{' <left brace> 572103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '}' <right brace> 573103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '^' <circumflex> 574103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '~' <tilde> 575103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '!' <exclamation mark> 576103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '#' <number sign> 577103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '|' <vertical line> 578103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '$' <dollar sign> 579103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '@' <commercial at> 580103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * '`' <grave accent> 581103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \endcode 582103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 583103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 584103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_CHARSET_FAMILY 585103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 586103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_OS390 && (!defined(__CHARSET_LIB) || !__CHARSET_LIB) 587103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CHARSET_FAMILY U_EBCDIC_FAMILY 588103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_OS400 && !defined(__UTF32__) 589103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CHARSET_FAMILY U_EBCDIC_FAMILY 590103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 591103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CHARSET_FAMILY U_ASCII_FAMILY 5927c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 5937c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 594103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 595103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_CHARSET_IS_UTF8 596103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 597103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Hardcode the default charset to UTF-8. 598103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 599103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * If this is set to 1, then 600103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - ICU will assume that all non-invariant char*, StringPiece, std::string etc. 601103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * contain UTF-8 text, regardless of what the system API uses 602103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - some ICU code will use fast functions like u_strFromUTF8() 603103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * rather than the more general and more heavy-weight conversion API (ucnv.h) 604103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - ucnv_getDefaultName() always returns "UTF-8" 605103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - ucnv_setDefaultName() is disabled and will not change the default charset 606103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - static builds of ICU are smaller 607103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - more functionality is available with the UCONFIG_NO_CONVERSION build-time 608103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * configuration option (see unicode/uconfig.h) 609103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * - the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable 610103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 611103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 4.2 612103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @see UCONFIG_NO_CONVERSION 613103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 614103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_CHARSET_IS_UTF8 615103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 616103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_ANDROID || U_PLATFORM_IS_DARWIN_BASED 617103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CHARSET_IS_UTF8 1 6182442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert#elif U_PLATFORM_IS_LINUX_BASED 6192442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert /* 6202442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert * Google-specific: Set to 1 to match the google3 execution environment's 6212442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert * use of UTF-8, on both Linux server and workstation machines. 6222442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert */ 6232442f75cd437f3aeadb3816a16ab55b44b80569bFredrik Roubert# define U_CHARSET_IS_UTF8 1 624103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 625103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CHARSET_IS_UTF8 0 6267c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 6277c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 62885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** @} */ 62985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 6307c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 631103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** @{ Information about wchar support */ 6327c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 63385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 634103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 635103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_WCHAR_H 636103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Indicates whether <wchar.h> is available (1) or not (0). Set to 1 by default. 637103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 638103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 639103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 640103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_WCHAR_H 641103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 642103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9 643103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 644103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Android before Gingerbread (Android 2.3, API level 9) did not support wchar_t. 645103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * The type and header existed, but the library functions did not work as expected. 646103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * The size of wchar_t was 1 but L"xyz" string literals had 32-bit units anyway. 647103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 648103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_WCHAR_H 0 6497c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#else 650103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_HAVE_WCHAR_H 1 65185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 65285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 653103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 654103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_SIZEOF_WCHAR_T 655103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * U_SIZEOF_WCHAR_T==sizeof(wchar_t) 656103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 657103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 658103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 659103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_SIZEOF_WCHAR_T 660103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 661f9878a236aa0d9662d8e40cafdaf2e04cd615835ccornelius#elif (U_PLATFORM == U_PF_ANDROID && __ANDROID_API__ < 9) 662103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 663103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Classic Mac OS and Mac OS X before 10.3 (Panther) did not support wchar_t or wstring. 664103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Newer Mac OS X has size 4. 665103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 666103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 1 667103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM_HAS_WIN32_API || U_PLATFORM == U_PF_CYGWIN 668103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 2 669103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_AIX 670103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 671103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * AIX 6.1 information, section "Wide character data representation": 672103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * "... the wchar_t datatype is 32-bit in the 64-bit environment and 673103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 16-bit in the 32-bit environment." 674103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * and 675103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * "All locales use Unicode for their wide character code values (process code), 676103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * except the IBM-eucTW codeset." 677103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 678103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# ifdef __64BIT__ 679103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 4 680103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# else 681103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 2 682103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# endif 683103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_OS390 684103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 685103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * z/OS V1R11 information center, section "LP64 | ILP32": 686103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * "In 31-bit mode, the size of long and pointers is 4 bytes and the size of wchar_t is 2 bytes. 687103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Under LP64, the size of long and pointer is 8 bytes and the size of wchar_t is 4 bytes." 688103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 689103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# ifdef _LP64 690103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 4 691103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# else 692103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 2 693103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# endif 694103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif U_PLATFORM == U_PF_OS400 695103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# if defined(__UTF32__) 696103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 697103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * LOCALETYPE(*LOCALEUTF) is specified. 698103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Wide-character strings are in UTF-32, 699103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * narrow-character strings are in UTF-8. 700103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 701103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 4 702103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# elif defined(__UCS2__) 703103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 704103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * LOCALETYPE(*LOCALEUCS2) is specified. 705103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Wide-character strings are in UCS-2, 706103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * narrow-character strings are in EBCDIC. 707103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 708103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 2 709103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 710103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 711103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * LOCALETYPE(*CLD) or LOCALETYPE(*LOCALE) is specified. 712103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Wide-character strings are in 16-bit EBCDIC, 713103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * narrow-character strings are in EBCDIC. 714103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 715103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 2 716103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# endif 717103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 718103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_SIZEOF_WCHAR_T 4 71985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 7207c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 72185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#ifndef U_HAVE_WCSCPY 722103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#define U_HAVE_WCSCPY U_HAVE_WCHAR_H 72385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 72485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 72585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** @} */ 72685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 7277c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/** 728103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_HAVE_CHAR16_T 729103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Defines whether the char16_t type is available for UTF-16 730103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * and u"abc" UTF-16 string literals are supported. 731103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * This is a new standard type and standard string literal syntax in C++0x 732103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * but has been available in some compilers before. 733103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @internal 734103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 735103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_HAVE_CHAR16_T 736103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 737103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 738103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* 739103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Notes: 740103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Visual Studio 10 (_MSC_VER>=1600) defines char16_t but 741103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * does not support u"abc" string literals. 742103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but 743103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * does not support u"abc" string literals. 74454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * C++11 and C11 require support for UTF-16 literals 745103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius */ 746c14898b482f76ecab9026615e2e4c6fe78358bdcFredrik Roubert# if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) 74754dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_HAVE_CHAR16_T 1 74854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# else 74954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# define U_HAVE_CHAR16_T 0 75054dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius# endif 751103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#endif 752103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius 753103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** 75485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho * @{ 7557c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru * \def U_DECLARE_UTF16 756103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Do not use this macro because it is not defined on all platforms. 757103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Use the UNICODE_STRING or U_STRING_DECL macros instead. 75827f654740f2a26ad62a5c155af9199af9e69b889claireho * @internal 7597c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru */ 760103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_DECLARE_UTF16 761103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 76254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius#elif U_HAVE_CHAR16_T \ 76354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \ 7647c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru || (defined(__HP_aCC) && __HP_aCC >= 035000) \ 76554dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius || (defined(__HP_cc) && __HP_cc >= 111106) 766103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_DECLARE_UTF16(string) u ## string 7677c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#elif U_SIZEOF_WCHAR_T == 2 \ 768103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius && (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__))) 769103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_DECLARE_UTF16(string) L ## string 770103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 771103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Leave U_DECLARE_UTF16 undefined. See unistr.h. */ 7727c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 7737c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 77485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** @} */ 77585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 7767c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 777103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/** @{ Symbol import-export control */ 7787c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*===========================================================================*/ 7797c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 780103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_EXPORT 781103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 782103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(U_STATIC_IMPLEMENTATION) 783103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT 784103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(__GNUC__) 785103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT __attribute__((visibility("default"))) 78685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ 78785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) 788103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT __global 7897c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/*#elif defined(__HP_aCC) || defined(__HP_cc) 790103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT __declspec(dllexport)*/ 791103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_MSC_VER) 792103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT __declspec(dllexport) 7937c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#else 794103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT 7957c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#endif 7967c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru 7977c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru/* U_CALLCONV is releated to U_EXPORT2 */ 798103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_EXPORT2 799103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 800103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_MSC_VER) 801103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT2 __cdecl 8027c971b21cb09c84a9bd948bdf2918b727d46992cJean-Baptiste Queru#else 803103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_EXPORT2 8041239be49940bf5c71eeef0790705c6e451a3168bKenny Root#endif 8051239be49940bf5c71eeef0790705c6e451a3168bKenny Root 806103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#ifdef U_IMPORT 807103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Use the predefined value. */ 808103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#elif defined(_MSC_VER) 809103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius /* Windows needs to export/import data. */ 810103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IMPORT __declspec(dllimport) 811103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 812103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_IMPORT 81327f654740f2a26ad62a5c155af9199af9e69b889claireho#endif 81427f654740f2a26ad62a5c155af9199af9e69b889claireho 81585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho/** 816103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * \def U_CALLCONV 817103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary 818103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * in callback function typedefs to make sure that the calling convention 819103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * is compatible. 820103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * 821103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * This is only used for non-ICU-API functions. 822103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * When a function is a public ICU API, 823103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * you must use the U_CAPI and U_EXPORT2 qualifiers. 824103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius * @stable ICU 2.0 82585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho */ 826103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) 827103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CALLCONV __cdecl 828103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius#else 829103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius# define U_CALLCONV U_EXPORT2 83085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 83185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 832103e9ffba2cba345d0078eb8b8db33249f81840aCraig Cornelius/* @} */ 83327f654740f2a26ad62a5c155af9199af9e69b889claireho 83485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho#endif 835