1 #ifndef DEFS_H
2 #define DEFS_H
3 
4 #ifdef HAVE_CONFIG_H
5 #include <config.h>
6 #endif
7 
8 #include <stdio.h>
9 
10 #if HAVE_SYS_TYPES_H
11 # include <sys/types.h>
12 #endif
13 
14 #if HAVE_SYS_STAT_H
15 # include <sys/stat.h>
16 #endif
17 
18 #if STDC_HEADERS
19 # include <stdlib.h>
20 # include <stddef.h>
21 #else
22 # if HAVE_STDLIB_H
23 #  include <stdlib.h>
24 # endif
25 #endif
26 
27 #if HAVE_STRING_H
28 # if !STDC_HEADERS && HAVE_MEMORY_H
29 #  include <memory.h>
30 # endif
31 # include <string.h>
32 #else
33 # if HAVE_STRINGS_H
34 #  include <strings.h>
35 # endif
36 #endif
37 
38 #if HAVE_INTTYPES_H
39 # include <inttypes.h>
40 #else
41 # if HAVE_STDINT_H
42 #  include <stdint.h>
43 # endif
44 #endif
45 
46 #if HAVE_UNISTD_H
47 # include <unistd.h>
48 #endif
49 
50 #if TIME_WITH_SYS_TIME
51 # include <sys/time.h>
52 # include <time.h>
53 #else
54 # if HAVE_SYS_TIME_H
55 #  include <sys/time.h>
56 # else
57 #  include <time.h>
58 # endif
59 #endif
60 
61 #if STDC_HEADERS
62 # include <string.h>
63 #else
64 # if !HAVE_MEMCPY
65 #  define memcpy(d, s, n) bcopy ((s), (d), (n))
66 #  define memmove(d, s, n) bcopy ((s), (d), (n))
67 # endif
68 #endif
69 
70 #if HAVE_NETINET_IN_H
71 # include <netinet/in.h>        /* for htonl and ntohl */
72 #endif
73 
74 #if HAVE_ERRNO_H
75 # include <errno.h>
76 #endif
77 
78 #if !HAVE_U_CHAR
79 	typedef unsigned char u_char;
80 #endif
81 
82 #if !HAVE_U_INT32_T
83 # if SIZEOF_INT == 4
84 	typedef unsigned int u_int32_t;
85 # else
86 #  if SIZEOF_LONG == 4
87 	typedef unsigned long u_int32_t;
88 #  endif
89 # endif
90 #endif
91 
92 #endif  /* DEFS_H */
93