diff options
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _DEFINES_H | 1 | #ifndef _DEFINES_H |
2 | #define _DEFINES_H | 2 | #define _DEFINES_H |
3 | 3 | ||
4 | /* $Id: defines.h,v 1.79 2002/02/13 18:14:53 tim Exp $ */ | 4 | /* $Id: defines.h,v 1.80 2002/02/26 16:40:49 tim Exp $ */ |
5 | 5 | ||
6 | /* Necessary headers */ | 6 | /* Necessary headers */ |
7 | 7 | ||
@@ -11,9 +11,6 @@ | |||
11 | #include <netinet/in_systm.h> /* For typedefs */ | 11 | #include <netinet/in_systm.h> /* For typedefs */ |
12 | #include <netinet/in.h> /* For IPv6 macros */ | 12 | #include <netinet/in.h> /* For IPv6 macros */ |
13 | #include <netinet/ip.h> /* For IPTOS macros */ | 13 | #include <netinet/ip.h> /* For IPTOS macros */ |
14 | #ifdef HAVE_RPC_RPC_H | ||
15 | # include <rpc/rpc.h> /* For INADDR_LOOPBACK on SCO OSR3 */ | ||
16 | #endif | ||
17 | #ifdef HAVE_SYS_UN_H | 14 | #ifdef HAVE_SYS_UN_H |
18 | # include <sys/un.h> /* For sockaddr_un */ | 15 | # include <sys/un.h> /* For sockaddr_un */ |
19 | #endif | 16 | #endif |
@@ -144,6 +141,14 @@ enum | |||
144 | # define NFDBITS (8 * sizeof(unsigned long)) | 141 | # define NFDBITS (8 * sizeof(unsigned long)) |
145 | #endif | 142 | #endif |
146 | 143 | ||
144 | /* | ||
145 | SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but | ||
146 | including rpc/rpc.h breaks Solaris 6 | ||
147 | */ | ||
148 | #ifndef INADDR_LOOPBACK | ||
149 | #define INADDR_LOOPBACK ((ulong)0x7f000001) | ||
150 | #endif | ||
151 | |||
147 | /* Types */ | 152 | /* Types */ |
148 | 153 | ||
149 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ | 154 | /* If sys/types.h does not supply intXX_t, supply them ourselves */ |
@@ -164,7 +169,11 @@ typedef char int8_t; | |||
164 | typedef short int int16_t; | 169 | typedef short int int16_t; |
165 | # else | 170 | # else |
166 | # ifdef _CRAY | 171 | # ifdef _CRAY |
172 | # if (SIZEOF_SHORT_INT == 4) | ||
173 | typedef short int16_t; | ||
174 | # else | ||
167 | typedef long int16_t; | 175 | typedef long int16_t; |
176 | # endif | ||
168 | # else | 177 | # else |
169 | # error "16 bit int type not found." | 178 | # error "16 bit int type not found." |
170 | # endif /* _CRAY */ | 179 | # endif /* _CRAY */ |
@@ -197,7 +206,11 @@ typedef unsigned char u_int8_t; | |||
197 | typedef unsigned short int u_int16_t; | 206 | typedef unsigned short int u_int16_t; |
198 | # else | 207 | # else |
199 | # ifdef _CRAY | 208 | # ifdef _CRAY |
209 | # if (SIZEOF_SHORT_INT == 4) | ||
210 | typedef unsigned short u_int16_t; | ||
211 | # else | ||
200 | typedef unsigned long u_int16_t; | 212 | typedef unsigned long u_int16_t; |
213 | # endif | ||
201 | # else | 214 | # else |
202 | # error "16 bit int type not found." | 215 | # error "16 bit int type not found." |
203 | # endif | 216 | # endif |
@@ -272,6 +285,11 @@ typedef int pid_t; | |||
272 | # define HAVE_PID_T | 285 | # define HAVE_PID_T |
273 | #endif /* HAVE_PID_T */ | 286 | #endif /* HAVE_PID_T */ |
274 | 287 | ||
288 | #ifndef HAVE_SIG_ATOMIC_T | ||
289 | typedef int sig_atomic_t; | ||
290 | # define HAVE_SIG_ATOMIC_T | ||
291 | #endif /* HAVE_SIG_ATOMIC_T */ | ||
292 | |||
275 | #ifndef HAVE_MODE_T | 293 | #ifndef HAVE_MODE_T |
276 | typedef int mode_t; | 294 | typedef int mode_t; |
277 | # define HAVE_MODE_T | 295 | # define HAVE_MODE_T |