Rev 6099 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6099 | Rev 6536 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | 17 | ||
Line 18... | Line 18... | ||
18 | #ifndef _SYS_TYPES_H |
18 | #ifndef _SYS_TYPES_H |
19 | 19 | ||
20 | #include <_ansi.h> |
- | |
21 | # include |
- | |
22 | - | ||
23 | #ifndef __INTTYPES_DEFINED__ |
- | |
24 | #define __INTTYPES_DEFINED__ |
20 | #include <_ansi.h> |
Line 25... | Line -... | ||
25 | - | ||
26 | #include |
- | |
27 | 21 | #include |
|
28 | #if defined(__rtems__) || defined(__XMK__) |
22 | #include |
29 | /* |
- | |
30 | * The following section is RTEMS specific and is needed to more |
- | |
31 | * closely match the types defined in the BSD sys/types.h. |
- | |
32 | * This is needed to let the RTEMS/BSD TCP/IP stack compile. |
23 | |
33 | */ |
24 | /* BSD types permitted by POSIX and always exposed as in Glibc. Only provided |
34 | 25 | for backward compatibility with BSD code. The uintN_t standard types should |
|
35 | /* deprecated */ |
26 | be preferred in new code. */ |
36 | #if ___int8_t_defined |
27 | #if ___int8_t_defined |
37 | typedef __uint8_t u_int8_t; |
28 | typedef __uint8_t u_int8_t; |
38 | #endif |
29 | #endif |
39 | #if ___int16_t_defined |
30 | #if ___int16_t_defined |
40 | typedef __uint16_t u_int16_t; |
31 | typedef __uint16_t u_int16_t; |
41 | #endif |
32 | #endif |
42 | #if ___int32_t_defined |
- | |
43 | typedef __uint32_t u_int32_t; |
33 | #if ___int32_t_defined |
44 | #endif |
34 | typedef __uint32_t u_int32_t; |
- | 35 | #endif |
|
- | 36 | #if ___int64_t_defined |
|
- | 37 | typedef __uint64_t u_int64_t; |
|
- | 38 | #endif |
|
- | 39 | ||
- | 40 | #if defined(__rtems__) || defined(__XMK__) |
|
- | 41 | /* |
|
- | 42 | * The following section is RTEMS specific and is needed to more |
|
Line 45... | Line 43... | ||
45 | 43 | * closely match the types defined in the BSD sys/types.h. |
|
- | 44 | * This is needed to let the RTEMS/BSD TCP/IP stack compile. |
|
46 | #if ___int64_t_defined |
45 | */ |
47 | typedef __uint64_t u_int64_t; |
46 | |
48 | 47 | /* deprecated */ |
|
49 | /* deprecated */ |
48 | #if ___int64_t_defined |
Line 50... | Line -... | ||
50 | typedef __uint64_t u_quad_t; |
- | |
51 | typedef __int64_t quad_t; |
- | |
52 | typedef quad_t * qaddr_t; |
49 | typedef __uint64_t u_quad_t; |
Line 53... | Line 50... | ||
53 | #endif |
50 | typedef __int64_t quad_t; |
Line 54... | Line 51... | ||
54 | 51 | typedef quad_t * qaddr_t; |
|
55 | #endif |
52 | #endif |
Line 83... | Line 80... | ||
83 | #else |
80 | #else |
84 | #define _ST_INT32 |
81 | #define _ST_INT32 |
85 | #endif |
82 | #endif |
Line 86... | Line 83... | ||
86 | 83 | ||
87 | # if __BSD_VISIBLE |
- | |
- | 84 | #if __BSD_VISIBLE |
|
88 | 85 | #include |
|
89 | # define physadr physadr_t |
86 | # define physadr physadr_t |
- | 87 | # define quad quad_t |
|
Line -... | Line 88... | ||
- | 88 | #endif |
|
90 | # define quad quad_t |
89 | |
91 | 90 | #if __MISC_VISIBLE |
|
92 | #ifndef _BSDTYPES_DEFINED |
91 | #ifndef _BSDTYPES_DEFINED |
93 | /* also defined in mingw/gmon.h and in w32api/winsock[2].h */ |
92 | /* also defined in mingw/gmon.h and in w32api/winsock[2].h */ |
94 | #ifndef __u_char_defined |
93 | #ifndef __u_char_defined |
Line 107... | Line 106... | ||
107 | typedef unsigned long u_long; |
106 | typedef unsigned long u_long; |
108 | #define __u_long_defined |
107 | #define __u_long_defined |
109 | #endif |
108 | #endif |
110 | #define _BSDTYPES_DEFINED |
109 | #define _BSDTYPES_DEFINED |
111 | #endif |
110 | #endif |
- | 111 | #endif /*__BSD_VISIBLE || __CYGWIN__ */ |
|
Line -... | Line 112... | ||
- | 112 | ||
112 | 113 | #if __MISC_VISIBLE |
|
113 | typedef unsigned short ushort; /* System V compatibility */ |
114 | typedef unsigned short ushort; /* System V compatibility */ |
114 | typedef unsigned int uint; /* System V compatibility */ |
115 | typedef unsigned int uint; /* System V compatibility */ |
115 | typedef unsigned long ulong; /* System V compatibility */ |
116 | typedef unsigned long ulong; /* System V compatibility */ |
Line 116... | Line 117... | ||
116 | # endif /*__BSD_VISIBLE */ |
117 | #endif |
117 | 118 | ||
118 | #ifndef __clock_t_defined |
119 | #ifndef __clock_t_defined |
119 | typedef _CLOCK_T_ clock_t; |
120 | typedef _CLOCK_T_ clock_t; |
Line 185... | Line 186... | ||
185 | #endif |
186 | #endif |
Line 186... | Line 187... | ||
186 | 187 | ||
187 | #ifndef __CYGWIN__ |
188 | #ifndef __CYGWIN__ |
188 | typedef long key_t; |
189 | typedef long key_t; |
- | 190 | #endif |
|
- | 191 | ||
189 | #endif |
192 | #ifndef _SSIZE_T_DECLARED |
- | 193 | typedef _ssize_t ssize_t; |
|
- | 194 | #define _SSIZE_T_DECLARED |
|
Line 190... | Line 195... | ||
190 | typedef _ssize_t ssize_t; |
195 | #endif |
191 | 196 | ||
192 | #if !defined(__CYGWIN__) && !defined(__rtems__) |
197 | #if !defined(__CYGWIN__) && !defined(__rtems__) |
193 | #ifdef __MS_types__ |
198 | #ifdef __MS_types__ |
Line 408... | Line 413... | ||
408 | 413 | ||
Line 409... | Line 414... | ||
409 | typedef __uint32_t pthread_cond_t; /* identify a condition variable */ |
414 | typedef __uint32_t pthread_cond_t; /* identify a condition variable */ |
410 | 415 | ||
- | 416 | typedef struct { |
|
411 | typedef struct { |
417 | int is_initialized; |
412 | int is_initialized; |
418 | clock_t clock; /* specifiy clock for timeouts */ |
413 | #if defined(_POSIX_THREAD_PROCESS_SHARED) |
419 | #if defined(_POSIX_THREAD_PROCESS_SHARED) |
414 | int process_shared; /* allow this to be shared amongst processes */ |
420 | int process_shared; /* allow this to be shared amongst processes */ |
Line 429... | Line 435... | ||
429 | #endif |
435 | #endif |
430 | #endif /* defined(_POSIX_THREADS) */ |
436 | #endif /* defined(_POSIX_THREADS) */ |
Line 431... | Line 437... | ||
431 | 437 | ||
Line -... | Line 438... | ||
- | 438 | /* POSIX Barrier Types */ |
|
432 | /* POSIX Barrier Types */ |
439 | |
433 | 440 | #if !defined(__CYGWIN__) |
|
434 | #if defined(_POSIX_BARRIERS) |
441 | #if defined(_POSIX_BARRIERS) |
435 | typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */ |
442 | typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */ |
436 | typedef struct { |
443 | typedef struct { |
Line 441... | Line 448... | ||
441 | } pthread_barrierattr_t; |
448 | } pthread_barrierattr_t; |
442 | #endif /* defined(_POSIX_BARRIERS) */ |
449 | #endif /* defined(_POSIX_BARRIERS) */ |
Line 443... | Line 450... | ||
443 | 450 | ||
Line 444... | Line -... | ||
444 | /* POSIX Spin Lock Types */ |
- | |
445 | 451 | /* POSIX Spin Lock Types */ |
|
446 | #if !defined (__CYGWIN__) |
452 | |
447 | #if defined(_POSIX_SPIN_LOCKS) |
453 | #if defined(_POSIX_SPIN_LOCKS) |
Line 448... | Line 454... | ||
448 | typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */ |
454 | typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */ |