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