os/textandloc/fontservices/textshaperplugin/IcuSource/common/unicode/pwin32.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 ******************************************************************************
     3 *
     4 *   Copyright (C) 1997-2005, International Business Machines
     5 *   Corporation and others.  All Rights Reserved.
     6 *
     7 ******************************************************************************
     8 *
     9 *  FILE NAME : platform.h
    10 *
    11 *   Date        Name        Description
    12 *   05/13/98    nos         Creation (content moved here from ptypes.h).
    13 *   03/02/99    stephen     Added AS400 support.
    14 *   03/30/99    stephen     Added Linux support.
    15 *   04/13/99    stephen     Reworked for autoconf.
    16 ******************************************************************************
    17 */
    18 
    19  /**
    20   * \file
    21   * \brief Configuration constants for the Windows platform
    22   */
    23   
    24 /* Define the platform we're on. */
    25 #ifndef U_WINDOWS
    26 #define U_WINDOWS
    27 #endif
    28 
    29 #if defined(__BORLANDC__)
    30 #define U_HAVE_PLACEMENT_NEW 0
    31 #define U_HAVE_INTTYPES_H 1
    32 #define __STDC_CONSTANT_MACROS
    33 #endif
    34 
    35 /* _MSC_VER is used to detect the Microsoft compiler. */
    36 #if defined(_MSC_VER)
    37 #define U_INT64_IS_LONG_LONG 0
    38 #else
    39 #define U_INT64_IS_LONG_LONG 1
    40 #endif
    41 
    42 /* Define whether inttypes.h is available */
    43 #ifndef U_HAVE_INTTYPES_H
    44 #define U_HAVE_INTTYPES_H 0
    45 #endif
    46 
    47 /*
    48  * Define what support for C++ streams is available.
    49  *     If U_IOSTREAM_SOURCE is set to 199711, then <iostream> is available
    50  * (1997711 is the date the ISO/IEC C++ FDIS was published), and then
    51  * one should qualify streams using the std namespace in ICU header
    52  * files.
    53  *     If U_IOSTREAM_SOURCE is set to 198506, then <iostream.h> is
    54  * available instead (198506 is the date when Stroustrup published
    55  * "An Extensible I/O Facility for C++" at the summer USENIX conference).
    56  *     If U_IOSTREAM_SOURCE is 0, then C++ streams are not available and
    57  * support for them will be silently suppressed in ICU.
    58  *
    59  */
    60 
    61 #ifndef U_IOSTREAM_SOURCE
    62 #define U_IOSTREAM_SOURCE 199711
    63 #endif
    64 
    65 /* Determines whether specific types are available */
    66 #ifndef U_HAVE_INT8_T
    67 #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
    68 #endif
    69 
    70 #ifndef U_HAVE_UINT8_T
    71 #define U_HAVE_UINT8_T U_HAVE_INTTYPES_H
    72 #endif
    73 
    74 #ifndef U_HAVE_INT16_T
    75 #define U_HAVE_INT16_T U_HAVE_INTTYPES_H
    76 #endif
    77 
    78 #ifndef U_HAVE_UINT16_T
    79 #define U_HAVE_UINT16_T U_HAVE_INTTYPES_H
    80 #endif
    81 
    82 #ifndef U_HAVE_INT32_T
    83 #define U_HAVE_INT32_T U_HAVE_INTTYPES_H
    84 #endif
    85 
    86 #ifndef U_HAVE_UINT32_T
    87 #define U_HAVE_UINT32_T U_HAVE_INTTYPES_H
    88 #endif
    89 
    90 #ifndef U_HAVE_INT64_T
    91 #define U_HAVE_INT64_T U_HAVE_INTTYPES_H
    92 #endif
    93 
    94 #ifndef U_HAVE_UINT64_T
    95 #define U_HAVE_UINT64_T U_HAVE_INTTYPES_H
    96 #endif
    97 
    98 /* Define 64 bit limits */
    99 #if !U_INT64_IS_LONG_LONG
   100 #define INT64_C(x) ((int64_t)x)
   101 #define UINT64_C(x) ((uint64_t)x)
   102 /* else use the umachine.h definition */
   103 #endif
   104 
   105 /*===========================================================================*/
   106 /* Generic data types                                                        */
   107 /*===========================================================================*/
   108 
   109 /* If your platform does not have the <inttypes.h> header, you may
   110    need to edit the typedefs below. */
   111 #if U_HAVE_INTTYPES_H
   112 #include <inttypes.h>
   113 #else /* U_HAVE_INTTYPES_H */
   114 
   115 #if ! U_HAVE_INT8_T
   116 typedef signed char int8_t;
   117 #endif
   118 
   119 #if ! U_HAVE_UINT8_T
   120 typedef unsigned char uint8_t;
   121 #endif
   122 
   123 #if ! U_HAVE_INT16_T
   124 typedef signed short int16_t;
   125 #endif
   126 
   127 #if ! U_HAVE_UINT16_T
   128 typedef unsigned short uint16_t;
   129 #endif
   130 
   131 #if ! U_HAVE_INT32_T
   132 typedef signed int int32_t;
   133 #endif
   134 
   135 #if ! U_HAVE_UINT32_T
   136 typedef unsigned int uint32_t;
   137 #endif
   138 
   139 #if ! U_HAVE_INT64_T
   140 #if U_INT64_IS_LONG_LONG
   141     typedef signed long long int64_t;
   142 #else
   143     typedef signed __int64 int64_t;
   144 #endif
   145 #endif
   146 
   147 #if ! U_HAVE_UINT64_T
   148 #if U_INT64_IS_LONG_LONG
   149     typedef unsigned long long uint64_t;
   150 #else
   151     typedef unsigned __int64 uint64_t;
   152 #endif
   153 #endif
   154 #endif
   155 
   156 /*===========================================================================*/
   157 /* Compiler and environment features                                         */
   158 /*===========================================================================*/
   159 
   160 /* Define whether namespace is supported */
   161 #ifndef U_HAVE_NAMESPACE
   162 #define U_HAVE_NAMESPACE 1
   163 #endif
   164 
   165 /* Determines the endianness of the platform */
   166 #define U_IS_BIG_ENDIAN 0
   167 
   168 /* 1 or 0 to enable or disable threads.  If undefined, default is: enable threads. */
   169 #define ICU_USE_THREADS 1
   170 
   171 /* Windows currently only runs on x86 CPUs which currently all have strong memory models. */
   172 #define UMTX_STRONG_MEMORY_MODEL 1
   173 
   174 #ifndef U_DEBUG
   175 #ifdef _DEBUG
   176 #define U_DEBUG 1
   177 #else
   178 #define U_DEBUG 0
   179 #endif
   180 #endif
   181 
   182 #ifndef U_RELEASE
   183 #ifdef NDEBUG
   184 #define U_RELEASE 1
   185 #else
   186 #define U_RELEASE 0
   187 #endif
   188 #endif
   189 
   190 /* Determine whether to disable renaming or not. This overrides the
   191    setting in umachine.h which is for all platforms. */
   192 #ifndef U_DISABLE_RENAMING
   193 #define U_DISABLE_RENAMING 0
   194 #endif
   195 
   196 /* Determine whether to override new and delete. */
   197 #ifndef U_OVERRIDE_CXX_ALLOCATION
   198 #define U_OVERRIDE_CXX_ALLOCATION 1
   199 #endif
   200 /* Determine whether to override placement new and delete for STL. */
   201 #ifndef U_HAVE_PLACEMENT_NEW
   202 #define U_HAVE_PLACEMENT_NEW 1
   203 #endif
   204 /* Determine whether to override new and delete for MFC. */
   205 #if !defined(U_HAVE_DEBUG_LOCATION_NEW) && defined(_MSC_VER)
   206 #define U_HAVE_DEBUG_LOCATION_NEW 1
   207 #endif
   208 
   209 /* Determine whether to enable tracing. */
   210 #ifndef U_ENABLE_TRACING
   211 #define U_ENABLE_TRACING 1
   212 #endif
   213 
   214 /* Do we allow ICU users to use the draft APIs by default? */
   215 #ifndef U_DEFAULT_SHOW_DRAFT
   216 #define U_DEFAULT_SHOW_DRAFT 1
   217 #endif
   218 
   219 /* Define the library suffix in a C syntax. */
   220 #define U_HAVE_LIB_SUFFIX 0
   221 #define U_LIB_SUFFIX_C_NAME 
   222 #define U_LIB_SUFFIX_C_NAME_STRING ""
   223 
   224 /*===========================================================================*/
   225 /* Information about wchar support                                           */
   226 /*===========================================================================*/
   227 
   228 #define U_HAVE_WCHAR_H 1
   229 #define U_SIZEOF_WCHAR_T 2
   230 
   231 #define U_HAVE_WCSCPY 1
   232 
   233 /*===========================================================================*/
   234 /* Information about POSIX support                                           */
   235 /*===========================================================================*/
   236 
   237 #if 1
   238 #define U_TZSET         _tzset
   239 #endif
   240 #if 1
   241 #define U_TIMEZONE      _timezone
   242 #endif
   243 #if 1
   244 #define U_TZNAME        _tzname
   245 #endif
   246 
   247 #define U_HAVE_MMAP 0
   248 #define U_HAVE_POPEN 0
   249 
   250 /*===========================================================================*/
   251 /* Symbol import-export control                                              */
   252 /*===========================================================================*/
   253 
   254 #ifdef U_STATIC_IMPLEMENTATION
   255 #define U_EXPORT
   256 #else
   257 #define U_EXPORT __declspec(dllexport)
   258 #endif
   259 #define U_EXPORT2 __cdecl
   260 #define U_IMPORT __declspec(dllimport)
   261 
   262 /*===========================================================================*/
   263 /* Code alignment and C function inlining                                    */
   264 /*===========================================================================*/
   265 
   266 #ifndef U_INLINE
   267 #   ifdef __cplusplus
   268 #       define U_INLINE inline
   269 #   else
   270 #       define U_INLINE __inline
   271 #   endif
   272 #endif
   273 
   274 #if defined(_MSC_VER) && defined(_M_IX86)
   275 #define U_ALIGN_CODE(val)    __asm      align val
   276 #else
   277 #define U_ALIGN_CODE(val)
   278 #endif
   279 
   280 
   281 /*===========================================================================*/
   282 /* Programs used by ICU code                                                 */
   283 /*===========================================================================*/
   284 
   285 #ifndef U_MAKE
   286 #define U_MAKE  "nmake"
   287 #define U_MAKE_IS_NMAKE 1
   288 #endif