Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_LOCALE
      7 #define _INC_LOCALE
      8 
      9 #include <crtdefs.h>
     10 
     11 #ifdef __cplusplus
     12 #include <stdio.h>
     13 #endif
     14 
     15 #pragma pack(push,_CRT_PACKING)
     16 
     17 #ifdef __cplusplus
     18 extern "C" {
     19 #endif
     20 
     21 #ifndef NULL
     22 #ifdef __cplusplus
     23 #ifndef _WIN64
     24 #define NULL 0
     25 #else
     26 #define NULL 0LL
     27 #endif  /* W64 */
     28 #else
     29 #define NULL ((void *)0)
     30 #endif
     31 #endif
     32 
     33 #define LC_ALL 0
     34 #define LC_COLLATE 1
     35 #define LC_CTYPE 2
     36 #define LC_MONETARY 3
     37 #define LC_NUMERIC 4
     38 #define LC_TIME 5
     39 
     40 #define LC_MIN LC_ALL
     41 #define LC_MAX LC_TIME
     42 
     43 #ifndef _LCONV_DEFINED
     44 #define _LCONV_DEFINED
     45   struct lconv {
     46     char *decimal_point;
     47     char *thousands_sep;
     48     char *grouping;
     49     char *int_curr_symbol;
     50     char *currency_symbol;
     51     char *mon_decimal_point;
     52     char *mon_thousands_sep;
     53     char *mon_grouping;
     54     char *positive_sign;
     55     char *negative_sign;
     56     char int_frac_digits;
     57     char frac_digits;
     58     char p_cs_precedes;
     59     char p_sep_by_space;
     60     char n_cs_precedes;
     61     char n_sep_by_space;
     62     char p_sign_posn;
     63     char n_sign_posn;
     64   };
     65 #endif
     66 
     67 #ifndef _CONFIG_LOCALE_SWT
     68 #define _CONFIG_LOCALE_SWT
     69 
     70 #define _ENABLE_PER_THREAD_LOCALE 0x1
     71 #define _DISABLE_PER_THREAD_LOCALE 0x2
     72 #define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
     73 #define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
     74 #define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
     75 #define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
     76 
     77 #endif
     78 
     79   int __cdecl _configthreadlocale(int _Flag);
     80   char *__cdecl setlocale(int _Category,const char *_Locale);
     81   _CRTIMP struct lconv *__cdecl localeconv(void);
     82   _locale_t __cdecl _get_current_locale(void);
     83   _locale_t __cdecl _create_locale(int _Category,const char *_Locale);
     84   void __cdecl _free_locale(_locale_t _Locale);
     85   _locale_t __cdecl __get_current_locale(void);
     86   _locale_t __cdecl __create_locale(int _Category,const char *_Locale);
     87   void __cdecl __free_locale(_locale_t _Locale);
     88 
     89 #ifndef _WLOCALE_DEFINED
     90 #define _WLOCALE_DEFINED
     91   _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
     92 #endif
     93 
     94 #ifdef __cplusplus
     95 }
     96 #endif
     97 
     98 #pragma pack(pop)
     99 #endif
    100