00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COMMON_TYPES_H
00021 #define COMMON_TYPES_H
00022
00023
00024
00025
00026 #ifndef BASIC_TYPES_DEFINED
00027 #define BASIC_TYPES_DEFINED
00028
00029 #ifndef EX_TYPE_INT8
00030 # define EX_TYPE_INT8 char
00031 #endif
00032
00033 #ifndef EX_TYPE_INT16
00034 # if (SIZEOF_SHORT == 2)
00035 # define EX_TYPE_INT16 short
00036 # elif (SIZEOF_INT == 2)
00037 # define EX_TYPE_INT16 int
00038 # else
00039 # error "Please make sure a 16 bit type is provided by common_types.h"
00040 # endif
00041 #endif
00042
00043
00044 #ifndef EX_TYPE_INT32
00045 # if (SIZEOF_INT == 4)
00046 # define EX_TYPE_INT32 int
00047 # elif (SIZEOF_LONG == 4)
00048 # define EX_TYPE_INT32 long
00049 # elif (SIZEOF_LONG_LONG == 4)
00050 # define EX_TYPE_INT32 long long
00051 # else
00052 # error "Please make sure a 32 bit type is provided by common_types.h"
00053 # endif
00054 #endif
00055
00056 #ifndef EX_TYPE_INTPTR
00057 # if (SIZEOF_INTP == SIZEOF_INT)
00058 # define EX_TYPE_INTPTR int
00059 # elif (SIZEOF_INTP == SIZEOF_LONG)
00060 # define EX_TYPE_INTPTR long
00061 # elif (SIZEOF_INTP == SIZEOF_LONG_LONG)
00062 # define EX_TYPE_INTPTR long long
00063 # else
00064 # error "Size of pointer type not equal to int, long or long long"
00065 # endif
00066 #endif
00067
00068 typedef unsigned EX_TYPE_INT8 uint8;
00069 typedef unsigned EX_TYPE_INT16 uint16;
00070 typedef unsigned EX_TYPE_INT32 uint32;
00071
00072 typedef signed EX_TYPE_INT8 sint8;
00073 typedef signed EX_TYPE_INT16 sint16;
00074 typedef signed EX_TYPE_INT32 sint32;
00075
00076 typedef unsigned EX_TYPE_INTPTR uintptr;
00077 typedef signed EX_TYPE_INTPTR sintptr;
00078
00079 #endif
00080
00081
00082
00084 typedef uint16 ObjId;
00085
00087 typedef uint16 ProcId;
00088
00089 #endif
00090