00001
00002
00003
00004
00005
00006
00007 #ifndef _TYPES_H
00008 #define _TYPES_H
00009
00010 #ifndef _ANSI_H
00011 #include <ansi.h>
00012 #endif
00013
00014 typedef unsigned char u8_t;
00015 typedef unsigned short u16_t;
00016 typedef signed char i8_t;
00017 typedef short i16_t;
00018
00019 #if __SIZEOF_LONG__ > 4
00020
00021 typedef unsigned int u32_t;
00022 typedef int i32_t;
00023 #else
00024
00025 typedef unsigned long u32_t;
00026 typedef long i32_t;
00027 #endif
00028
00029 typedef struct {
00030 u32_t lo;
00031 u32_t hi;
00032 } u64_t;
00033
00034
00035 typedef u32_t zone_t;
00036 typedef u32_t block_t;
00037 typedef u32_t bit_t;
00038 typedef u16_t zone1_t;
00039 typedef u16_t bitchunk_t;
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 typedef unsigned long Ino_t;
00050
00051 #if defined(_MINIX) || defined(__minix)
00052
00053
00054
00055
00056
00057
00058
00059
00060 #ifndef _SIZE_T
00061 #define _SIZE_T
00062 typedef unsigned int size_t;
00063 #endif
00064
00065 #ifndef _SSIZE_T
00066 #define _SSIZE_T
00067 typedef int ssize_t;
00068 #endif
00069
00070 #ifndef _TIME_T
00071 #define _TIME_T
00072 typedef long time_t;
00073 #endif
00074
00075 #ifndef _CLOCK_T
00076 #define _CLOCK_T
00077 typedef long clock_t;
00078 #endif
00079
00080 #ifndef _SIGSET_T
00081 #define _SIGSET_T
00082 typedef unsigned long sigset_t;
00083 #endif
00084
00085 #ifndef _KEY_T
00086 #define _KEY_T
00087 typedef long key_t;
00088 #endif
00089
00090
00091 typedef long useconds_t;
00092
00093 typedef short dev_t;
00094
00095
00096 typedef char gid_t;
00097 typedef unsigned long ino_t;
00098 typedef unsigned short mode_t;
00099 typedef short nlink_t;
00100 typedef long off_t;
00101 typedef int pid_t;
00102 typedef short uid_t;
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 typedef int Dev_t;
00114 typedef int _mnx_Gid_t;
00115 typedef int Nlink_t;
00116 typedef int _mnx_Uid_t;
00117 typedef int U8_t;
00118 typedef unsigned long U32_t;
00119 typedef int I8_t;
00120 typedef int I16_t;
00121 typedef long I32_t;
00122
00123 #if _EM_WSIZE == 2
00124
00125 typedef unsigned int Zone1_t;
00126 typedef unsigned int Bitchunk_t;
00127 typedef unsigned int U16_t;
00128 typedef unsigned int _mnx_Mode_t;
00129
00130 #else
00131
00132 typedef int Zone1_t;
00133 typedef int Bitchunk_t;
00134 typedef int U16_t;
00135 typedef int _mnx_Mode_t;
00136
00137 #endif
00138
00139
00140 typedef void _PROTOTYPE( (*sighandler_t), (int) );
00141
00142
00143 typedef unsigned char u_char;
00144 typedef unsigned short u_short;
00145 typedef unsigned int u_int;
00146 typedef unsigned long u_long;
00147 typedef char *caddr_t;
00148
00149
00150 #define MAJOR 8
00151 #define MINOR 0
00152
00153 #ifndef minor
00154 #define minor(dev) (((dev) >> MINOR) & 0xff)
00155 #endif
00156
00157 #ifndef major
00158 #define major(dev) (((dev) >> MAJOR) & 0xff)
00159 #endif
00160
00161 #ifndef makedev
00162 #define makedev(major, minor) \
00163 ((dev_t) (((major) << MAJOR) | ((minor) << MINOR)))
00164 #endif
00165
00166 #endif
00167
00168 #endif