platform.h File Reference

Basic types for the platform. More...

`#include "unicode/uconfig.h"`
`#include "unicode/uvernum.h"`

Go to the source code of this file.

## Macros

#define | U_PF_UNKNOWN 0
| Unknown platform.
#define | U_PF_WINDOWS 1000
| Windows.
#define | U_PF_MINGW 1800
| MinGW.
#define | U_PF_CYGWIN 1900
| Cygwin.
#define | U_PF_HPUX 2100
| HP-UX is based on UNIX System V.
#define | U_PF_SOLARIS 2600
| Solaris is a Unix operating system based on SVR4.
#define | U_PF_BSD 3000
| BSD is a UNIX operating system derivative.
#define | U_PF_AIX 3100
| AIX is based on UNIX System V Releases and 4.3 BSD.
#define | U_PF_IRIX 3200
| IRIX is based on UNIX System V with BSD extensions.
#define | U_PF_DARWIN 3500
| Darwin is a POSIX-compliant operating system, composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other projects, built around the Mach kernel.
#define | U_PF_IPHONE 3550
| iPhone OS (iOS) is a derivative of Mac OS X.
#define | U_PF_QNX 3700
| QNX is a commercial Unix-like real-time operating system related to BSD.
#define | U_PF_LINUX 4000
| Linux is a Unix-like operating system.
#define | U_PF_BROWSER_NATIVE_CLIENT 4020
| Native Client is pretty close to Linux.
#define | U_PF_ANDROID 4050
| Android is based on Linux.
#define | U_PF_HAIKU 4080
| Haiku is a POSIX-ish platform.
#define | U_PF_FUCHSIA 4100
| Fuchsia is a POSIX-ish platform.
#define | U_PF_EMSCRIPTEN 5010
| Emscripten is a C++ transpiler for the Web that can target asm.js or WebAssembly.
#define | U_PF_OS390 9000
| z/OS is the successor to OS/390 which was the successor to MVS.
#define | U_PF_OS400 9400
| "IBM i" is the current name of what used to be i5/OS and earlier OS/400.
#define | U_PLATFORM U_PF_UNKNOWN
| Define some things so that they can be documented.
#define | U_REAL_MSVC
| Defined if the compiler is the real MSVC compiler (and not something like Clang setting _MSC_VER in order to compile Windows code that requires it).
#define | CYGWINMSVC
| Defined if this is Windows with Cygwin, but using MSVC rather than gcc.
#define | U_PLATFORM_USES_ONLY_WIN32_API 1
| Defines whether the platform uses only the Win32 API.
#define | U_PLATFORM_HAS_WIN32_API 1
| Defines whether the Win32 API is available on the platform.
#define | U_PLATFORM_HAS_WINUWP_API 0
| Defines whether target is intended for Universal Windows Platform API Set to 1 for Windows10 Release Solution Configuration.
#define | U_PLATFORM_IMPLEMENTS_POSIX 1
| Defines whether the platform implements (most of) the POSIX API.
#define | U_PLATFORM_IS_LINUX_BASED 1
| Defines whether the platform is Linux or one of its derivatives.
#define | U_PLATFORM_IS_DARWIN_BASED 1
| Defines whether the platform is Darwin or one of its derivatives.
#define | U_HAVE_CHAR16_T 0
| Defines whether the char16_t type is available for UTF-16 and u"abc" UTF-16 string literals are supported.
#define | U_GCC_MAJOR_MINOR 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | U_IS_BIG_ENDIAN 1
| Determines the endianness of the platform.
#define | U_HAVE_PLACEMENT_NEW 1
| Determines whether to override placement new and delete for STL.
#define | U_HAVE_DEBUG_LOCATION_NEW 0
| Define this to define the MFC debug version of the operator new.
#define | UPRV_HAS_ATTRIBUTE(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_CPP_ATTRIBUTE(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_DECLSPEC_ATTRIBUTE(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_BUILTIN(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_FEATURE(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_EXTENSION(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_HAS_WARNING(x) 0
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | UPRV_NO_SANITIZE_UNDEFINED
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | U_MALLOC_ATTR
| Attribute to mark functions as malloc-like.
#define | U_ALLOC_SIZE_ATTR(X)
| Attribute to specify the size of the allocated buffer for malloc-like functions.
#define | U_ALLOC_SIZE_ATTR2(X, Y)
| Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.
#define | U_CPLUSPLUS_VERSION 0
| 0 if no C++; 1, 11, 14, ... if C++.
#define | U_FALLTHROUGH
| Annotate intentional fall-through between switch labels.
#define | U_ASCII_FAMILY 0
| U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform.
#define | U_EBCDIC_FAMILY 1
| U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform.
#define | U_CHARSET_FAMILY U_EBCDIC_FAMILY
#define | U_CHARSET_IS_UTF8 1
| Hardcode the default charset to UTF-8.
#define | U_HAVE_WCHAR_H 0
| Indicates whether <wchar.h> is available (1) or not (0).
#define | U_SIZEOF_WCHAR_T 1
| U_SIZEOF_WCHAR_T==sizeof(wchar_t)
#define | U_HAVE_WCSCPY U_HAVE_WCHAR_H
| Indicates whether <wchar.h> is available (1) or not (0).
#define | U_DECLARE_UTF16(string) u ## string
| Do not use this macro because it is not defined on all platforms.
#define | U_EXPORT
#define | U_IMPORT
#define | U_HIDDEN
| This is used to mark internal structs declared within external classes, to prevent the internal structs from having the same visibility as the class within which they are declared.
#define | U_CALLCONV U_EXPORT2
| Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to make sure that the calling convention is compatible.
#define | U_CALLCONV_FPTR
| Similar to U_CALLCONV, but only used on function pointers.

## Detailed Description

Basic types for the platform.

This file used to be generated by autoconf/configure. Starting with ICU 49, platform.h is a normal source file, to simplify cross-compiling and working with non-autoconf/make build systems.

When a value in this file does not work on a platform, then please try to derive it from the U_PLATFORM value (for which we might need a new value constant in rare cases) and/or from other macros that are predefined by the compiler or defined in standard (POSIX or platform or compiler) headers.

As a temporary workaround, you can add an explicit #define for some macros before it is first tested, or add an equivalent -D macro definition to the compiler's command line.

Note: Some compilers provide ways to show the predefined macros. For example, with gcc you can compile an empty .c file and have the compiler print the predefined macros with

gcc -E -dM -x c /dev/null | sort

(You can provide an actual empty .c file rather than /dev/null. `-x c++` is for C++.)

Definition in file platform.h.

## Macro Definition Documentation

## CYGWINMSVC

#define CYGWINMSVC

Defined if this is Windows with Cygwin, but using MSVC rather than gcc.

Otherwise undefined.

Internal:
  Do not use. This API is for internal use only.

Definition at line 238 of file platform.h.

## U_ALLOC_SIZE_ATTR

#define U_ALLOC_SIZE_ATTR | ( |  | X | ) |

Attribute to specify the size of the allocated buffer for malloc-like functions.

Internal:
  Do not use. This API is for internal use only.

Definition at line 464 of file platform.h.

## U_ALLOC_SIZE_ATTR2

#define U_ALLOC_SIZE_ATTR2 | ( |  | X,
|  |  | Y
| ) |  |

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 465 of file platform.h.

## U_ASCII_FAMILY

#define U_ASCII_FAMILY 0

U_CHARSET_FAMILY is equal to this value when the platform is an ASCII based platform.

Character data types

Stable:
  ICU 2.0

Definition at line 529 of file platform.h.

## U_CALLCONV

#define U_CALLCONV U_EXPORT2

Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to make sure that the calling convention is compatible.

This is only used for non-ICU-API functions. When a function is a public ICU API, you must use the U_CAPI and U_EXPORT2 qualifiers.

Please note, you need to use U_CALLCONV after the *.

NO : "static const char U_CALLCONV *func( . . . )" YES: "static const char* U_CALLCONV func( . . . )"

Stable:
  ICU 2.0

Definition at line 846 of file platform.h.

## U_CALLCONV_FPTR

#define U_CALLCONV_FPTR

Similar to U_CALLCONV, but only used on function pointers.

Internal:
  Do not use. This API is for internal use only.

Definition at line 857 of file platform.h.

## U_CHARSET_FAMILY

#define U_CHARSET_FAMILY U_EBCDIC_FAMILY

These definitions allow to specify the encoding of text in the char data type as defined by the platform and the compiler. It is enough to determine the code point values of "invariant characters", which are the ones shared by all encodings that are in use on a given platform.

Those "invariant characters" should be all the uppercase and lowercase latin letters, the digits, the space, and "basic punctuation". Also, '\n', '\r', '\t' should be available.

The list of "invariant characters" is:

A-Z a-z 0-9 SPACE " % &amp; ' ( ) * + , - . / : ; < = > ? _

(52 letters + 10 numbers + 20 punc/sym/space = 82 total)

This matches the IBM Syntactic Character Set (CS 640).

In other words, all the graphic characters in 7-bit ASCII should be safely accessible except the following:

'\' <backslash>
'[' <left bracket>
']' <right bracket>
'{' <left brace>
'}' <right brace>
'^' <circumflex>
'~' <tilde>
'!' <exclamation mark>
'#' <number sign>
'|' <vertical line>
'$' <dollar sign>
'@' <commercial at>
'`' <grave accent>

Stable:
  ICU 2.0

Definition at line 582 of file platform.h.

## U_CHARSET_IS_UTF8

#define U_CHARSET_IS_UTF8 1

Hardcode the default charset to UTF-8.

If this is set to 1, then

- ICU will assume that all non-invariant char*, StringPiece, std::string etc. contain UTF-8 text, regardless of what the system API uses
- some ICU code will use fast functions like u_strFromUTF8() rather than the more general and more heavy-weight conversion API (ucnv.h)
- ucnv_getDefaultName() always returns "UTF-8"
- ucnv_setDefaultName() is disabled and will not change the default charset
- static builds of ICU are smaller
- more functionality is available with the UCONFIG_NO_CONVERSION build-time configuration option (see unicode/uconfig.h)

- the UCONFIG_NO_CONVERSION build option in uconfig.h is more usable

  Stable:
    ICU 4.2
  See also
    UCONFIG_NO_CONVERSION

Definition at line 613 of file platform.h.

## U_CPLUSPLUS_VERSION

#define U_CPLUSPLUS_VERSION 0

0 if no C++; 1, 11, 14, ... if C++.

Support for specific features cannot always be determined by the C++ version alone.

Internal:
  Do not use. This API is for internal use only.

Definition at line 477 of file platform.h.

## U_DECLARE_UTF16

#define U_DECLARE_UTF16 | ( |  | string | ) | u ## string

Do not use this macro because it is not defined on all platforms.

In C++, use std::u16string_view literals, see the UNICODE_STRING docs. In C, use u"UTF-16 literals". See also the public U_STRING_DECL macro.

Internal:
  Do not use. This API is for internal use only.

Definition at line 760 of file platform.h.

## U_EBCDIC_FAMILY

#define U_EBCDIC_FAMILY 1

U_CHARSET_FAMILY is equal to this value when the platform is an EBCDIC based platform.

Stable:
  ICU 2.0

Definition at line 535 of file platform.h.

## U_EXPORT

#define U_EXPORT

Symbol import-export control

Definition at line 789 of file platform.h.

## U_FALLTHROUGH

#define U_FALLTHROUGH

Annotate intentional fall-through between switch labels.

http://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough

Internal:
  Do not use. This API is for internal use only.

Definition at line 516 of file platform.h.

## U_GCC_MAJOR_MINOR

#define U_GCC_MAJOR_MINOR 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 339 of file platform.h.

## U_HAVE_CHAR16_T

#define U_HAVE_CHAR16_T 0

Defines whether the char16_t type is available for UTF-16 and u"abc" UTF-16 string literals are supported.

This is a new standard type and standard string literal syntax in C++11 but has been available in some compilers before.

Internal:
  Do not use. This API is for internal use only.

Definition at line 737 of file platform.h.

## U_HAVE_DEBUG_LOCATION_NEW

#define U_HAVE_DEBUG_LOCATION_NEW 0

Define this to define the MFC debug version of the operator new.

Stable:
  ICU 3.4

Definition at line 395 of file platform.h.

## U_HAVE_PLACEMENT_NEW

#define U_HAVE_PLACEMENT_NEW 1

Determines whether to override placement new and delete for STL.

Stable:
  ICU 2.6

Definition at line 381 of file platform.h.

## U_HAVE_WCHAR_H

#define U_HAVE_WCHAR_H 0

Indicates whether <wchar.h> is available (1) or not (0).

Information about wchar support
Set to 1 by default.

Stable:
  ICU 2.0

Definition at line 638 of file platform.h.

## U_HAVE_WCSCPY

#define U_HAVE_WCSCPY U_HAVE_WCHAR_H

Indicates whether <wchar.h> is available (1) or not (0).

Information about wchar support
Set to 1 by default.

Stable:
  ICU 2.0

Definition at line 712 of file platform.h.

## U_HIDDEN

#define U_HIDDEN

This is used to mark internal structs declared within external classes, to prevent the internal structs from having the same visibility as the class within which they are declared.

Internal:
  Do not use. This API is for internal use only.

Definition at line 823 of file platform.h.

## U_IMPORT

#define U_IMPORT

Symbol import-export control

Definition at line 808 of file platform.h.

## U_IS_BIG_ENDIAN

#define U_IS_BIG_ENDIAN 1

Determines the endianness of the platform.

Internal:
  Do not use. This API is for internal use only.

Definition at line 360 of file platform.h.

## U_MALLOC_ATTR

#define U_MALLOC_ATTR

Attribute to mark functions as malloc-like.

Internal:
  Do not use. This API is for internal use only.

Definition at line 450 of file platform.h.

## U_PF_AIX

#define U_PF_AIX 3100

AIX is based on UNIX System V Releases and 4.3 BSD.

Internal:
  Do not use. This API is for internal use only.

Definition at line 108 of file platform.h.

## U_PF_ANDROID

#define U_PF_ANDROID 4050

Android is based on Linux.

Internal:
  Do not use. This API is for internal use only.

Definition at line 134 of file platform.h.

## U_PF_BROWSER_NATIVE_CLIENT

#define U_PF_BROWSER_NATIVE_CLIENT 4020

Native Client is pretty close to Linux.

See https://developer.chrome.com/native-client and http://www.chromium.org/nativeclient

Internal:
  Do not use. This API is for internal use only.

Definition at line 132 of file platform.h.

## U_PF_BSD

#define U_PF_BSD 3000

BSD is a UNIX operating system derivative.

Internal:
  Do not use. This API is for internal use only.

Definition at line 106 of file platform.h.

## U_PF_CYGWIN

#define U_PF_CYGWIN 1900

Cygwin.

Windows, calls to cygwin1.dll for Posix functions, using MSVC or GNU gcc and binutils.

Internal:
  Do not use. This API is for internal use only.

Definition at line 99 of file platform.h.

## U_PF_DARWIN

#define U_PF_DARWIN 3500

Darwin is a POSIX-compliant operating system, composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other projects, built around the Mach kernel.

Darwin forms the core set of components upon which Mac OS X, Apple TV, and iOS are based. (Original description modified from WikiPedia.)

Internal:
  Do not use. This API is for internal use only.

Definition at line 119 of file platform.h.

## U_PF_EMSCRIPTEN

#define U_PF_EMSCRIPTEN 5010

Emscripten is a C++ transpiler for the Web that can target asm.js or WebAssembly.

It provides some POSIX-compatible wrappers and stubs and some Linux-like functionality, but is not fully compatible with either.

Internal:
  Do not use. This API is for internal use only.

Definition at line 147 of file platform.h.

## U_PF_FUCHSIA

#define U_PF_FUCHSIA 4100

Fuchsia is a POSIX-ish platform.

Internal:
  Do not use. This API is for internal use only.

Definition at line 138 of file platform.h.

## U_PF_HAIKU

#define U_PF_HAIKU 4080

Haiku is a POSIX-ish platform.

Internal:
  Do not use. This API is for internal use only.

Definition at line 136 of file platform.h.

## U_PF_HPUX

#define U_PF_HPUX 2100

HP-UX is based on UNIX System V.

Internal:
  Do not use. This API is for internal use only.

Definition at line 102 of file platform.h.

## U_PF_IPHONE

#define U_PF_IPHONE 3550

iPhone OS (iOS) is a derivative of Mac OS X.

Internal:
  Do not use. This API is for internal use only.

Definition at line 121 of file platform.h.

## U_PF_IRIX

#define U_PF_IRIX 3200

IRIX is based on UNIX System V with BSD extensions.

Internal:
  Do not use. This API is for internal use only.

Definition at line 110 of file platform.h.

## U_PF_LINUX

#define U_PF_LINUX 4000

Linux is a Unix-like operating system.

Internal:
  Do not use. This API is for internal use only.

Definition at line 125 of file platform.h.

## U_PF_MINGW

#define U_PF_MINGW 1800

MinGW.

Windows, calls to Win32 API, but using GNU gcc and binutils.

Internal:
  Do not use. This API is for internal use only.

Definition at line 93 of file platform.h.

## U_PF_OS390

#define U_PF_OS390 9000

z/OS is the successor to OS/390 which was the successor to MVS.

Internal:
  Do not use. This API is for internal use only.

Definition at line 149 of file platform.h.

## U_PF_OS400

#define U_PF_OS400 9400

"IBM i" is the current name of what used to be i5/OS and earlier OS/400.

Internal:
  Do not use. This API is for internal use only.

Definition at line 151 of file platform.h.

## U_PF_QNX

#define U_PF_QNX 3700

QNX is a commercial Unix-like real-time operating system related to BSD.

Internal:
  Do not use. This API is for internal use only.

Definition at line 123 of file platform.h.

## U_PF_SOLARIS

#define U_PF_SOLARIS 2600

Solaris is a Unix operating system based on SVR4.

Internal:
  Do not use. This API is for internal use only.

Definition at line 104 of file platform.h.

## U_PF_UNKNOWN

#define U_PF_UNKNOWN 0

Unknown platform.

Internal:
  Do not use. This API is for internal use only.

Definition at line 89 of file platform.h.

## U_PF_WINDOWS

#define U_PF_WINDOWS 1000

Windows.

Internal:
  Do not use. This API is for internal use only.

Definition at line 91 of file platform.h.

## U_PLATFORM

#define U_PLATFORM U_PF_UNKNOWN

Define some things so that they can be documented.

Internal:
  Do not use. This API is for internal use only.

The U_PLATFORM macro defines the platform we're on.

We used to define one different, value-less macro per platform. That made it hard to know the set of relevant platforms and macros, and hard to deal with variants of platforms.

Starting with ICU 49, we define platforms as numeric macros, with ranges of values for related platforms and their variants. The U_PLATFORM macro is set to one of these values.

Historical note from the Solaris Wikipedia article: AT&T and Sun collaborated on a project to merge the most popular Unix variants on the market at that time: BSD, System V, and Xenix. This became Unix System V Release 4 (SVR4).

Internal:
  Do not use. This API is for internal use only.

Definition at line 212 of file platform.h.

## U_PLATFORM_HAS_WIN32_API

#define U_PLATFORM_HAS_WIN32_API 1

Defines whether the Win32 API is available on the platform.

Set to 1 for Windows/MSVC, ClangCL, MinGW and Cygwin.

Internal:
  Do not use. This API is for internal use only.

Definition at line 265 of file platform.h.

## U_PLATFORM_HAS_WINUWP_API

#define U_PLATFORM_HAS_WINUWP_API 0

Defines whether target is intended for Universal Windows Platform API Set to 1 for Windows10 Release Solution Configuration.

Internal:
  Do not use. This API is for internal use only.

Definition at line 279 of file platform.h.

## U_PLATFORM_IMPLEMENTS_POSIX

#define U_PLATFORM_IMPLEMENTS_POSIX 1

Defines whether the platform implements (most of) the POSIX API.

Set to 1 for Cygwin and most other platforms.

Internal:
  Do not use. This API is for internal use only.

Definition at line 293 of file platform.h.

## U_PLATFORM_IS_DARWIN_BASED

#define U_PLATFORM_IS_DARWIN_BASED 1

Defines whether the platform is Darwin or one of its derivatives.

Internal:
  Do not use. This API is for internal use only.

Definition at line 317 of file platform.h.

## U_PLATFORM_IS_LINUX_BASED

#define U_PLATFORM_IS_LINUX_BASED 1

Defines whether the platform is Linux or one of its derivatives.

Internal:
  Do not use. This API is for internal use only.

Definition at line 304 of file platform.h.

## U_PLATFORM_USES_ONLY_WIN32_API

#define U_PLATFORM_USES_ONLY_WIN32_API 1

Defines whether the platform uses only the Win32 API.

Set to 1 for Windows/MSVC, ClangCL and MinGW but not Cygwin.

Internal:
  Do not use. This API is for internal use only.

Definition at line 250 of file platform.h.

## U_REAL_MSVC

#define U_REAL_MSVC

Defined if the compiler is the real MSVC compiler (and not something like Clang setting _MSC_VER in order to compile Windows code that requires it).

Otherwise undefined.

Internal:
  Do not use. This API is for internal use only.

Definition at line 223 of file platform.h.

## U_SIZEOF_WCHAR_T

#define U_SIZEOF_WCHAR_T 1

U_SIZEOF_WCHAR_T==sizeof(wchar_t)

Stable:
  ICU 2.0

Definition at line 656 of file platform.h.

## UPRV_HAS_ATTRIBUTE

#define UPRV_HAS_ATTRIBUTE | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 402 of file platform.h.

## UPRV_HAS_BUILTIN

#define UPRV_HAS_BUILTIN | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 417 of file platform.h.

## UPRV_HAS_CPP_ATTRIBUTE

#define UPRV_HAS_CPP_ATTRIBUTE | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 407 of file platform.h.

## UPRV_HAS_DECLSPEC_ATTRIBUTE

#define UPRV_HAS_DECLSPEC_ATTRIBUTE | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 412 of file platform.h.

## UPRV_HAS_EXTENSION

#define UPRV_HAS_EXTENSION | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 427 of file platform.h.

## UPRV_HAS_FEATURE

#define UPRV_HAS_FEATURE | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 422 of file platform.h.

## UPRV_HAS_WARNING

#define UPRV_HAS_WARNING | ( |  | x | ) | 0

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 432 of file platform.h.

## UPRV_NO_SANITIZE_UNDEFINED

#define UPRV_NO_SANITIZE_UNDEFINED

Indicates whether the compiler is gcc (test for != 0), and if so, contains its major (times 100) and minor version numbers.

Compiler and environment features
If the compiler is not gcc, then U_GCC_MAJOR_MINOR == 0.

For example, for testing for whether we have gcc, and whether it's 4.6 or higher, use "#if U_GCC_MAJOR_MINOR >= 406".

Internal:
  Do not use. This API is for internal use only.

Definition at line 439 of file platform.h.