root/src/noit_config.h.in

Revision 1d69a01311e58ce6ddb007d690b4e9aa4ac08c8c, 5.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 7 years ago)

And make it all work on OpenBSD (ld -E ? sigh...)

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2005-2007, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  *    * Redistributions of source code must retain the above copyright
10  *      notice, this list of conditions and the following disclaimer.
11  *    * Redistributions in binary form must reproduce the above
12  *      copyright notice, this list of conditions and the following
13  *      disclaimer in the documentation and/or other materials provided
14  *      with the distribution.
15  *    * Neither the name OmniTI Computer Consulting, Inc. nor the names
16  *      of its contributors may be used to endorse or promote products
17  *      derived from this software without specific prior written
18  *      permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #ifndef __NOIT_CONFIG_H
34 #define __NOIT_CONFIG_H
35
36 /* define inline unless that is what the compiler already calls it. */
37 #undef inline
38
39 #undef MODULEEXT
40 #undef MODULES_DIR
41 #undef ETC_DIR
42
43 #undef HAVE_FCNTL_H
44 #undef HAVE_UNISTD_H
45 #undef HAVE_SYS_TYPES_H
46 #undef HAVE_TERM_H
47 #undef HAVE_TERMIO_H
48 #undef HAVE_TERMIOS_H
49 #undef HAVE_UTIL_H
50 #undef HAVE_CURSES_H
51 #undef HAVE_DIRENT_H
52 #undef HAVE_PWD_H
53 #undef HAVE_ERRNO_H
54 #undef HAVE_STRING_H
55 #undef HAVE_STDLIB_H
56 #undef HAVE_SYS_PARAM_H
57 #undef HAVE_TIME_H
58 #undef HAVE_SYS_STAT_H
59 #undef HAVE_SYS_RESOURCE_H
60 #undef HAVE_SYS_CDEFS_H
61 #undef HAVE_LIBKERN_OSATOMIC_H
62 #undef HAVE_NETINET_IN_SYSTM_H
63 #undef HAVE_INT64_T
64 #undef HAVE_INTXX_T
65 #undef HAVE_LONG_LONG_INT
66 #undef HAVE_UINTXX_T
67 #undef HAVE_U_INT
68 #undef HAVE_U_INT64_T
69 #undef HAVE_U_INTXX_T
70 #define IFS_CH '/'
71
72 #ifdef HAVE_STRING_H
73 #include <string.h>
74 #endif
75 #ifdef HAVE_STDLIB_H
76 #include <stdlib.h>
77 #endif
78 #ifdef HAVE_SYS_PARAM_H
79 #include <sys/param.h>
80 #endif
81 #ifdef HAVE_SYS_TYPES_H
82 #include <sys/types.h>
83 #endif
84 #ifdef HAVE_SYS_STAT_H
85 #include <sys/stat.h>
86 #endif
87 #ifdef HAVE_SYS_RESOURCE_H
88 #include <sys/resource.h>
89 #endif
90
91 #undef HAVE_ISSETUGID
92 #undef HAVE_STRLCPY
93
94 /* Kernel kqueue() support */
95 #undef HAVE_KQUEUE
96
97 /* The number of bytes in a char.  */
98 #undef SIZEOF_CHAR
99
100 /* The number of bytes in a int.  */
101 #undef SIZEOF_INT
102
103 /* The number of bytes in a size_t.  */
104 #undef SIZEOF_SIZE_T
105
106
107 /* The number of bytes in a long int.  */
108 #undef SIZEOF_LONG_INT
109
110 /* The number of bytes in a long long int.  */
111 #undef SIZEOF_LONG_LONG_INT
112
113 /* The number of bytes in a short int.  */
114 #undef SIZEOF_SHORT_INT
115
116 /* The number of bytes in a void *.  */
117 #undef SIZEOF_VOID_P
118
119 #ifndef HAVE_U_INT
120 typedef unsigned int u_int;
121 #endif
122
123 #undef HAVE_INTXX_T
124 #ifndef HAVE_INTXX_T
125 #if (SIZEOF_CHAR == 1)
126 typedef char int8_t;
127 #else
128 #error "8 bit int type not found."
129 #endif
130 #if (SIZEOF_SHORT_INT == 2)
131 typedef short int int16_t;
132 #else
133 #ifdef _CRAY
134 typedef long int16_t;
135 #else
136 #warning "16 bit int type not found."
137 #endif /* _CRAY */
138 #endif
139 #if (SIZEOF_INT == 4)
140 typedef int int32_t;
141 #else
142 #ifdef _CRAY
143 typedef long int32_t;
144 #else
145 #error "32 bit int type not found."
146 #endif /* _CRAY */
147 #endif
148 #endif
149
150 /* If sys/types.h does not supply u_intXX_t, supply them ourselves */
151 #ifndef HAVE_U_INTXX_T
152 #ifdef HAVE_UINTXX_T
153 typedef uint8_t u_int8_t;
154 typedef uint16_t u_int16_t;
155 typedef uint32_t u_int32_t;
156 #define HAVE_U_INTXX_T 1
157 #else
158 #if (SIZEOF_CHAR == 1)
159 typedef unsigned char u_int8_t;
160 #else
161 #error "8 bit int type not found."
162 #endif
163 #if (SIZEOF_SHORT_INT == 2)
164 typedef unsigned short int u_int16_t;
165 #else
166 #ifdef _CRAY
167 typedef unsigned long u_int16_t;
168 #else
169 #warning "16 bit int type not found."
170 #endif
171 #endif
172 #if (SIZEOF_INT == 4)
173 typedef unsigned int u_int32_t;
174 #else
175 #ifdef _CRAY
176 typedef unsigned long u_int32_t;
177 #else
178 #error "32 bit int type not found."
179 #endif
180 #endif
181 #endif
182 #endif
183
184 /* 64-bit types */
185 #ifndef HAVE_INT64_T
186 #if (SIZEOF_LONG_INT == 8)
187 typedef long int int64_t;
188 #define HAVE_INT64_T 1
189 #else
190 #if (SIZEOF_LONG_LONG_INT == 8)
191 typedef long long int int64_t;
192 #define HAVE_INT64_T 1
193 #define HAVE_LONG_LONG_INT
194 #endif
195 #endif
196 #endif
197 #ifndef HAVE_U_INT64_T
198 #if (SIZEOF_LONG_INT == 8)
199 typedef unsigned long int u_int64_t;
200 #define HAVE_U_INT64_T 1
201 #else
202 #if (SIZEOF_LONG_LONG_INT == 8)
203 typedef unsigned long long int u_int64_t;
204 #define HAVE_U_INT64_T 1
205 #endif
206 #endif
207 #endif
208
209 #if (SIZEOF_VOID_P == 8)
210 typedef u_int64_t vpsized_uint;
211 typedef int64_t vpsized_int;
212 #elif (SIZEOF_VOID_P == 4)
213 typedef u_int32_t vpsized_uint;
214 typedef int32_t vpsized_int;
215 #else
216 #error Unsupported size of void ptr
217 #endif
218
219 #endif
Note: See TracBrowser for help on using the browser.