Remove #ifndef __cplusplus around wchar related stuff in include/wchar.h
[dragonfly.git] / sys / sys / stdint.h
1 /*
2  * This file is in the public domain.
3  * $FreeBSD: src/sys/sys/inttypes.h,v 1.2 1999/08/28 00:51:47 peter Exp $
4  * $DragonFly: src/sys/sys/stdint.h,v 1.4 2008/03/10 12:01:50 hasso Exp $
5  *
6  * Note: since portions of these header files can be included with various
7  * other combinations of defines, we cannot surround the whole header file
8  * with an #ifndef sequence.  Elements are individually protected.
9  */
10
11 #include <sys/cdefs.h>
12 #include <machine/stdint.h>
13
14 #ifndef _SYS_STDINT_H_
15 #define _SYS_STDINT_H_
16
17 /*
18  * wchar_t and rune_t have to be of the same type. rune_t is meant
19  * for internal use only.
20  *
21  * wchar_t, wint_t and rune_t are signed, to allow EOF (-1) to naturally
22  * assigned.
23  *
24  * ANSI specifies ``int'' as argument for the is*() and to*() routines.
25  * Keeping wchar_t and rune_t as ``int'' instead of the more natural
26  * ``long'' helps ANSI conformance. ISO 10646 will most likely end up
27  * as 31 bit standard and all supported architectures have
28  * sizeof(int) >= 4.
29  */
30 typedef int             __wchar_t;
31 typedef int             __wint_t;
32 typedef int             __rune_t;
33 typedef void            *__wctrans_t;
34 typedef void            *__wctype_t;
35
36 /*
37  * mbstate_t is an opaque object to keep conversion state, during multibyte
38  * stream conversions.  The content must not be referenced by user programs.
39  */
40 typedef union {
41         __uint8_t __mbstate8[128];
42         __int64_t __mbstateL;   /* for alignment */
43 } __mbstate_t;
44
45 typedef __int64_t       __off_t;
46 typedef __int32_t       __pid_t;
47
48 #endif  /* SYS_STDINT_H */