epoc32/include/stdapis/stlportv5/stl/c_locale.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/stlportv5/stl/c_locale.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/stlportv5/stl/c_locale.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,120 +1,105 @@
     1.4  /*
     1.5 - * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.6 + * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     1.7   *
     1.8   * Copyright (c) 1999
     1.9   * Silicon Graphics Computer Systems, Inc.
    1.10   *
    1.11 - * Copyright (c) 1999 
    1.12 + * Copyright (c) 1999
    1.13   * Boris Fomitchev
    1.14   *
    1.15   * This material is provided "as is", with absolutely no warranty expressed
    1.16   * or implied. Any use is at your own risk.
    1.17   *
    1.18 - * Permission to use or copy this software for any purpose is hereby granted 
    1.19 + * Permission to use or copy this software for any purpose is hereby granted
    1.20   * without fee, provided the above notices are retained on all copies.
    1.21   * Permission to modify the code and to distribute modified code is granted,
    1.22   * provided the above notices are retained, and a notice that the code was
    1.23   * modified is included with the above copyright notice.
    1.24   *
    1.25 - */ 
    1.26 + */
    1.27  
    1.28  
    1.29  #ifndef _STLP_C_LOCALE_H
    1.30 -# define _STLP_C_LOCALE_H
    1.31 +#define _STLP_C_LOCALE_H
    1.32  
    1.33  /*
    1.34 - * Implementation dependent definitions
    1.35 + * Implementation dependent definitions.
    1.36 + * Beware: This header is not a purely internal header, it is also included
    1.37 + * from the outside world when building the STLport library. So this header
    1.38 + * should not reference internal headers (stlport/stl/_*.h) directly.
    1.39   */
    1.40 -#ifdef __cplusplus
    1.41 -#  include <stl/_config.h>
    1.42 -#endif
    1.43 -
    1.44 -#if defined(__sgi) 
    1.45 -# if defined(ROOT_65) /* IRIX 6.5.x */
    1.46 -#  include <sgidefs.h>
    1.47 -#  include <standards.h>
    1.48 -#  include <wchar.h>
    1.49 -#  include <ctype.h>
    1.50 -
    1.51 -# else
    1.52 -                  /* IRIX pre-6.5 */
    1.53 -#  include <sgidefs.h>
    1.54 -#  include <standards.h>
    1.55 -
    1.56 -#  if !defined(_SIZE_T) && !defined(_SIZE_T_)
    1.57 -#   define _SIZE_T
    1.58 -#    if (_MIPS_SZLONG == 32)
    1.59 -typedef unsigned int    size_t;
    1.60 +#if defined (__sgi)
    1.61 +#  if defined (ROOT_65) /* IRIX 6.5.x */
    1.62 +#    include <sgidefs.h>
    1.63 +#    include <standards.h>
    1.64 +#    include <wchar.h>
    1.65 +#    include <ctype.h>
    1.66 +#  else /* IRIX pre-6.5 */
    1.67 +#    include <sgidefs.h>
    1.68 +#    include <standards.h>
    1.69 +#    if !defined(_SIZE_T) && !defined(_SIZE_T_)
    1.70 +#      define _SIZE_T
    1.71 +#      if (_MIPS_SZLONG == 32)
    1.72 +typedef unsigned int size_t;
    1.73 +#      endif
    1.74 +#      if (_MIPS_SZLONG == 64)
    1.75 +typedef unsigned long size_t;
    1.76 +#      endif
    1.77  #    endif
    1.78 -#    if (_MIPS_SZLONG == 64)
    1.79 -typedef unsigned long   size_t;
    1.80 -#    endif
    1.81 -#   endif
    1.82 -
    1.83 -#   ifndef _WCHAR_T
    1.84 -#    define _WCHAR_T
    1.85 -#     if (_MIPS_SZLONG == 32)
    1.86 +#    if !defined (_WCHAR_T)
    1.87 +#      define _WCHAR_T
    1.88 +#      if (_MIPS_SZLONG == 32)
    1.89  typedef long wchar_t;
    1.90 -#     endif
    1.91 -#     if (_MIPS_SZLONG == 64)
    1.92 +#      endif
    1.93 +#      if (_MIPS_SZLONG == 64)
    1.94  typedef __int32_t wchar_t;
    1.95 -#     endif
    1.96 +#      endif
    1.97  #    endif /* _WCHAR_T */
    1.98 -
    1.99 -#    ifndef _WINT_T
   1.100 -#     define _WINT_T
   1.101 -#     if (_MIPS_SZLONG == 32)
   1.102 -        typedef long    wint_t;
   1.103 -#     endif
   1.104 -#     if (_MIPS_SZLONG == 64)
   1.105 -        typedef __int32_t wint_t;
   1.106 -#     endif
   1.107 +#    if !defined (_WINT_T)
   1.108 +#      define _WINT_T
   1.109 +#      if (_MIPS_SZLONG == 32)
   1.110 +typedef long wint_t;
   1.111 +#      endif
   1.112 +#      if (_MIPS_SZLONG == 64)
   1.113 +typedef __int32_t wint_t;
   1.114 +#      endif
   1.115  #    endif /* _WINT_T */
   1.116 -
   1.117 -#    ifndef _MBSTATE_T
   1.118 -#    define _MBSTATE_T
   1.119 -#    ifdef _MSC_VER
   1.120 -		typedef int		mbstate_t;
   1.121 -#    else
   1.122 -        typedef char    mbstate_t;
   1.123 -#    endif
   1.124 +#    if !defined (_MBSTATE_T)
   1.125 +#      define _MBSTATE_T
   1.126 +/* _MSC_VER check is here for historical reason and seems wrong as it is the macro defined
   1.127 + * by Microsoft compilers to give their version and we are currently in a SGI platform scope.
   1.128 + * However _MSC_VER might also be a SGI compiler macro so we keep it this way.*/
   1.129 +#      if defined (_MSC_VER)
   1.130 +typedef int mbstate_t;
   1.131 +#      else
   1.132 +typedef char mbstate_t;
   1.133 +#      endif
   1.134  #    endif /* _MBSTATE_T */
   1.135 -
   1.136 -#   endif /* ROOT65 */ 
   1.137 -
   1.138 -#  else /* __sgi */
   1.139 -
   1.140 -# ifdef __cplusplus
   1.141 -# ifndef _STLP_CSTDDEF
   1.142 -#  include <cstddef>
   1.143 -# endif
   1.144 -# ifndef _STLP_CWCHAR_H
   1.145 -#  include <stl/_cwchar.h>
   1.146 -# endif
   1.147 -# ifndef _STLP_CCTYPE
   1.148 -#  include <cctype>
   1.149 -# endif
   1.150 -# else
   1.151 +#  endif /* ROOT65 */
   1.152 +#else /* __sgi */
   1.153  #  include <stddef.h>
   1.154  #  include <wchar.h>
   1.155  #  include <ctype.h>
   1.156 -# endif
   1.157 -
   1.158  #endif /* __sgi */
   1.159  
   1.160  /*
   1.161   * GENERAL FRAMEWORK
   1.162   */
   1.163  
   1.164 +/*
   1.165 + * Opaque types, implementation (if there is one) depends
   1.166 + * on platform locale API.
   1.167 + */
   1.168  struct _Locale_ctype;
   1.169  struct _Locale_numeric;
   1.170  struct _Locale_time;
   1.171  struct _Locale_collate;
   1.172  struct _Locale_monetary;
   1.173  struct _Locale_messages;
   1.174 +struct _Locale_name_hint;
   1.175  
   1.176  /*
   1.177 -  Bitmask macros.  
   1.178 +  Bitmask macros.
   1.179  */
   1.180  
   1.181  /*
   1.182 @@ -123,29 +108,29 @@
   1.183  
   1.184  /* Internal bitmask macros, os-specific. */
   1.185  
   1.186 -#if defined(__sgi)              /* IRIX */
   1.187 +#if defined (__sgi)              /* IRIX */
   1.188  
   1.189 -#define _Locale_S      0x00000008      /* Spacing character */
   1.190 -#define _Locale_A      0x00004000      /* Alphabetical characters only */
   1.191 -#define _Locale_B      0x00000040      /* Obsolete: was space char only */
   1.192 -#define _Locale_PR     0x00008000      /* Printable characters only */
   1.193 -#define _Locale_G      0x40000000      /* Graphic characters only */
   1.194 -#define _Locale_BL     0x80000000      /* The blank character class */
   1.195 +#  define _Locale_S      0x00000008      /* Spacing character */
   1.196 +#  define _Locale_A      0x00004000      /* Alphabetical characters only */
   1.197 +#  define _Locale_B      0x00000040      /* Obsolete: was space char only */
   1.198 +#  define _Locale_PR     0x00008000      /* Printable characters only */
   1.199 +#  define _Locale_G      0x40000000      /* Graphic characters only */
   1.200 +#  define _Locale_BL     0x80000000      /* The blank character class */
   1.201  
   1.202  /* Public bitmask macros, must be defined for every OS. These values, of
   1.203   * course, are specific to IRIX. */
   1.204  
   1.205 -#define _Locale_CNTRL  0x00000020      /* Control character */
   1.206 -#define _Locale_UPPER  0x00000001      /* Upper case */
   1.207 -#define _Locale_LOWER  0x00000002      /* Lower case */
   1.208 -#define _Locale_DIGIT  0x00000004      /* Numeral (digit) */
   1.209 -#define _Locale_XDIGIT 0x00000080      /* heXadecimal digit */
   1.210 -#define _Locale_PUNCT  0x00000010      /* Punctuation */
   1.211 -#define _Locale_SPACE  (_Locale_S | _Locale_BL)
   1.212 -#define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
   1.213 +#  define _Locale_CNTRL  0x00000020      /* Control character */
   1.214 +#  define _Locale_UPPER  0x00000001      /* Upper case */
   1.215 +#  define _Locale_LOWER  0x00000002      /* Lower case */
   1.216 +#  define _Locale_DIGIT  0x00000004      /* Numeral (digit) */
   1.217 +#  define _Locale_XDIGIT 0x00000080      /* heXadecimal digit */
   1.218 +#  define _Locale_PUNCT  0x00000010      /* Punctuation */
   1.219 +#  define _Locale_SPACE  (_Locale_S | _Locale_BL)
   1.220 +#  define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
   1.221                          _Locale_DIGIT | _Locale_A | _Locale_XDIGIT | \
   1.222                          _Locale_PR)
   1.223 -#define _Locale_ALPHA  _Locale_A
   1.224 +#  define _Locale_ALPHA  _Locale_A
   1.225  
   1.226  /*
   1.227  * All of these except for graph and blank are from the C standard;
   1.228 @@ -156,114 +141,114 @@
   1.229  #endif /* IRIX */
   1.230  
   1.231  
   1.232 -#if defined( __Lynx__ )
   1.233 - /* azov: On Lynx isalpha defined as (_U | _L), which gives us a mask 
   1.234 -  * unusable in ctype_table. So we have to redefine it and use hard-coded 
   1.235 +#if defined (__Lynx__)
   1.236 + /* azov: On Lynx isalpha defined as (_U | _L), which gives us a mask
   1.237 +  * unusable in ctype_table. So we have to redefine it and use hard-coded
   1.238    * numbers (to avoid potential clashes if system headers change).
   1.239    *
   1.240 -  * P.S. Actually, I see no reason in using platform-specific masks - 
   1.241 +  * P.S. Actually, I see no reason in using platform-specific masks -
   1.242    * having just one set of masks for all platforms should work just as
   1.243 -  * well - we only use them internally and they don't have to be equal 
   1.244 +  * well - we only use them internally and they don't have to be equal
   1.245    * to whatever defined in local ctype.h
   1.246    *
   1.247 -  */ 
   1.248 -#   define _Locale_CNTRL  040     /* _C, Control character */
   1.249 -#   define _Locale_UPPER  01      /* _U, Upper case */
   1.250 -#   define _Locale_LOWER  02      /* _L, Lower case */
   1.251 -#   define _Locale_DIGIT  04      /* _N, Numeral (digit) */
   1.252 -#   define _Locale_XDIGIT 0200    /* _X, heXadecimal digit */
   1.253 -#   define _Locale_PUNCT  020     /* _P, Punctuation */
   1.254 -#   define _Locale_SPACE  010     /* _S, Spacing */
   1.255 -#   define _Locale_ALPHA  040000  /* none, Alphanumerical */
   1.256 -#   define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
   1.257 -                           _Locale_DIGIT | _Locale_ALPHA | _Locale_XDIGIT |\
   1.258 -                           _Locale_SPACE ) /* Printable */
   1.259 -# endif /* __Lynx__ */
   1.260 +  */
   1.261 +#  define _Locale_CNTRL  040     /* _C, Control character */
   1.262 +#  define _Locale_UPPER  01      /* _U, Upper case */
   1.263 +#  define _Locale_LOWER  02      /* _L, Lower case */
   1.264 +#  define _Locale_DIGIT  04      /* _N, Numeral (digit) */
   1.265 +#  define _Locale_XDIGIT 0200    /* _X, heXadecimal digit */
   1.266 +#  define _Locale_PUNCT  020     /* _P, Punctuation */
   1.267 +#  define _Locale_SPACE  010     /* _S, Spacing */
   1.268 +#  define _Locale_ALPHA  040000  /* none, Alphanumerical */
   1.269 +#  define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
   1.270 +                          _Locale_DIGIT | _Locale_ALPHA | _Locale_XDIGIT |\
   1.271 +                          _Locale_SPACE ) /* Printable */
   1.272 +#endif /* __Lynx__ */
   1.273  
   1.274 -#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__)
   1.275 +#if defined (__GNUC__) || defined (__BORLANDC__) || defined (__COMO__)
   1.276  
   1.277 -# if defined (__CYGWIN__)
   1.278 +#  if defined (__CYGWIN__)
   1.279  
   1.280 -#  define _Locale_CNTRL  040
   1.281 -#  define _Locale_UPPER  02
   1.282 -#  define _Locale_LOWER  01
   1.283 -#  define _Locale_DIGIT  04
   1.284 -#  define _Locale_XDIGIT ( 0100 | _Locale_DIGIT )
   1.285 -#  define _Locale_PUNCT  020
   1.286 -#  define _Locale_SPACE  010
   1.287 -#  define _Locale_ALPHA  (_Locale_UPPER | _Locale_LOWER)
   1.288 -#  define _Locale_PRINT  (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 )
   1.289 +#    define _Locale_CNTRL  040
   1.290 +#    define _Locale_UPPER  02
   1.291 +#    define _Locale_LOWER  01
   1.292 +#    define _Locale_DIGIT  04
   1.293 +#    define _Locale_XDIGIT ( 0100 | _Locale_DIGIT )
   1.294 +#    define _Locale_PUNCT  020
   1.295 +#    define _Locale_SPACE  010
   1.296 +#    define _Locale_ALPHA  0200
   1.297 +#    define _Locale_PRINT  (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0400 )
   1.298  
   1.299 -# elif defined (__FreeBSD__)
   1.300 +#  elif defined (__FreeBSD__) || ( defined (__APPLE__) && defined (__GNUC__) && (__GNUC__ > 3) )
   1.301  
   1.302 -# define _Locale_CNTRL _CTYPE_C
   1.303 -# define _Locale_UPPER _CTYPE_U
   1.304 -# define _Locale_LOWER _CTYPE_L
   1.305 -# define _Locale_DIGIT _CTYPE_D
   1.306 -# define _Locale_XDIGIT _CTYPE_X
   1.307 -# define _Locale_PUNCT _CTYPE_P
   1.308 -# define _Locale_SPACE _CTYPE_S
   1.309 -# define _Locale_PRINT _CTYPE_R
   1.310 -# define _Locale_ALPHA _CTYPE_A
   1.311 +#    define _Locale_CNTRL _CTYPE_C
   1.312 +#    define _Locale_UPPER _CTYPE_U
   1.313 +#    define _Locale_LOWER _CTYPE_L
   1.314 +#    define _Locale_DIGIT _CTYPE_D
   1.315 +#    define _Locale_XDIGIT _CTYPE_X
   1.316 +#    define _Locale_PUNCT _CTYPE_P
   1.317 +#    define _Locale_SPACE _CTYPE_S
   1.318 +#    define _Locale_PRINT _CTYPE_R
   1.319 +#    define _Locale_ALPHA _CTYPE_A
   1.320  
   1.321 -# elif defined (__NetBSD__) || defined (__amigaos__)
   1.322 - 
   1.323 -#  define _Locale_CNTRL _C
   1.324 -#  define _Locale_UPPER _U
   1.325 -#  define _Locale_LOWER _L
   1.326 -#  define _Locale_DIGIT _N
   1.327 -#  define _Locale_XDIGIT (_N|_X)
   1.328 -#  define _Locale_PUNCT _P
   1.329 -#  define _Locale_SPACE _S
   1.330 -#  define _Locale_PRINT (_P|_U|_L|_N|_B)
   1.331 -#  define _Locale_ALPHA (_U|_L)
   1.332 -# elif defined(__EMX__) /* OS/2 with emx runtime */
   1.333 -#  define _Locale_CNTRL _CNTRL
   1.334 -#  define _Locale_UPPER _UPPER
   1.335 -#  define _Locale_LOWER _LOWER
   1.336 -#  define _Locale_DIGIT _DIGIT
   1.337 -#  define _Locale_XDIGIT _XDIGIT
   1.338 -#  define _Locale_PUNCT _PUNCT
   1.339 -#  define _Locale_SPACE _SPACE
   1.340 -#  define _Locale_PRINT _PRINT
   1.341 -#  define _Locale_ALPHA (_UPPER|_LOWER)
   1.342 +#  elif defined (__NetBSD__) || defined (__OpenBSD__) || defined (__amigaos__)
   1.343  
   1.344 -# elif defined(_STLP_USE_GLIBC) /* linux, using the gnu compiler */
   1.345 +#    define _Locale_CNTRL _C
   1.346 +#    define _Locale_UPPER _U
   1.347 +#    define _Locale_LOWER _L
   1.348 +#    define _Locale_DIGIT _N
   1.349 +#    define _Locale_XDIGIT (_N|_X)
   1.350 +#    define _Locale_PUNCT _P
   1.351 +#    define _Locale_SPACE _S
   1.352 +#    define _Locale_PRINT (_P|_U|_L|_N|_B)
   1.353 +#    define _Locale_ALPHA (_U|_L)
   1.354 +#  elif defined (__EMX__) /* OS/2 with emx runtime */
   1.355 +#    define _Locale_CNTRL _CNTRL
   1.356 +#    define _Locale_UPPER _UPPER
   1.357 +#    define _Locale_LOWER _LOWER
   1.358 +#    define _Locale_DIGIT _DIGIT
   1.359 +#    define _Locale_XDIGIT _XDIGIT
   1.360 +#    define _Locale_PUNCT _PUNCT
   1.361 +#    define _Locale_SPACE _SPACE
   1.362 +#    define _Locale_PRINT _PRINT
   1.363 +#    define _Locale_ALPHA (_UPPER|_LOWER)
   1.364 +
   1.365 +#  elif defined (_STLP_USE_GLIBC) /* linux, using the gnu compiler */
   1.366  
   1.367  /* This section uses macros defined in the gnu libc ctype.h header */
   1.368  
   1.369 -#  define _Locale_CNTRL  _IScntrl
   1.370 -#  define _Locale_UPPER  _ISupper
   1.371 -#  define _Locale_LOWER  _ISlower
   1.372 -#  define _Locale_DIGIT  _ISdigit
   1.373 -#  define _Locale_XDIGIT _ISxdigit
   1.374 -#  define _Locale_PUNCT  _ISpunct
   1.375 -#  define _Locale_SPACE  _ISspace
   1.376 -#  define _Locale_PRINT  _ISprint
   1.377 -#  define _Locale_ALPHA  _ISalpha
   1.378 +#    define _Locale_CNTRL  _IScntrl
   1.379 +#    define _Locale_UPPER  _ISupper
   1.380 +#    define _Locale_LOWER  _ISlower
   1.381 +#    define _Locale_DIGIT  _ISdigit
   1.382 +#    define _Locale_XDIGIT _ISxdigit
   1.383 +#    define _Locale_PUNCT  _ISpunct
   1.384 +#    define _Locale_SPACE  _ISspace
   1.385 +#    define _Locale_PRINT  _ISprint
   1.386 +#    define _Locale_ALPHA  _ISalpha
   1.387  
   1.388  #  endif /* GLIBC */
   1.389  
   1.390  #endif /* gnu */
   1.391  
   1.392 -#if ( defined(__sun) && defined (__SVR4) ) \
   1.393 -    || (defined (__digital__) && defined (__unix__)) \
   1.394 -    || defined(_AIX)
   1.395 +#if (defined (__sun) && defined (__SVR4)) || \
   1.396 +    (defined (__digital__) && defined (__unix__)) || \
   1.397 +     defined (_AIX)
   1.398  /* fbp : condition from AT&T code*/
   1.399 -#if !(defined(__XPG4_CHAR_CLASS__) || defined(_XPG4_2) || \
   1.400 -    (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4))) && ! defined (_ISCNTRL)
   1.401 +#  if !(defined (__XPG4_CHAR_CLASS__) || defined (_XPG4_2) || \
   1.402 +       (defined (_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4))) && ! defined (_ISCNTRL)
   1.403    /* fbp : on 2.5.1, the defines are different ;( */
   1.404 -  // # if ( defined (__sun) && defined (__SVR4) && ! defined (_ISCNTRL) )
   1.405 -#   define _ISCNTRL _C
   1.406 -#   define _ISUPPER _U
   1.407 -#   define _ISLOWER _L
   1.408 -#   define _ISDIGIT _N
   1.409 -#   define _ISXDIGIT _X
   1.410 -#   define _ISPUNCT _P
   1.411 -#   define _ISSPACE _S
   1.412 -#   define _ISPRINT (_P | _U | _L | _N | _B)
   1.413 -#   define _ISALPHA (_U | _L)
   1.414 -#  endif 
   1.415 +  /* # if ( defined (__sun) && defined (__SVR4) && ! defined (_ISCNTRL) ) */
   1.416 +#    define _ISCNTRL _C
   1.417 +#    define _ISUPPER _U
   1.418 +#    define _ISLOWER _L
   1.419 +#    define _ISDIGIT _N
   1.420 +#    define _ISXDIGIT _X
   1.421 +#    define _ISPUNCT _P
   1.422 +#    define _ISSPACE _S
   1.423 +#    define _ISPRINT (_P | _U | _L | _N | _B)
   1.424 +#    define _ISALPHA (_U | _L)
   1.425 +#  endif
   1.426  
   1.427  #  define _Locale_CNTRL  _ISCNTRL
   1.428  #  define _Locale_UPPER  _ISUPPER
   1.429 @@ -284,7 +269,16 @@
   1.430  # define _Locale_SPACE _CTYPE_S
   1.431  # define _Locale_PRINT _CTYPE_R
   1.432  # define _Locale_ALPHA _CTYPE_A
   1.433 -
   1.434 +#elif defined (__MWERKS__) && defined (N_PLAT_NLM)
   1.435 +#  define _Locale_CNTRL  _CNTRL_
   1.436 +#  define _Locale_UPPER  _UPPER_
   1.437 +#  define _Locale_LOWER  _LOWER_
   1.438 +#  define _Locale_DIGIT  _DIGIT_
   1.439 +#  define _Locale_XDIGIT _XDIGIT_
   1.440 +#  define _Locale_PUNCT  _PUNCT_
   1.441 +#  define _Locale_SPACE  _SPACE_
   1.442 +#  define _Locale_PRINT  (_PUNCT_|_UPPER_|_LOWER_|_DIGIT_|_BLANK_)
   1.443 +#  define _Locale_ALPHA  (_UPPER_|_LOWER_)
   1.444  #elif defined (__MWERKS__)
   1.445  #  define _Locale_CNTRL  __control_char
   1.446  #  define _Locale_UPPER  __upper_case
   1.447 @@ -305,7 +299,7 @@
   1.448  #  define _Locale_SPACE  _IS_SP
   1.449  #  define _Locale_PRINT  (_IS_SP|_IS_PUN|_IS_UPP|_IS_LOW|_IS_DIG)
   1.450  #  define _Locale_ALPHA  _IS_ALPHA
   1.451 -#elif defined (_MSC_VER) || defined (__MINGW32__)
   1.452 +#elif defined (_STLP_MSVC_LIB) || defined (__MINGW32__)
   1.453  #  define _Locale_CNTRL  _CONTROL
   1.454  #  define _Locale_UPPER  _UPPER
   1.455  #  define _Locale_LOWER  _LOWER
   1.456 @@ -314,8 +308,7 @@
   1.457  #  define _Locale_PUNCT  _PUNCT
   1.458  #  define _Locale_SPACE  _SPACE
   1.459  #  define _Locale_PRINT  (_ALPHA | _DIGIT | _BLANK | _PUNCT)
   1.460 -// is this one has to be so complex ?  
   1.461 -#  define _Locale_ALPHA  ( _ALPHA & ~ (_UPPER | _LOWER )) 
   1.462 +#  define _Locale_ALPHA  ( _ALPHA & ~ (_UPPER | _LOWER ))
   1.463  #elif defined (__DMC__)
   1.464  #  define _Locale_CNTRL  _CONTROL
   1.465  #  define _Locale_UPPER  _UPPER
   1.466 @@ -325,8 +318,8 @@
   1.467  #  define _Locale_PUNCT  _PUNCT
   1.468  #  define _Locale_SPACE  _SPACE
   1.469  #  define _Locale_PRINT  (_UPPER | _LOWER | _DIGIT | _PUNCT | _SPACE)
   1.470 -#  define _Locale_ALPHA  _ALPHA
   1.471 -#elif defined(__MRC__) || defined(__SC__)		//*TY 02/24/2000 - added support for MPW
   1.472 +#  define _Locale_ALPHA  _ALPHA & ~(_UPPER | _LOWER)
   1.473 +#elif defined (__MRC__) || defined (__SC__)    /* *TY 02/24/2000 - added support for MPW */
   1.474  #  define _Locale_CNTRL  _CTL
   1.475  #  define _Locale_UPPER  _UPP
   1.476  #  define _Locale_LOWER  _LOW
   1.477 @@ -336,7 +329,7 @@
   1.478  #  define _Locale_SPACE  _BLA
   1.479  #  define _Locale_PRINT  (_UPP | _LOW | _DIG | _PUN | _BLA)
   1.480  #  define _Locale_ALPHA  (_UPP | _LOW)
   1.481 -#elif defined(__MLCCPP__)
   1.482 +#elif defined (__MLCCPP__)
   1.483  #  define _Locale_CNTRL    1
   1.484  #  define _Locale_UPPER    2
   1.485  #  define _Locale_LOWER    4
   1.486 @@ -346,34 +339,30 @@
   1.487  #  define _Locale_SPACE   64
   1.488  #  define _Locale_PRINT  128
   1.489  #  define _Locale_ALPHA  256
   1.490 -
   1.491 -# elif defined (__GNUC__) && defined (__APPLE__)
   1.492 - 
   1.493 -# define _Locale_CNTRL _C
   1.494 -# define _Locale_UPPER _U
   1.495 -# define _Locale_LOWER _L
   1.496 -# define _Locale_DIGIT _D
   1.497 -# define _Locale_XDIGIT _X
   1.498 -# define _Locale_PUNCT _P
   1.499 -# define _Locale_SPACE _S
   1.500 -# define _Locale_PRINT _R
   1.501 -# define _Locale_ALPHA _A
   1.502 -
   1.503 -# elif defined (__hpux) || defined (__osf__)
   1.504 - 
   1.505 -#   if defined(__HP_aCC) && !defined(_INCLUDE_HPUX_SOURCE)
   1.506 -#     define _ISALPHA      0x001
   1.507 -#     define _ISALNUM      0x002
   1.508 -#     define _ISBLANK      0x004
   1.509 -#     define _ISCNTRL      0x008
   1.510 -#     define _ISDIGIT      0x010
   1.511 -#     define _ISGRAPH      0x020
   1.512 -#     define _ISLOWER      0x040
   1.513 -#     define _ISPRINT      0x080
   1.514 -#     define _ISPUNCT      0x100
   1.515 -#     define _ISSPACE      0x200
   1.516 -#     define _ISUPPER      0x400
   1.517 -#     define _ISXDIGIT     0x800
   1.518 +#elif defined (__GNUC__) && (__GNUC__ == 3) && defined (__APPLE__)
   1.519 +#  define _Locale_CNTRL _C
   1.520 +#  define _Locale_UPPER _U
   1.521 +#  define _Locale_LOWER _L
   1.522 +#  define _Locale_DIGIT _D
   1.523 +#  define _Locale_XDIGIT _X
   1.524 +#  define _Locale_PUNCT _P
   1.525 +#  define _Locale_SPACE _S
   1.526 +#  define _Locale_PRINT _R
   1.527 +#  define _Locale_ALPHA _A
   1.528 +#elif defined (__hpux) || defined (__osf__)
   1.529 +#  if defined (__HP_aCC) && !defined (_INCLUDE_HPUX_SOURCE)
   1.530 +#    define _ISALPHA      0x001
   1.531 +#    define _ISALNUM      0x002
   1.532 +#    define _ISBLANK      0x004
   1.533 +#    define _ISCNTRL      0x008
   1.534 +#    define _ISDIGIT      0x010
   1.535 +#    define _ISGRAPH      0x020
   1.536 +#    define _ISLOWER      0x040
   1.537 +#    define _ISPRINT      0x080
   1.538 +#    define _ISPUNCT      0x100
   1.539 +#    define _ISSPACE      0x200
   1.540 +#    define _ISUPPER      0x400
   1.541 +#    define _ISXDIGIT     0x800
   1.542  #  endif
   1.543  #  define _Locale_CNTRL  _ISCNTRL
   1.544  #  define _Locale_UPPER  _ISUPPER
   1.545 @@ -384,7 +373,7 @@
   1.546  #  define _Locale_SPACE  _ISSPACE
   1.547  #  define _Locale_PRINT  _ISPRINT
   1.548  #  define _Locale_ALPHA  _ISALPHA
   1.549 -# elif defined (__MVS__) || defined(__OS400__)
   1.550 +#elif defined (__MVS__) || defined (__OS400__)
   1.551  #  define _Locale_CNTRL __ISCNTRL
   1.552  #  define _Locale_UPPER __ISUPPER
   1.553  #  define _Locale_LOWER __ISLOWER
   1.554 @@ -394,16 +383,16 @@
   1.555  #  define _Locale_SPACE __ISSPACE
   1.556  #  define _Locale_PRINT __ISPRINT
   1.557  #  define _Locale_ALPHA __ISALPHA
   1.558 -# elif defined (__QNXNTO__)  || defined (__WATCOMC__)
   1.559 -# define _Locale_CNTRL _CNTRL
   1.560 -# define _Locale_UPPER _UPPER
   1.561 -# define _Locale_LOWER _LOWER
   1.562 -# define _Locale_DIGIT _DIGIT
   1.563 -# define _Locale_XDIGIT _XDIGT
   1.564 -# define _Locale_PUNCT _PUNCT
   1.565 -# define _Locale_SPACE _SPACE
   1.566 -# define _Locale_PRINT _PRINT
   1.567 -# define _Locale_ALPHA (_UPPER | _LOWER)
   1.568 +#elif defined (__QNXNTO__)  || defined (__WATCOMC__)
   1.569 +#  define _Locale_CNTRL _CNTRL
   1.570 +#  define _Locale_UPPER _UPPER
   1.571 +#  define _Locale_LOWER _LOWER
   1.572 +#  define _Locale_DIGIT _DIGIT
   1.573 +#  define _Locale_XDIGIT _XDIGT
   1.574 +#  define _Locale_PUNCT _PUNCT
   1.575 +#  define _Locale_SPACE _SPACE
   1.576 +#  define _Locale_PRINT _PRINT
   1.577 +#  define _Locale_ALPHA (_UPPER | _LOWER)
   1.578  #elif defined (__DJGPP)
   1.579  #  define _Locale_CNTRL  __dj_ISCNTRL
   1.580  #  define _Locale_UPPER  __dj_ISUPPER
   1.581 @@ -444,16 +433,13 @@
   1.582  #  define _Locale_SPACE  _SPACE
   1.583  #  define _Locale_PRINT  _PRINT
   1.584  #  define _Locale_ALPHA  _ALPHA
   1.585 -#elif defined (_STLP_VXWORKS_TORNADO)
   1.586 -#define _Locale_UPPER _C_UPPER   /* 0x01 */
   1.587 -#define _Locale_LOWER _C_LOWER /* 0x02 */
   1.588 -#define _Locale_DIGIT  _C_NUMBER   /* 0x04 */
   1.589 -#define _Locale_SPACE  _C_WHITE_SPACE   /* 0x08 */
   1.590 -#define _Locale_PUNCT _C_PUNCT   /* 0x10 */
   1.591 -#define _Locale_CNTRL _C_CONTROL   /* 0x20 */
   1.592 -#define _Locale_XDIGIT _C_HEX_NUMBER   /* 0x40 */
   1.593 -#define _Locale_PRINT  (_C_B | _C_UPPER |  _C_LOWER | _C_NUMBER | _C_PUNCT)
   1.594 -#define _Locale_ALPHA (_C_UPPER |  _C_LOWER) 
   1.595  #endif
   1.596  
   1.597 -# endif /* _STLP_C_LOCALE_H */
   1.598 +/* We arbitrarily consider _Locale_CNTRL macro to check locale facet numeric
   1.599 + * identifier has been defined for the platform/compiler:
   1.600 + */
   1.601 +#if !defined (_Locale_CNTRL)
   1.602 +#  error Unable to find your platform locale facets definitions, please grant them.
   1.603 +#endif
   1.604 +
   1.605 +#endif /* _STLP_C_LOCALE_H */