]> git.saurik.com Git - wxWidgets.git/blob - docs/metrowerks/wchar_t_panther_fix/machine/ansi.h
fixed for w/o expat
[wxWidgets.git] / docs / metrowerks / wchar_t_panther_fix / machine / ansi.h
1 /*
2 * File: ansi.h
3 * ©2000-2002 Metrowerks Corporation. All rights reserved.
4 *
5 * Content: wchar_t overrides for OS X
6 *
7 */
8
9
10 #ifndef _MW_ANSI_H_
11 #define _MW_ANSI_H_
12
13 #if defined (__ppc__)
14 #include <ppc/ansi.h>
15 #elif defined (__i386__)
16 #include <i386/ansi.h>
17 #else
18 #error architecture not supported
19 #endif
20
21 #ifndef _BSD_WCHAR_T_DEFINED_
22 #define _BSD_WCHAR_T_DEFINED_
23
24 #if !__cplusplus || !__option(wchar_type)
25 typedef int wchar_t;
26 #undef __WCHAR_TYPE__
27 #define __WCHAR_TYPE__ int
28 #else
29 #undef __WCHAR_TYPE__
30 #define __WCHAR_TYPE__ wchar_t
31 #endif
32
33 #undef _BSD_WCHAR_T_
34 #define _BSD_WCHAR_T_ __WCHAR_TYPE__ /* wchar_t */
35
36 #undef _BSD_RUNE_T_
37 #define _BSD_RUNE_T_ __WCHAR_TYPE__ /* rune_t */
38
39 #ifndef WCHAR_MIN
40 #define WCHAR_MIN ((wchar_t) 0x80000000U)
41 #define WCHAR_MAX ((wchar_t) 0x7FFFFFFFU)
42 #endif
43
44 typedef wchar_t wint_t;
45 typedef wchar_t wctype_t;
46 #if 0 // 10.3 headers declare mbstate_t as union
47 typedef int mbstate_t;
48 #endif
49 typedef wchar_t Wint_t;
50 #endif
51
52
53 #ifndef _ANSI_SOURCE
54 typedef _BSD_WCHAR_T_ rune_t;
55 #endif
56
57
58 #endif /* _MW_ANSI_H_ */