2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
8 #if defined(__i386__) || defined(__I386__)
10 #define INC_ARCH(path, x) <path/i386/x>
12 #if defined(__ppc__) || defined(__PPC__)
14 #define INC_ARCH(path, x) <path/ppc/x>
16 #if defined(__x86_64__) || defined(__X86_64__)
18 #define INC_ARCH(path, x) <path/x86_64/x>
20 #if defined(__arm__) || defined(__ARM__)
22 #define INC_ARCH(path, x) <path/arm/x>
24 #if defined(__sh4__) || defined(__SH4__)
26 #define INC_ARCH(path, x) <path/sh4/x>
30 #include INC_ARCH(arch,types.h)
41 XXX serious hack that doesn't really solve the problem.
42 As of right now, some versions of the toolchain expect size_t to
43 be unsigned long (newer ones than 2.95.2 and beos), and the older
44 ones need it to be unsigned int. It's an actual failure when
45 operator new is declared. This will have to be resolved in the
50 #define __SIZE_T_LONG 1
54 #define __SIZE_T_INT 1
58 #define __SIZE_T_INT 1
61 #if !__SIZE_T_LONG && !__SIZE_T_INT
62 /* when in doubt, set it to LONG */
63 #define __SIZE_T_LONG 1
66 /* uncomment the following if you want to override LONG vs INT */
75 /* to override the LONG vs INT setting, set *one* of the below to 1 */
76 #define __SIZE_T_LONG 0
77 #define __SIZE_T_INT 1
80 // note that we only declare a proxy typedef here for size_t, called _newos_size_t
81 // which stddef.h then retypedefs as the actual size_t. ssize_t is not C++ standard,
82 // so it belongs here as well as anywhere.
85 typedef unsigned long _newos_size_t
;
86 typedef signed long ssize_t
;
88 typedef unsigned int _newos_size_t
;
89 typedef signed int ssize_t
;
91 #error "Don't know what size_t should be (int or long)!"
96 typedef unsigned char u_char
;
97 typedef unsigned short u_short
;
98 typedef unsigned int u_int
;
99 typedef unsigned long u_long
;
101 typedef unsigned char uchar
;
102 typedef unsigned short ushort
;
103 typedef unsigned int uint
;
104 typedef unsigned long ulong
;
106 typedef volatile unsigned char vuchar
;
107 typedef volatile unsigned short vushort
;
108 typedef volatile unsigned int vuint
;
109 typedef volatile unsigned long vulong
;
112 typedef int64 bigtime_t
;
113 typedef uint64 vnode_id
;
114 typedef int region_id
; // vm region id
115 typedef int aspace_id
; // address space id
116 typedef int thread_id
; // thread id
117 typedef int proc_id
; // process id
118 typedef int pgrp_id
; // process group id
119 typedef int sess_id
; // session id
120 typedef int sem_id
; // semaphore id
121 typedef int port_id
; // ipc port id
122 typedef int image_id
; // binary image id