00001 #ifndef __types_h
00002 #define __types_h
00003 #include <limits.h>
00004 #include <sys/types.h>
00005
00006 #ifndef TRUE
00007 #define TRUE (1)
00008 #define FALSE (0)
00009 #endif
00010
00011 typedef unsigned char boolean;
00012
00013 #ifdef __STDC__
00014 #define MAX32U 0xFFFFFFFFU
00015 #else
00016 #define MAX32U 0xFFFFFFFF
00017 #endif
00018 #define MAX32 0x8FFFFFFF
00019
00020
00021 #if ULONG_MAX == MAX32U
00022 typedef short int16;
00023 typedef int int32;
00024
00025 #ifndef NOLONGLONG
00026 typedef long long int int64;
00027 #else
00028 typedef long int int64;
00029 #endif
00030 typedef unsigned long u_int32;
00031 typedef unsigned short u_int16;
00032 #ifndef NOLONGLONG
00033 typedef unsigned long long u_int64;
00034 #else
00035 typedef unsigned long u_int64;
00036 #endif
00037
00038 #elif ULONG_MAX == 0xFFFF
00039 typedef int int16;
00040 typedef long int32;
00041 typedef unsigned long u_int32;
00042 typedef unsigned int u_int16;
00043
00044 #else
00045 typedef short int16;
00046 typedef int int32;
00047 typedef unsigned int u_int32;
00048 typedef unsigned short u_int16;
00049 #endif
00050 typedef char int8;
00051 typedef unsigned char u_int8;
00052
00053 #endif