1/************************************************************************
2 *
3 * NSCA Common Config Header File
4 * Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org)
5 * Last Modified: 11-23-2007
6 *
7 * License:
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 ************************************************************************/
23
24#ifndef _CONFIG_H
25#define _CONFIG_H
26
27
28#include <stdio.h>
29#include <stdlib.h>
30
31#define DEFAULT_SERVER_PORT     @nsca_port@     /* default port to use */
32
33#define NSCA_LOG_FACILITY       @log_facility@
34
35#undef socklen_t
36
37#undef STDC_HEADERS
38#undef HAVE_SYSLOG_H
39#undef HAVE_STRDUP
40#undef HAVE_STRSTR
41#undef HAVE_STRTOUL
42#undef HAVE_INITGROUPS
43#undef HAVE_LIMITS_H
44#undef HAVE_SYS_RESOURCE_H
45#undef HAVE_SIGACTION
46
47#undef HAVE_LIBWRAP
48
49#define SOCKET_SIZE_TYPE ""
50#define GETGROUPS_T ""
51#define RETSIGTYPE ""
52
53
54#undef SIZEOF_INT
55#undef SIZEOF_SHORT
56#undef SIZEOF_LONG
57
58/* stupid stuff for u_int32_t */
59#undef U_INT32_T_IS_USHORT
60#undef U_INT32_T_IS_UINT
61#undef U_INT32_T_IS_ULONG
62#undef U_INT32_T_IS_UINT32_T
63
64#ifdef U_INT32_T_IS_USHORT
65typedef unsigned short u_int32_t;
66#endif
67#ifdef U_INT32_T_IS_ULONG
68typedef unsigned long u_int32_t;
69#endif
70#ifdef U_INT32_T_IS_UINT
71typedef unsigned int u_int32_t;
72#endif
73#ifdef U_INT32_T_IS_UINT32_t
74typedef uint32_t u_int32_t;
75#endif
76
77/* stupid stuff for int32_t */
78#undef INT32_T_IS_SHORT
79#undef INT32_T_IS_INT
80#undef INT32_T_IS_LONG
81
82#ifdef INT32_T_IS_USHORT
83typedef short int32_t;
84#endif
85#ifdef INT32_T_IS_ULONG
86typedef long int32_t;
87#endif
88#ifdef INT32_T_IS_UINT
89typedef int int32_t;
90#endif
91
92#undef HAVE_REGEX_H
93#ifdef HAVE_REGEX_H
94#include <regex.h>
95#endif
96
97#undef HAVE_STRINGS_H
98#undef HAVE_STRING_H
99#ifdef HAVE_STRINGS_H
100#include <strings.h>
101#endif
102#ifdef HAVE_STRINGS_H
103#include <string.h>
104#endif
105
106#undef HAVE_UNISTD_H
107#ifdef HAVE_UNISTD_H
108#include <unistd.h>
109#endif
110
111
112#undef HAVE_SIGNAL_H
113#ifdef HAVE_SIGNAL_H
114#include <signal.h>
115#endif
116
117#undef HAVE_SYSLOG_H
118#ifdef HAVE_SYSLOG_H
119#include <syslog.h>
120#endif
121
122#undef HAVE_SYS_INT_TYPES_H
123#ifdef HAVE_SYS_INT_TYPES_H
124#include <sys/int_types.h>
125#endif
126
127#undef HAVE_SYS_STAT_H
128#ifdef HAVE_SYS_STAT_H
129#include <sys/stat.h>
130#endif
131
132#undef HAVE_FCNTL_H
133#ifdef HAVE_FCNTL_H
134#include <fcntl.h>
135#endif
136
137#undef HAVE_STDINT_H
138#ifdef HAVE_STDINT_H
139#include <stdint.h>
140#endif
141
142#undef HAVE_SYS_POLL_H
143#ifdef HAVE_SYS_POLL_H
144#include <sys/poll.h>
145#endif
146
147#undef HAVE_SYS_TYPES_H
148#ifdef HAVE_SYS_TYPES_H
149#include <sys/types.h>
150#endif
151
152#undef HAVE_SYS_WAIT_H
153#ifdef HAVE_SYS_WAIT_H
154#include <sys/wait.h>
155#endif
156
157#ifndef WEXITSTATUS
158# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
159#endif
160#ifndef WIFEXITED
161# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
162#endif
163
164#undef HAVE_ERRNO_H
165#ifdef HAVE_ERRNO_H
166#include <errno.h>
167#endif
168
169/* needed for the time_t structures we use later... */
170#undef TIME_WITH_SYS_TIME
171#undef HAVE_SYS_TIME_H
172#if TIME_WITH_SYS_TIME
173# include <sys/time.h>
174# include <time.h>
175#else
176# if HAVE_SYS_TIME_H
177#  include <sys/time.h>
178# else
179#  include <time.h>
180# endif
181#endif
182
183
184#undef HAVE_SYS_SOCKET_H
185#ifdef HAVE_SYS_SOCKET_H
186#include <sys/socket.h>
187#endif
188
189#undef HAVE_SOCKET
190#ifdef HAVE_SOCKET_H
191#include <socket.h>
192#endif
193
194#undef HAVE_TCPD_H
195#ifdef HAVE_TCPD_H
196#include <tcpd.h>
197#endif
198
199#undef HAVE_NETINET_IN_H
200#ifdef HAVE_NETINET_IN_H
201#include <netinet/in.h>
202#endif
203
204#undef HAVE_ARPA_INET_H
205#ifdef HAVE_ARPA_INET_H
206#include <arpa/inet.h>
207#endif
208
209#undef HAVE_NETDB_H
210#ifdef HAVE_NETDB_H
211#include <netdb.h>
212#endif
213
214#undef HAVE_CTYPE_H
215#ifdef HAVE_CTYPE_H
216#include <ctype.h>
217#endif
218
219#undef HAVE_LIBMCRYPT
220#ifdef HAVE_LIBMCRYPT
221#include <mcrypt.h>
222#endif
223
224#undef HAVE_DB_H
225#ifdef HAVE_DB_H
226#include <db.h>
227#endif
228
229#undef HAVE_PWD_H
230#ifdef HAVE_PWD_H
231#include <pwd.h>
232#endif
233
234#undef HAVE_GRP_H
235#ifdef HAVE_GRP_H
236#include <grp.h>
237#endif
238
239#undef HAVE_INTTYPES_H
240#ifdef HAVE_INTTYPES_H
241#include <inttypes.h>
242#endif
243
244#undef HAVE_SYS_CONFIG_H
245#ifdef HAVE_SYS_CONFIG_H
246#include <sys/config.h>
247#endif
248
249#undef HAVE_INTTYPES_H
250#undef HAVE_STDINT_H
251#ifdef HAVE_INTTYPES_H
252#include <inttypes.h>
253#else
254#ifdef HAVE_STDINT_H
255#include <stdint.h>
256#endif
257#endif
258
259#endif
260