1 /* include/config.h.  Generated from config.h.in by configure.  */
2 /************************************************************************
3  *
4  * Nagios Config Header File
5  * Written By: Ethan Galstad (egalstad@nagios.org)
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  ************************************************************************/
20 
21 
22 /***** NAGIOS STUFF *****/
23 
24 #define DEFAULT_NAGIOS_USER "nagios"
25 #define DEFAULT_NAGIOS_GROUP "nagios"
26 
27 /* stop gcc from bitching about implicit asprintf declarations */
28 #define _GNU_SOURCE 1
29 
30 /* Event broker integration */
31 #define USE_EVENT_BROKER /**/
32 
33 /* commands used by CGIs */
34 #define TRACEROUTE_COMMAND "/usr/sbin/traceroute"
35 /* #undef PING_COMMAND */
36 /* #undef PING_PACKETS_FIRST */
37 
38 /* Debugging options */
39 /* function entry and exit */
40 /* #undef DEBUG0 */
41 /* general info messages */
42 /* #undef DEBUG1 */
43 /* warning messages */
44 /* #undef DEBUG2 */
45 /* service and host checks, other events */
46 /* #undef DEBUG3 */
47 /* service and host notifications */
48 /* #undef DEBUG4 */
49 /* SQL queries (defunct) */
50 /* #undef DEBUG5 */
51 
52 /* I/O implementations */
53 /* #undef USE_XSDDEFAULT */
54 /* #undef USE_XCDDEFAULT */
55 /* #undef USE_XRDDEFAULT */
56 /* #undef USE_XODTEMPLATE */
57 /* #undef USE_XPDDEFAULT */
58 /* #undef USE_XDDDEFAULT */
59 
60 
61 /***** CGI COMPILE OPTIONS *****/
62 /* should we compile and use the statusmap CGI? */
63 /* #undef USE_STATUSMAP */
64 /* should we compile and use the statuswrl CGI? */
65 #define USE_STATUSWRL /**/
66 /* should we compile and use the trends CGI? */
67 /* #undef USE_TRENDS */
68 /* should we compile and use the histogram CGI? */
69 /* #undef USE_HISTOGRAM */
70 
71 
72 
73 /***** FUNCTION DEFINITIONS *****/
74 
75 #define HAVE_SETENV 1
76 #define HAVE_UNSETENV 1
77 /* #undef HAVE_SOCKET */
78 #define HAVE_STRDUP 1
79 #define HAVE_STRSTR 1
80 #define HAVE_STRTOUL 1
81 #define HAVE_INITGROUPS 1
82 /* #undef HAVE_GETLOADAVG */
83 /* #undef HAVE_GDIMAGECREATETRUECOLOR */
84 
85 
86 
87 /***** ASPRINTF() AND FRIENDS *****/
88 
89 /* #undef HAVE_VSNPRINTF */
90 /* #undef HAVE_SNPRINTF */
91 /* #undef HAVE_ASPRINTF */
92 /* #undef HAVE_VASPRINTF */
93 #define HAVE_C99_VSNPRINTF 1
94 #define HAVE_VA_COPY 1
95 /* #undef HAVE___VA_COPY */
96 
97 
98 
99 /***** MISC DEFINITIONS *****/
100 
101 #define USE_NANOSLEEP /**/
102 #define STDC_HEADERS 1
103 #define HAVE_TM_ZONE 1
104 /* #undef HAVE_TZNAME */
105 /* #undef USE_PROC */
106 #define SOCKET_SIZE_TYPE size_t
107 #define GETGROUPS_T gid_t
108 #define RETSIGTYPE void
109 
110 
111 
112 /***** HEADER FILES *****/
113 
114 #include <stdio.h>
115 #include <stdlib.h>
116 
117 /* needed for the time_t structures we use later... */
118 /* this include must come before sys/resource.h or we can have problems on some OSes */
119 #define TIME_WITH_SYS_TIME 1
120 #define HAVE_SYS_TIME_H 1
121 #if TIME_WITH_SYS_TIME
122 #include <sys/time.h>
123 #include <time.h>
124 #else
125 #if HAVE_SYS_TIME_H
126 #include <sys/time.h>
127 #else
128 #include <time.h>
129 #endif
130 #endif
131 
132 #define HAVE_SYS_RESOURCE_H 1
133 #ifdef HAVE_SYS_RESOURCE_H
134 #include <sys/resource.h>
135 #endif
136 
137 #define HAVE_LIMITS_H 1
138 #ifdef HAVE_LIMITS_H
139 #include <limits.h>
140 #endif
141 
142 #define HAVE_PWD_H 1
143 #ifdef HAVE_PWD_H
144 #include <pwd.h>
145 #endif
146 
147 #define HAVE_GRP_H 1
148 #ifdef HAVE_GRP_H
149 #include <grp.h>
150 #endif
151 
152 #define HAVE_STRINGS_H 1
153 #ifdef HAVE_STRINGS_H
154 #include <strings.h>
155 #endif
156 
157 #define HAVE_STRING_H 1
158 #ifdef HAVE_STRINGS_H
159 #include <string.h>
160 #endif
161 
162 #define HAVE_UNISTD_H 1
163 #ifdef HAVE_UNISTD_H
164 #include <unistd.h>
165 #endif
166 
167 #define HAVE_SYSLOG_H 1
168 #ifdef HAVE_SYSLOG_H
169 #include <syslog.h>
170 #endif
171 
172 #define HAVE_SIGNAL_H 1
173 #ifdef HAVE_SIGNAL_H
174 #include <signal.h>
175 #endif
176 
177 #define HAVE_SYS_STAT_H 1
178 #ifdef HAVE_SYS_STAT_H
179 #include <sys/stat.h>
180 #endif
181 
182 #define HAVE_SYS_MMAN_H 1
183 #ifdef HAVE_SYS_MMAN_H
184 #include <sys/mman.h>
185 #endif
186 
187 #define HAVE_FCNTL_H 1
188 #ifdef HAVE_FCNTL_H
189 #include <fcntl.h>
190 #endif
191 
192 #define HAVE_STDARG_H 1
193 #ifdef HAVE_STDARG_H
194 #include <stdarg.h>
195 #endif
196 
197 #define HAVE_SYS_TYPES_H 1
198 #ifdef HAVE_SYS_TYPES_H
199 #include <sys/types.h>
200 #endif
201 
202 #define HAVE_SYS_WAIT_H 1
203 #ifdef HAVE_SYS_WAIT_H
204 #include <sys/wait.h>
205 #endif
206 
207 #define HAVE_ERRNO_H 1
208 #ifdef HAVE_ERRNO_H
209 #include <errno.h>
210 #endif
211 
212 #define HAVE_SYS_TIMEB_H 1
213 #if HAVE_SYS_TIMEB_H
214 #include <sys/timeb.h>
215 #endif
216 
217 #define HAVE_SYS_IPC_H 1
218 #ifdef HAVE_SYS_IPC_H
219 #include <sys/ipc.h>
220 #endif
221 
222 #define HAVE_SYS_MSG_H 1
223 #ifdef HAVE_SYS_MSG_H
224 #include <sys/msg.h>
225 #endif
226 
227 #define HAVE_MATH_H 1
228 #ifdef HAVE_MATH_H
229 #include <math.h>
230 #endif
231 
232 #define HAVE_CTYPE_H 1
233 #ifdef HAVE_CTYPE_H
234 #include <ctype.h>
235 #endif
236 
237 #define HAVE_DIRENT_H 1
238 #ifdef HAVE_DIRENT_H
239 #include <dirent.h>
240 #endif
241 
242 #define HAVE_REGEX_H 1
243 #ifdef HAVE_REGEX_H
244 #include <regex.h>
245 
246 #define HAVE_SYS_SOCKET_H 1
247 #ifdef HAVE_SYS_SOCKET_H
248 #include <sys/socket.h>
249 #endif
250 
251 /* #undef HAVE_SOCKET */
252 #ifdef HAVE_SOCKET_H
253 #include <socket.h>
254 #endif
255 
256 #define HAVE_NETINET_IN_H 1
257 #ifdef HAVE_NETINET_IN_H
258 #include <netinet/in.h>
259 #endif
260 
261 #define HAVE_ARPA_INET_H 1
262 #ifdef HAVE_ARPA_INET_H
263 #include <arpa/inet.h>
264 #endif
265 
266 #define HAVE_NETDB_H 1
267 #ifdef HAVE_NETDB_H
268 #include <netdb.h>
269 #endif
270 
271 #define HAVE_LIBGEN_H 1
272 #ifdef HAVE_LIBGEN_H
273 #include <libgen.h>
274 #endif
275 
276 #define HAVE_SYS_UN_H 1
277 #ifdef HAVE_SYS_UN_H
278 #include <sys/un.h>
279 #endif
280 
281 #define HAVE_SYS_POLL_H 1
282 #ifdef HAVE_SYS_POLL_H
283 #include <sys/poll.h>
284 #endif
285 
286 #define HAVE_GETOPT_H 1
287 #ifdef HAVE_GETOPT_H
288 #include <getopt.h>
289 #endif
290 
291 /* #undef HAVE_LINUX_MODULE_H */
292 #ifdef HAVE_LINUX_MODULE_H
293 #include <linux/module.h>
294 #endif
295 
296 #define HAVE_LOCALE_H 1
297 #ifdef HAVE_LOCALE_H
298 #include <locale.h>
299 #endif
300 
301 #define HAVE_WCHAR_H 1
302 #ifdef HAVE_WCHAR_H
303 #include <wchar.h>
304 #endif
305 
306 /* configure script should allow user to override ltdl choice, but this will do for now... */
307 /* #undef USE_LTDL */
308 /* #undef HAVE_LTDL_H */
309 #ifdef HAVE_LTDL_H
310 #define USE_LTDL
311 #endif
312 
313 #ifdef USE_LTDL
314 #include <ltdl.h>
315 #else
316 #define HAVE_DLFCN_H /**/
317 #ifdef HAVE_DLFCN_H
318 #include <dlfcn.h>
319 #endif
320 #endif
321 
322 
323 /* moved to end to prevent AIX compiler warnings */
324 #ifndef RTLD_GLOBAL
325 #define RTLD_GLOBAL 0
326 #endif
327 
328 #ifndef RTLD_NOW
329 #define RTLD_NOW 0
330 #endif
331 
332 
333 /***** MARO DEFINITIONS *****/
334 
335 /* this needs to come after all system include files, so we don't accidentally attempt to redefine it */
336 #ifndef WEXITSTATUS
337 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
338 #endif
339 #ifndef WIFEXITED
340 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
341 #endif
342 
343 
344 #endif
345