Rev 4874 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* ANSI C namespace clean utility typedefs */ |
2 | |||
3 | /* This file defines various typedefs needed by the system calls that support |
||
4 | the C library. Basically, they're just the POSIX versions with an '_' |
||
5 | prepended. This file lives in the `sys' directory so targets can provide |
||
6 | their own if desired (or they can put target dependant conditionals here). |
||
7 | */ |
||
8 | |||
9 | #ifndef _SYS__TYPES_H |
||
10 | #define _SYS__TYPES_H |
||
11 | |||
12 | #include |
||
13 | #include |
||
14 | |||
15 | #ifndef __off_t_defined |
||
16 | typedef long _off_t; |
||
17 | #endif |
||
18 | |||
19 | #ifndef __dev_t_defined |
||
20 | typedef short __dev_t; |
||
21 | #endif |
||
22 | |||
23 | #ifndef __uid_t_defined |
||
24 | typedef unsigned short __uid_t; |
||
25 | #endif |
||
26 | #ifndef __gid_t_defined |
||
27 | typedef unsigned short __gid_t; |
||
28 | #endif |
||
29 | |||
30 | #ifndef __off64_t_defined |
||
31 | __extension__ typedef long long _off64_t; |
||
32 | #endif |
||
33 | |||
34 | /* |
||
35 | * We need fpos_t for the following, but it doesn't have a leading "_", |
||
36 | * so we use _fpos_t instead. |
||
37 | */ |
||
38 | #ifndef __fpos_t_defined |
||
39 | typedef long _fpos_t; /* XXX must match off_t in |
||
40 | /* (and must be `long' for now) */ |
||
41 | #endif |
||
42 | |||
43 | #ifdef __LARGE64_FILES |
||
44 | #ifndef __fpos64_t_defined |
||
45 | typedef _off64_t _fpos64_t; |
||
46 | #endif |
||
47 | #endif |
||
48 | |||
49 | #ifndef __ssize_t_defined |
||
4921 | Serge | 50 | #ifdef __SIZE_TYPE__ |
51 | /* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t. |
||
52 | We simply change "unsigned" to "signed" for this single definition |
||
53 | to make sure ssize_t and size_t only differ by their signedness. */ |
||
54 | #define unsigned signed |
||
55 | typedef __SIZE_TYPE__ _ssize_t; |
||
56 | #undef unsigned |
||
57 | #else |
||
4349 | Serge | 58 | #if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 |
59 | typedef int _ssize_t; |
||
60 | #else |
||
61 | typedef long _ssize_t; |
||
62 | #endif |
||
63 | #endif |
||
4921 | Serge | 64 | #endif |
4349 | Serge | 65 | |
66 | #define __need_wint_t |
||
67 | #include |
||
68 | |||
69 | #ifndef __mbstate_t_defined |
||
70 | /* Conversion state information. */ |
||
71 | typedef struct |
||
72 | { |
||
73 | int __count; |
||
74 | union |
||
75 | { |
||
76 | wint_t __wch; |
||
77 | unsigned char __wchb[4]; |
||
78 | } __value; /* Value so far. */ |
||
79 | } _mbstate_t; |
||
80 | #endif |
||
81 | |||
82 | #ifndef __flock_t_defined |
||
83 | typedef _LOCK_RECURSIVE_T _flock_t; |
||
84 | #endif |
||
85 | |||
86 | #ifndef __iconv_t_defined |
||
87 | /* Iconv descriptor type */ |
||
88 | typedef void *_iconv_t; |
||
89 | #endif |
||
90 | |||
91 | #endif /* _SYS__TYPES_H */ |