5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Data typing - must be included before any other file.
11 This version of exec/types.h does not contain any of the definitions
12 of obsolete types (eg SHORT, CPTR, ...). If your code contains any
13 of these they should have been changed a long time ago.
17 # include <aros/system.h>
20 /*************************************
21 ***** Basic Data types *****
22 *************************************/
24 #ifndef __typedef_APTR
25 # define __typedef_APTR
26 typedef void * APTR
; /* memory pointer */
29 #ifndef __typedef_CONST_APTR
30 # define __typedef_CONST_APTR
31 typedef const void * CONST_APTR
; /* const memory pointer */
34 /* Distinguish between 64 and 32bit systems */
35 #ifndef __typedef_LONG
36 # define __typedef_LONG
37 typedef signed AROS_32BIT_TYPE LONG
; /* signed 32-bit value */
38 typedef unsigned AROS_32BIT_TYPE ULONG
; /* unsigned 32-bit value */
41 #ifndef __typedef_QUAD
42 # define __typedef_QUAD
43 # ifdef AROS_64BIT_TYPE
44 typedef signed AROS_64BIT_TYPE QUAD
; /* signed 64-bit value */
45 typedef unsigned AROS_64BIT_TYPE UQUAD
; /* unsigned 64-bit-value */
47 typedef struct { LONG high
, low
; } QUAD
; /* signed 64-bit value */
48 typedef struct { ULONG high
, low
; } UQUAD
; /* unsigned 64-bit value */
49 # endif /* AROS_64BIT_TYPE */
52 #ifndef __typedef_WORD
53 # define __typedef_WORD
54 typedef signed AROS_16BIT_TYPE WORD
; /* signed 16-bit value */
55 typedef unsigned AROS_16BIT_TYPE UWORD
; /* unsigned 16-bit-value */
58 #ifndef __typedef_BYTE
59 # define __typedef_BYTE
60 typedef signed char BYTE
; /* signed 8-bit value */
61 typedef unsigned char UBYTE
; /* unsigned 8-bit value */
64 /* An unsigned integer which can store a pointer */
65 #ifndef __typedef_IPTR
66 # define __typedef_IPTR
67 typedef unsigned AROS_INTPTR_TYPE IPTR
;
70 /* A signed type that can store a pointer */
71 #ifndef __typedef_SIPTR
72 # define __typedef_SIPTR
73 typedef signed AROS_INTPTR_TYPE SIPTR
;
76 /* An integer on the stack which can store a pointer */
77 #ifndef __typedef_STACKIPTR
78 # define __typedef_STACKIPTR
79 typedef unsigned AROS_INTPTR_STACKTYPE STACKIPTR
;
82 /* Distinguish between 64 and 32bit systems on the stack */
83 #ifndef __typedef_STACKLONG
84 # define __typedef_STACKLONG
85 typedef signed AROS_32BIT_STACKTYPE STACKLONG
; /* signed 32-bit value */
86 typedef unsigned AROS_32BIT_STACKTYPE STACKULONG
; /* unsigned 32-bit value */
89 #ifndef __typedef_STACKQUAD
90 # define __typedef_STACKQUAD
91 # ifdef AROS_64BIT_STACKTYPE
92 typedef signed AROS_64BIT_STACKTYPE STACKQUAD
; /* signed 64-bit value */
93 typedef unsigned AROS_64BIT_STACKTYPE STACKUQUAD
; /* unsigned 64-bit-value */
95 typedef struct { LONG high
, low
; } STACKQUAD
; /* signed 64-bit value */
96 typedef struct { ULONG high
, low
; } STACKUQUAD
; /* unsigned 64-bit value */
97 # endif /* AROS_64BIT_STACKTYPE */
100 #ifndef __typedef_STACKWORD
101 # define __typedef_STACKWORD
102 typedef signed AROS_16BIT_STACKTYPE STACKWORD
; /* signed 16-bit value */
103 typedef unsigned AROS_16BIT_STACKTYPE STACKUWORD
; /* unsigned 16-bit-value */
106 #ifndef __typedef_STACKBYTE
107 # define __typedef_STACKBYTE
108 typedef signed AROS_8BIT_STACKTYPE STACKBYTE
; /* signed 8-bit value */
109 typedef unsigned AROS_8BIT_STACKTYPE STACKUBYTE
; /* unsigned 8-bit value */
112 #ifndef __typedef_STACKFLOAT
113 # define __typedef_STACKFLOAT
114 typedef AROS_FLOAT_STACKTYPE STACKFLOAT
; /* signed 32-bit floating point value */
117 #ifndef __typedef_STACKDOUBLE
118 # define __typedef_STACKDOUBLE
119 typedef AROS_DOUBLE_STACKTYPE STACKDOUBLE
; /* signed 64-bit floating point value */
122 /*************************************
123 ***** Other interesting types *****
124 *************************************/
125 /* C++ doesn't like strings being treated nor as signed nor as unsigned char's arrays,
126 it wants them to be simply "char" arrays. This is because
127 the char type has undefined sign, unless explicitely specified. */
129 # define __AROS_CPP_BYTE char
131 # define __AROS_CPP_BYTE UBYTE
134 #ifndef __typedef_STRPTR
135 # define __typedef_STRPTR
136 typedef __AROS_CPP_BYTE
* STRPTR
; /* Pointer to string (NULL terminated) */
139 #ifndef __typedef_CONST_STRPTR
140 # define __typedef_CONST_STRPTR
141 typedef const __AROS_CPP_BYTE
* CONST_STRPTR
; /* Pointer to constant string (NULL terminated) */
144 #undef __AROS_CPP_BYTE
146 #ifndef __typedef_TEXT
147 # define __typedef_TEXT
148 typedef unsigned char TEXT
;
151 #ifndef __typedef_BOOL
152 # define __typedef_BOOL
153 typedef short BOOL
; /* A Boolean value */
156 #ifndef __typedef_FLOAT
157 # define __typedef_FLOAT
158 typedef float FLOAT
; /* 32bit IEEE floating point value */
161 #ifndef __typedef_DOUBLE
162 # define __typedef_DOUBLE
163 typedef double DOUBLE
; /* 64bit IEEE floating point value */
166 #ifndef __typedef_LONGBITS
167 # define __typedef_LONGBITS
168 typedef ULONG LONGBITS
;
171 #ifndef __typedef_WORDBITS
172 # define __typedef_WORDBITS
173 typedef UWORD WORDBITS
;
176 #ifndef __typedef_BYTEBITS
177 # define __typedef_BYTEBITS
178 typedef UBYTE BYTEBITS
;
181 #ifndef __typedef_RAWARG
182 # define __typedef_RAWARG /* Type of 'datastream' of RawDoFmt */
183 typedef struct RAWARG_s
{ } *RAWARG
;
186 /*************************************
187 ***** Some useful definitions *****
188 *************************************/
206 #define GLOBAL extern
207 #define IMPORT extern
208 #define STATIC static
209 #define REGISTER register
221 #define VOLATILE volatile
228 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
229 #define RESTRICT restrict
236 Provide a workaround for non-ANSI compilers that do not understand
237 prototypes in function pointer members of structure/union types.
241 #if defined(__STDC__)
242 # define __CLIB_PROTOTYPE(a) a
244 # define __CLIB_PROTOTYPE(a)
248 Minimum support library version. AROS doesn't have system libraries
251 #define LIBRARY_MINIMUM 40
254 The current version of the includes. Do not use this value in calls
255 to OpenLibrary(). Some system libraries may not be at this version. */
256 #define INCLUDE_VERSION 40
258 #endif /* exec/types.h */