xref: /openbsd/usr.sbin/unbound/config.h.in (revision 24893edc)
1933707f3Ssthen/* config.h.in.  Generated from configure.ac by autoheader.  */
2933707f3Ssthen
3933707f3Ssthen/* Directory to chroot to */
4933707f3Ssthen#undef CHROOT_DIR
5933707f3Ssthen
698f3ca02Sbrad/* Do sha512 definitions in config.h */
798f3ca02Sbrad#undef COMPAT_SHA512
898f3ca02Sbrad
9933707f3Ssthen/* Pathname to the Unbound configuration file */
10933707f3Ssthen#undef CONFIGFILE
11933707f3Ssthen
12933707f3Ssthen/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work
13933707f3Ssthen   */
14933707f3Ssthen#undef DARWIN_BROKEN_SETREUID
15933707f3Ssthen
16933707f3Ssthen/* Whether daemon is deprecated */
17933707f3Ssthen#undef DEPRECATED_DAEMON
18933707f3Ssthen
1998f3ca02Sbrad/* default dnstap socket path */
2098f3ca02Sbrad#undef DNSTAP_SOCKET_PATH
2198f3ca02Sbrad
22933707f3Ssthen/* Define if you want to use debug lock checking (slow). */
23933707f3Ssthen#undef ENABLE_LOCK_CHECKS
24933707f3Ssthen
25933707f3Ssthen/* Define this if you enabled-allsymbols from libunbound to link binaries to
26933707f3Ssthen   it for smaller install size, but the libunbound export table is polluted by
27933707f3Ssthen   internal symbols */
28933707f3Ssthen#undef EXPORT_ALL_SYMBOLS
29933707f3Ssthen
3098f3ca02Sbrad/* Define to 1 if you have the `arc4random' function. */
3198f3ca02Sbrad#undef HAVE_ARC4RANDOM
3298f3ca02Sbrad
3398f3ca02Sbrad/* Define to 1 if you have the `arc4random_uniform' function. */
3498f3ca02Sbrad#undef HAVE_ARC4RANDOM_UNIFORM
3598f3ca02Sbrad
36933707f3Ssthen/* Define to 1 if you have the <arpa/inet.h> header file. */
37933707f3Ssthen#undef HAVE_ARPA_INET_H
38933707f3Ssthen
39933707f3Ssthen/* Whether the C compiler accepts the "format" attribute */
40933707f3Ssthen#undef HAVE_ATTR_FORMAT
41933707f3Ssthen
42933707f3Ssthen/* Whether the C compiler accepts the "unused" attribute */
43933707f3Ssthen#undef HAVE_ATTR_UNUSED
44933707f3Ssthen
45b2cdf21fSsthen/* Define to 1 if you have the `chown' function. */
46933707f3Ssthen#undef HAVE_CHOWN
47933707f3Ssthen
48933707f3Ssthen/* Define to 1 if you have the `chroot' function. */
49933707f3Ssthen#undef HAVE_CHROOT
50933707f3Ssthen
51933707f3Ssthen/* Define to 1 if you have the `ctime_r' function. */
52933707f3Ssthen#undef HAVE_CTIME_R
53933707f3Ssthen
54933707f3Ssthen/* Define to 1 if you have the `daemon' function. */
55933707f3Ssthen#undef HAVE_DAEMON
56933707f3Ssthen
5798f3ca02Sbrad/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
5898f3ca02Sbrad   don't. */
5998f3ca02Sbrad#undef HAVE_DECL_ARC4RANDOM
6098f3ca02Sbrad
6198f3ca02Sbrad/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
6298f3ca02Sbrad   if you don't. */
6398f3ca02Sbrad#undef HAVE_DECL_ARC4RANDOM_UNIFORM
6498f3ca02Sbrad
65d8d14d0cSsthen/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
66d8d14d0cSsthen   don't. */
67d8d14d0cSsthen#undef HAVE_DECL_NID_SECP384R1
68d8d14d0cSsthen
69d8d14d0cSsthen/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
70d8d14d0cSsthen   if you don't. */
71d8d14d0cSsthen#undef HAVE_DECL_NID_X9_62_PRIME256V1
72d8d14d0cSsthen
73fdfb4ba6Ssthen/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
74fdfb4ba6Ssthen   don't. */
75fdfb4ba6Ssthen#undef HAVE_DECL_REALLOCARRAY
76fdfb4ba6Ssthen
77933707f3Ssthen/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
78933707f3Ssthen   if you don't. */
79933707f3Ssthen#undef HAVE_DECL_SK_SSL_COMP_POP_FREE
80933707f3Ssthen
81933707f3Ssthen/* Define to 1 if you have the declaration of
82933707f3Ssthen   `SSL_COMP_get_compression_methods', and to 0 if you don't. */
83933707f3Ssthen#undef HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS
84933707f3Ssthen
85a961b961Ssthen/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
86a961b961Ssthen   0 if you don't. */
87a961b961Ssthen#undef HAVE_DECL_SSL_CTX_SET_ECDH_AUTO
88a961b961Ssthen
8998f3ca02Sbrad/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
9098f3ca02Sbrad   don't. */
9198f3ca02Sbrad#undef HAVE_DECL_STRLCAT
9298f3ca02Sbrad
9398f3ca02Sbrad/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
9498f3ca02Sbrad   don't. */
9598f3ca02Sbrad#undef HAVE_DECL_STRLCPY
9698f3ca02Sbrad
97*24893edcSsthen/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
98*24893edcSsthen   you don't. */
99*24893edcSsthen#undef HAVE_DECL_XML_STOPPARSER
100*24893edcSsthen
101933707f3Ssthen/* Define to 1 if you have the <dlfcn.h> header file. */
102933707f3Ssthen#undef HAVE_DLFCN_H
103933707f3Ssthen
10498f3ca02Sbrad/* Define to 1 if you have the <endian.h> header file. */
10598f3ca02Sbrad#undef HAVE_ENDIAN_H
10698f3ca02Sbrad
1075d76a658Ssthen/* Define to 1 if you have the `endprotoent' function. */
1085d76a658Ssthen#undef HAVE_ENDPROTOENT
1095d76a658Ssthen
1105d76a658Ssthen/* Define to 1 if you have the `endservent' function. */
1115d76a658Ssthen#undef HAVE_ENDSERVENT
1125d76a658Ssthen
113933707f3Ssthen/* Define to 1 if you have the `event_base_free' function. */
114933707f3Ssthen#undef HAVE_EVENT_BASE_FREE
115933707f3Ssthen
116933707f3Ssthen/* Define to 1 if you have the `event_base_get_method' function. */
117933707f3Ssthen#undef HAVE_EVENT_BASE_GET_METHOD
118933707f3Ssthen
119933707f3Ssthen/* Define to 1 if you have the `event_base_new' function. */
120933707f3Ssthen#undef HAVE_EVENT_BASE_NEW
121933707f3Ssthen
122933707f3Ssthen/* Define to 1 if you have the `event_base_once' function. */
123933707f3Ssthen#undef HAVE_EVENT_BASE_ONCE
124933707f3Ssthen
125933707f3Ssthen/* Define to 1 if you have the <event.h> header file. */
126933707f3Ssthen#undef HAVE_EVENT_H
127933707f3Ssthen
128933707f3Ssthen/* Define to 1 if you have the `EVP_sha1' function. */
129933707f3Ssthen#undef HAVE_EVP_SHA1
130933707f3Ssthen
131933707f3Ssthen/* Define to 1 if you have the `EVP_sha256' function. */
132933707f3Ssthen#undef HAVE_EVP_SHA256
133933707f3Ssthen
134933707f3Ssthen/* Define to 1 if you have the `EVP_sha512' function. */
135933707f3Ssthen#undef HAVE_EVP_SHA512
136933707f3Ssthen
137933707f3Ssthen/* Define to 1 if you have the `ev_default_loop' function. */
138933707f3Ssthen#undef HAVE_EV_DEFAULT_LOOP
139933707f3Ssthen
140933707f3Ssthen/* Define to 1 if you have the `ev_loop' function. */
141933707f3Ssthen#undef HAVE_EV_LOOP
142933707f3Ssthen
143933707f3Ssthen/* Define to 1 if you have the <expat.h> header file. */
144933707f3Ssthen#undef HAVE_EXPAT_H
145933707f3Ssthen
146933707f3Ssthen/* Define to 1 if you have the `fcntl' function. */
147933707f3Ssthen#undef HAVE_FCNTL
148933707f3Ssthen
1493dcb24b8Ssthen/* Define to 1 if you have the `FIPS_mode' function. */
1503dcb24b8Ssthen#undef HAVE_FIPS_MODE
1513dcb24b8Ssthen
152933707f3Ssthen/* Define to 1 if you have the `fork' function. */
153933707f3Ssthen#undef HAVE_FORK
154933707f3Ssthen
155933707f3Ssthen/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
156933707f3Ssthen#undef HAVE_FSEEKO
157933707f3Ssthen
158*24893edcSsthen/* Define to 1 if you have the `fsync' function. */
159*24893edcSsthen#undef HAVE_FSYNC
160*24893edcSsthen
161933707f3Ssthen/* Whether getaddrinfo is available */
162933707f3Ssthen#undef HAVE_GETADDRINFO
163933707f3Ssthen
164b2cdf21fSsthen/* Define to 1 if you have the `getauxval' function. */
165b2cdf21fSsthen#undef HAVE_GETAUXVAL
166b2cdf21fSsthen
16798f3ca02Sbrad/* Define to 1 if you have the `getentropy' function. */
16898f3ca02Sbrad#undef HAVE_GETENTROPY
16998f3ca02Sbrad
170933707f3Ssthen/* Define to 1 if you have the <getopt.h> header file. */
171933707f3Ssthen#undef HAVE_GETOPT_H
172933707f3Ssthen
173933707f3Ssthen/* Define to 1 if you have the `getpwnam' function. */
174933707f3Ssthen#undef HAVE_GETPWNAM
175933707f3Ssthen
176933707f3Ssthen/* Define to 1 if you have the `getrlimit' function. */
177933707f3Ssthen#undef HAVE_GETRLIMIT
178933707f3Ssthen
179933707f3Ssthen/* Define to 1 if you have the `glob' function. */
180933707f3Ssthen#undef HAVE_GLOB
181933707f3Ssthen
182933707f3Ssthen/* Define to 1 if you have the <glob.h> header file. */
183933707f3Ssthen#undef HAVE_GLOB_H
184933707f3Ssthen
185933707f3Ssthen/* Define to 1 if you have the `gmtime_r' function. */
186933707f3Ssthen#undef HAVE_GMTIME_R
187933707f3Ssthen
188933707f3Ssthen/* Define to 1 if you have the <grp.h> header file. */
189933707f3Ssthen#undef HAVE_GRP_H
190933707f3Ssthen
191933707f3Ssthen/* If you have HMAC_CTX_init */
192933707f3Ssthen#undef HAVE_HMAC_CTX_INIT
193933707f3Ssthen
194933707f3Ssthen/* Define to 1 if you have the `inet_aton' function. */
195933707f3Ssthen#undef HAVE_INET_ATON
196933707f3Ssthen
197933707f3Ssthen/* Define to 1 if you have the `inet_ntop' function. */
198933707f3Ssthen#undef HAVE_INET_NTOP
199933707f3Ssthen
200933707f3Ssthen/* Define to 1 if you have the `inet_pton' function. */
201933707f3Ssthen#undef HAVE_INET_PTON
202933707f3Ssthen
203933707f3Ssthen/* Define to 1 if you have the `initgroups' function. */
204933707f3Ssthen#undef HAVE_INITGROUPS
205933707f3Ssthen
206933707f3Ssthen/* Define to 1 if you have the <inttypes.h> header file. */
207933707f3Ssthen#undef HAVE_INTTYPES_H
208933707f3Ssthen
209933707f3Ssthen/* if the function 'ioctlsocket' is available */
210933707f3Ssthen#undef HAVE_IOCTLSOCKET
211933707f3Ssthen
212933707f3Ssthen/* Define to 1 if you have the <iphlpapi.h> header file. */
213933707f3Ssthen#undef HAVE_IPHLPAPI_H
214933707f3Ssthen
215*24893edcSsthen/* Define to 1 if you have the `isblank' function. */
216*24893edcSsthen#undef HAVE_ISBLANK
217*24893edcSsthen
218933707f3Ssthen/* Define to 1 if you have the `kill' function. */
219933707f3Ssthen#undef HAVE_KILL
220933707f3Ssthen
22198f3ca02Sbrad/* Define if we have LibreSSL */
22298f3ca02Sbrad#undef HAVE_LIBRESSL
22398f3ca02Sbrad
224933707f3Ssthen/* Define to 1 if you have the `localtime_r' function. */
225933707f3Ssthen#undef HAVE_LOCALTIME_R
226933707f3Ssthen
227933707f3Ssthen/* Define to 1 if you have the <login_cap.h> header file. */
228933707f3Ssthen#undef HAVE_LOGIN_CAP_H
229933707f3Ssthen
230933707f3Ssthen/* If have GNU libc compatible malloc */
231933707f3Ssthen#undef HAVE_MALLOC
232933707f3Ssthen
233933707f3Ssthen/* Define to 1 if you have the `memmove' function. */
234933707f3Ssthen#undef HAVE_MEMMOVE
235933707f3Ssthen
236933707f3Ssthen/* Define to 1 if you have the <memory.h> header file. */
237933707f3Ssthen#undef HAVE_MEMORY_H
238933707f3Ssthen
239933707f3Ssthen/* Define to 1 if you have the <netdb.h> header file. */
240933707f3Ssthen#undef HAVE_NETDB_H
241933707f3Ssthen
242933707f3Ssthen/* Define to 1 if you have the <netinet/in.h> header file. */
243933707f3Ssthen#undef HAVE_NETINET_IN_H
244933707f3Ssthen
245*24893edcSsthen/* Use libnettle for crypto */
246*24893edcSsthen#undef HAVE_NETTLE
247*24893edcSsthen
2483dcb24b8Ssthen/* Use libnss for crypto */
2493dcb24b8Ssthen#undef HAVE_NSS
2503dcb24b8Ssthen
251933707f3Ssthen/* Define to 1 if you have the `OPENSSL_config' function. */
252933707f3Ssthen#undef HAVE_OPENSSL_CONFIG
253933707f3Ssthen
254933707f3Ssthen/* Define to 1 if you have the <openssl/conf.h> header file. */
255933707f3Ssthen#undef HAVE_OPENSSL_CONF_H
256933707f3Ssthen
257933707f3Ssthen/* Define to 1 if you have the <openssl/engine.h> header file. */
258933707f3Ssthen#undef HAVE_OPENSSL_ENGINE_H
259933707f3Ssthen
260933707f3Ssthen/* Define to 1 if you have the <openssl/err.h> header file. */
261933707f3Ssthen#undef HAVE_OPENSSL_ERR_H
262933707f3Ssthen
263933707f3Ssthen/* Define to 1 if you have the <openssl/rand.h> header file. */
264933707f3Ssthen#undef HAVE_OPENSSL_RAND_H
265933707f3Ssthen
266933707f3Ssthen/* Define to 1 if you have the <openssl/ssl.h> header file. */
267933707f3Ssthen#undef HAVE_OPENSSL_SSL_H
268933707f3Ssthen
269933707f3Ssthen/* Define if you have POSIX threads libraries and header files. */
270933707f3Ssthen#undef HAVE_PTHREAD
271933707f3Ssthen
272229e174cSsthen/* Have PTHREAD_PRIO_INHERIT. */
273229e174cSsthen#undef HAVE_PTHREAD_PRIO_INHERIT
274229e174cSsthen
275933707f3Ssthen/* Define to 1 if the system has the type `pthread_rwlock_t'. */
276933707f3Ssthen#undef HAVE_PTHREAD_RWLOCK_T
277933707f3Ssthen
278933707f3Ssthen/* Define to 1 if the system has the type `pthread_spinlock_t'. */
279933707f3Ssthen#undef HAVE_PTHREAD_SPINLOCK_T
280933707f3Ssthen
281933707f3Ssthen/* Define to 1 if you have the <pwd.h> header file. */
282933707f3Ssthen#undef HAVE_PWD_H
283933707f3Ssthen
284933707f3Ssthen/* Define if you have Python libraries and header files. */
285933707f3Ssthen#undef HAVE_PYTHON
286933707f3Ssthen
287933707f3Ssthen/* Define to 1 if you have the `random' function. */
288933707f3Ssthen#undef HAVE_RANDOM
289933707f3Ssthen
290fdfb4ba6Ssthen/* Define to 1 if you have the `reallocarray' function. */
291fdfb4ba6Ssthen#undef HAVE_REALLOCARRAY
292fdfb4ba6Ssthen
293933707f3Ssthen/* Define to 1 if you have the `recvmsg' function. */
294933707f3Ssthen#undef HAVE_RECVMSG
295933707f3Ssthen
296933707f3Ssthen/* Define to 1 if you have the `sbrk' function. */
297933707f3Ssthen#undef HAVE_SBRK
298933707f3Ssthen
299933707f3Ssthen/* Define to 1 if you have the `sendmsg' function. */
300933707f3Ssthen#undef HAVE_SENDMSG
301933707f3Ssthen
302933707f3Ssthen/* Define to 1 if you have the `setregid' function. */
303933707f3Ssthen#undef HAVE_SETREGID
304933707f3Ssthen
305933707f3Ssthen/* Define to 1 if you have the `setresgid' function. */
306933707f3Ssthen#undef HAVE_SETRESGID
307933707f3Ssthen
308933707f3Ssthen/* Define to 1 if you have the `setresuid' function. */
309933707f3Ssthen#undef HAVE_SETRESUID
310933707f3Ssthen
311933707f3Ssthen/* Define to 1 if you have the `setreuid' function. */
312933707f3Ssthen#undef HAVE_SETREUID
313933707f3Ssthen
314933707f3Ssthen/* Define to 1 if you have the `setrlimit' function. */
315933707f3Ssthen#undef HAVE_SETRLIMIT
316933707f3Ssthen
317933707f3Ssthen/* Define to 1 if you have the `setsid' function. */
318933707f3Ssthen#undef HAVE_SETSID
319933707f3Ssthen
320933707f3Ssthen/* Define to 1 if you have the `setusercontext' function. */
321933707f3Ssthen#undef HAVE_SETUSERCONTEXT
322933707f3Ssthen
32398f3ca02Sbrad/* Define to 1 if you have the `SHA512_Update' function. */
32498f3ca02Sbrad#undef HAVE_SHA512_UPDATE
32598f3ca02Sbrad
326933707f3Ssthen/* Define to 1 if you have the `sigprocmask' function. */
327933707f3Ssthen#undef HAVE_SIGPROCMASK
328933707f3Ssthen
329933707f3Ssthen/* Define to 1 if you have the `sleep' function. */
330933707f3Ssthen#undef HAVE_SLEEP
331933707f3Ssthen
332933707f3Ssthen/* Define to 1 if you have the `snprintf' function. */
333933707f3Ssthen#undef HAVE_SNPRINTF
334933707f3Ssthen
335933707f3Ssthen/* Define to 1 if you have the `socketpair' function. */
336933707f3Ssthen#undef HAVE_SOCKETPAIR
337933707f3Ssthen
338933707f3Ssthen/* Using Solaris threads */
339933707f3Ssthen#undef HAVE_SOLARIS_THREADS
340933707f3Ssthen
341933707f3Ssthen/* Define to 1 if you have the `srandom' function. */
342933707f3Ssthen#undef HAVE_SRANDOM
343933707f3Ssthen
344933707f3Ssthen/* Define if you have the SSL libraries installed. */
345933707f3Ssthen#undef HAVE_SSL
346933707f3Ssthen
347933707f3Ssthen/* Define to 1 if you have the <stdarg.h> header file. */
348933707f3Ssthen#undef HAVE_STDARG_H
349933707f3Ssthen
350933707f3Ssthen/* Define to 1 if you have the <stdbool.h> header file. */
351933707f3Ssthen#undef HAVE_STDBOOL_H
352933707f3Ssthen
353933707f3Ssthen/* Define to 1 if you have the <stdint.h> header file. */
354933707f3Ssthen#undef HAVE_STDINT_H
355933707f3Ssthen
356933707f3Ssthen/* Define to 1 if you have the <stdlib.h> header file. */
357933707f3Ssthen#undef HAVE_STDLIB_H
358933707f3Ssthen
359933707f3Ssthen/* Define to 1 if you have the `strftime' function. */
360933707f3Ssthen#undef HAVE_STRFTIME
361933707f3Ssthen
362933707f3Ssthen/* Define to 1 if you have the <strings.h> header file. */
363933707f3Ssthen#undef HAVE_STRINGS_H
364933707f3Ssthen
365933707f3Ssthen/* Define to 1 if you have the <string.h> header file. */
366933707f3Ssthen#undef HAVE_STRING_H
367933707f3Ssthen
3685d76a658Ssthen/* Define to 1 if you have the `strlcat' function. */
3695d76a658Ssthen#undef HAVE_STRLCAT
3705d76a658Ssthen
371933707f3Ssthen/* Define to 1 if you have the `strlcpy' function. */
372933707f3Ssthen#undef HAVE_STRLCPY
373933707f3Ssthen
374933707f3Ssthen/* Define to 1 if you have the `strptime' function. */
375933707f3Ssthen#undef HAVE_STRPTIME
376933707f3Ssthen
377d8d14d0cSsthen/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
378d8d14d0cSsthen#undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST
379d8d14d0cSsthen
380b2cdf21fSsthen/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
381b2cdf21fSsthen#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
382b2cdf21fSsthen
383933707f3Ssthen/* Define if you have Swig libraries and header files. */
384933707f3Ssthen#undef HAVE_SWIG
385933707f3Ssthen
386933707f3Ssthen/* Define to 1 if you have the <syslog.h> header file. */
387933707f3Ssthen#undef HAVE_SYSLOG_H
388933707f3Ssthen
389933707f3Ssthen/* Define to 1 if you have the <sys/param.h> header file. */
390933707f3Ssthen#undef HAVE_SYS_PARAM_H
391933707f3Ssthen
392933707f3Ssthen/* Define to 1 if you have the <sys/resource.h> header file. */
393933707f3Ssthen#undef HAVE_SYS_RESOURCE_H
394933707f3Ssthen
39598f3ca02Sbrad/* Define to 1 if you have the <sys/sha2.h> header file. */
39698f3ca02Sbrad#undef HAVE_SYS_SHA2_H
39798f3ca02Sbrad
398933707f3Ssthen/* Define to 1 if you have the <sys/socket.h> header file. */
399933707f3Ssthen#undef HAVE_SYS_SOCKET_H
400933707f3Ssthen
401933707f3Ssthen/* Define to 1 if you have the <sys/stat.h> header file. */
402933707f3Ssthen#undef HAVE_SYS_STAT_H
403933707f3Ssthen
40498f3ca02Sbrad/* Define to 1 if you have the <sys/sysctl.h> header file. */
40598f3ca02Sbrad#undef HAVE_SYS_SYSCTL_H
40698f3ca02Sbrad
407933707f3Ssthen/* Define to 1 if you have the <sys/types.h> header file. */
408933707f3Ssthen#undef HAVE_SYS_TYPES_H
409933707f3Ssthen
410933707f3Ssthen/* Define to 1 if you have the <sys/uio.h> header file. */
411933707f3Ssthen#undef HAVE_SYS_UIO_H
412933707f3Ssthen
413b2cdf21fSsthen/* Define to 1 if you have the <sys/un.h> header file. */
414b2cdf21fSsthen#undef HAVE_SYS_UN_H
415b2cdf21fSsthen
416933707f3Ssthen/* Define to 1 if you have the <sys/wait.h> header file. */
417933707f3Ssthen#undef HAVE_SYS_WAIT_H
418933707f3Ssthen
419933707f3Ssthen/* Define to 1 if you have the <time.h> header file. */
420933707f3Ssthen#undef HAVE_TIME_H
421933707f3Ssthen
422933707f3Ssthen/* Define to 1 if you have the `tzset' function. */
423933707f3Ssthen#undef HAVE_TZSET
424933707f3Ssthen
425933707f3Ssthen/* Define to 1 if you have the <unistd.h> header file. */
426933707f3Ssthen#undef HAVE_UNISTD_H
427933707f3Ssthen
428933707f3Ssthen/* Define to 1 if you have the `usleep' function. */
429933707f3Ssthen#undef HAVE_USLEEP
430933707f3Ssthen
431933707f3Ssthen/* Define to 1 if you have the `vfork' function. */
432933707f3Ssthen#undef HAVE_VFORK
433933707f3Ssthen
434933707f3Ssthen/* Define to 1 if you have the <vfork.h> header file. */
435933707f3Ssthen#undef HAVE_VFORK_H
436933707f3Ssthen
437933707f3Ssthen/* Define to 1 if you have the <windows.h> header file. */
438933707f3Ssthen#undef HAVE_WINDOWS_H
439933707f3Ssthen
440933707f3Ssthen/* Using Windows threads */
441933707f3Ssthen#undef HAVE_WINDOWS_THREADS
442933707f3Ssthen
443933707f3Ssthen/* Define to 1 if you have the <winsock2.h> header file. */
444933707f3Ssthen#undef HAVE_WINSOCK2_H
445933707f3Ssthen
446933707f3Ssthen/* Define to 1 if `fork' works. */
447933707f3Ssthen#undef HAVE_WORKING_FORK
448933707f3Ssthen
449933707f3Ssthen/* Define to 1 if `vfork' works. */
450933707f3Ssthen#undef HAVE_WORKING_VFORK
451933707f3Ssthen
452933707f3Ssthen/* Define to 1 if you have the `writev' function. */
453933707f3Ssthen#undef HAVE_WRITEV
454933707f3Ssthen
455933707f3Ssthen/* Define to 1 if you have the <ws2tcpip.h> header file. */
456933707f3Ssthen#undef HAVE_WS2TCPIP_H
457933707f3Ssthen
458933707f3Ssthen/* Define to 1 if you have the `_beginthreadex' function. */
459933707f3Ssthen#undef HAVE__BEGINTHREADEX
460933707f3Ssthen
461933707f3Ssthen/* if lex has yylex_destroy */
462933707f3Ssthen#undef LEX_HAS_YYLEX_DESTROY
463933707f3Ssthen
464933707f3Ssthen/* Define to the sub-directory in which libtool stores uninstalled libraries.
465933707f3Ssthen   */
466933707f3Ssthen#undef LT_OBJDIR
467933707f3Ssthen
468933707f3Ssthen/* Define to the maximum message length to pass to syslog. */
469933707f3Ssthen#undef MAXSYSLOGMSGLEN
470933707f3Ssthen
471933707f3Ssthen/* Define if memcmp() does not compare unsigned bytes */
472933707f3Ssthen#undef MEMCMP_IS_BROKEN
473933707f3Ssthen
474933707f3Ssthen/* Define if mkdir has one argument. */
475933707f3Ssthen#undef MKDIR_HAS_ONE_ARG
476933707f3Ssthen
477933707f3Ssthen/* Define if the network stack does not fully support nonblocking io (causes
478933707f3Ssthen   lower performance). */
479933707f3Ssthen#undef NONBLOCKING_IS_BROKEN
480933707f3Ssthen
481933707f3Ssthen/* Put -D_ALL_SOURCE define in config.h */
482933707f3Ssthen#undef OMITTED__D_ALL_SOURCE
483933707f3Ssthen
484933707f3Ssthen/* Put -D_BSD_SOURCE define in config.h */
485933707f3Ssthen#undef OMITTED__D_BSD_SOURCE
486933707f3Ssthen
487933707f3Ssthen/* Put -D_GNU_SOURCE define in config.h */
488933707f3Ssthen#undef OMITTED__D_GNU_SOURCE
489933707f3Ssthen
490933707f3Ssthen/* Put -D_LARGEFILE_SOURCE=1 define in config.h */
491933707f3Ssthen#undef OMITTED__D_LARGEFILE_SOURCE_1
492933707f3Ssthen
493933707f3Ssthen/* Put -D_POSIX_C_SOURCE=200112 define in config.h */
494933707f3Ssthen#undef OMITTED__D_POSIX_C_SOURCE_200112
495933707f3Ssthen
496933707f3Ssthen/* Put -D_XOPEN_SOURCE=600 define in config.h */
497933707f3Ssthen#undef OMITTED__D_XOPEN_SOURCE_600
498933707f3Ssthen
499933707f3Ssthen/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */
500933707f3Ssthen#undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1
501933707f3Ssthen
502933707f3Ssthen/* Put -D__EXTENSIONS__ define in config.h */
503933707f3Ssthen#undef OMITTED__D__EXTENSIONS__
504933707f3Ssthen
505933707f3Ssthen/* Define to the address where bug reports for this package should be sent. */
506933707f3Ssthen#undef PACKAGE_BUGREPORT
507933707f3Ssthen
508933707f3Ssthen/* Define to the full name of this package. */
509933707f3Ssthen#undef PACKAGE_NAME
510933707f3Ssthen
511933707f3Ssthen/* Define to the full name and version of this package. */
512933707f3Ssthen#undef PACKAGE_STRING
513933707f3Ssthen
514933707f3Ssthen/* Define to the one symbol short name of this package. */
515933707f3Ssthen#undef PACKAGE_TARNAME
516933707f3Ssthen
517933707f3Ssthen/* Define to the home page for this package. */
518933707f3Ssthen#undef PACKAGE_URL
519933707f3Ssthen
520933707f3Ssthen/* Define to the version of this package. */
521933707f3Ssthen#undef PACKAGE_VERSION
522933707f3Ssthen
523933707f3Ssthen/* default pidfile location */
524933707f3Ssthen#undef PIDFILE
525933707f3Ssthen
526933707f3Ssthen/* Define to necessary symbol if this constant uses a non-standard name on
527933707f3Ssthen   your system. */
528933707f3Ssthen#undef PTHREAD_CREATE_JOINABLE
529933707f3Ssthen
530933707f3Ssthen/* Define as the return type of signal handlers (`int' or `void'). */
531933707f3Ssthen#undef RETSIGTYPE
532933707f3Ssthen
533933707f3Ssthen/* default rootkey location */
534933707f3Ssthen#undef ROOT_ANCHOR_FILE
535933707f3Ssthen
536933707f3Ssthen/* default rootcert location */
537933707f3Ssthen#undef ROOT_CERT_FILE
538933707f3Ssthen
539933707f3Ssthen/* version number for resource files */
540933707f3Ssthen#undef RSRC_PACKAGE_VERSION
541933707f3Ssthen
542933707f3Ssthen/* Directory to chdir to */
543933707f3Ssthen#undef RUN_DIR
544933707f3Ssthen
545933707f3Ssthen/* Shared data */
546933707f3Ssthen#undef SHARE_DIR
547933707f3Ssthen
5485d76a658Ssthen/* The size of `time_t', as computed by sizeof. */
5495d76a658Ssthen#undef SIZEOF_TIME_T
5505d76a658Ssthen
551*24893edcSsthen/* define if (v)snprintf does not return length needed, (but length used) */
552*24893edcSsthen#undef SNPRINTF_RET_BROKEN
553*24893edcSsthen
554933707f3Ssthen/* Define to 1 if you have the ANSI C header files. */
555933707f3Ssthen#undef STDC_HEADERS
556933707f3Ssthen
557933707f3Ssthen/* use default strptime. */
558933707f3Ssthen#undef STRPTIME_WORKS
559933707f3Ssthen
560933707f3Ssthen/* Use win32 resources and API */
561933707f3Ssthen#undef UB_ON_WINDOWS
562933707f3Ssthen
563933707f3Ssthen/* default username */
564933707f3Ssthen#undef UB_USERNAME
565933707f3Ssthen
566933707f3Ssthen/* use to enable lightweight alloc assertions, for debug use */
567933707f3Ssthen#undef UNBOUND_ALLOC_LITE
568933707f3Ssthen
569933707f3Ssthen/* use malloc not regions, for debug use */
570933707f3Ssthen#undef UNBOUND_ALLOC_NONREGIONAL
571933707f3Ssthen
572933707f3Ssthen/* use statistics for allocs and frees, for debug use */
573933707f3Ssthen#undef UNBOUND_ALLOC_STATS
574933707f3Ssthen
575933707f3Ssthen/* define this to enable debug checks. */
576933707f3Ssthen#undef UNBOUND_DEBUG
577933707f3Ssthen
57898f3ca02Sbrad/* Define to 1 to enable dnstap support */
57998f3ca02Sbrad#undef USE_DNSTAP
58098f3ca02Sbrad
581d8d14d0cSsthen/* Define this to enable ECDSA support. */
582d8d14d0cSsthen#undef USE_ECDSA
583d8d14d0cSsthen
584d8d14d0cSsthen/* Define this to enable an EVP workaround for older openssl */
585d8d14d0cSsthen#undef USE_ECDSA_EVP_WORKAROUND
586d8d14d0cSsthen
587933707f3Ssthen/* Define this to enable GOST support. */
588933707f3Ssthen#undef USE_GOST
589933707f3Ssthen
590933707f3Ssthen/* Define if you want to use internal select based events */
591933707f3Ssthen#undef USE_MINI_EVENT
592933707f3Ssthen
593933707f3Ssthen/* Define this to enable SHA256 and SHA512 support. */
594933707f3Ssthen#undef USE_SHA2
595933707f3Ssthen
596933707f3Ssthen/* Enable extensions on AIX 3, Interix.  */
597933707f3Ssthen#ifndef _ALL_SOURCE
598933707f3Ssthen# undef _ALL_SOURCE
599933707f3Ssthen#endif
600933707f3Ssthen/* Enable GNU extensions on systems that have them.  */
601933707f3Ssthen#ifndef _GNU_SOURCE
602933707f3Ssthen# undef _GNU_SOURCE
603933707f3Ssthen#endif
604933707f3Ssthen/* Enable threading extensions on Solaris.  */
605933707f3Ssthen#ifndef _POSIX_PTHREAD_SEMANTICS
606933707f3Ssthen# undef _POSIX_PTHREAD_SEMANTICS
607933707f3Ssthen#endif
608933707f3Ssthen/* Enable extensions on HP NonStop.  */
609933707f3Ssthen#ifndef _TANDEM_SOURCE
610933707f3Ssthen# undef _TANDEM_SOURCE
611933707f3Ssthen#endif
612933707f3Ssthen/* Enable general extensions on Solaris.  */
613933707f3Ssthen#ifndef __EXTENSIONS__
614933707f3Ssthen# undef __EXTENSIONS__
615933707f3Ssthen#endif
616933707f3Ssthen
617933707f3Ssthen
618933707f3Ssthen/* Whether the windows socket API is used */
619933707f3Ssthen#undef USE_WINSOCK
620933707f3Ssthen
621933707f3Ssthen/* the version of the windows API enabled */
622933707f3Ssthen#undef WINVER
623933707f3Ssthen
624933707f3Ssthen/* Define if you want Python module. */
625933707f3Ssthen#undef WITH_PYTHONMODULE
626933707f3Ssthen
627933707f3Ssthen/* Define if you want PyUnbound. */
628933707f3Ssthen#undef WITH_PYUNBOUND
629933707f3Ssthen
630933707f3Ssthen/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
631933707f3Ssthen   `char[]'. */
632933707f3Ssthen#undef YYTEXT_POINTER
633933707f3Ssthen
634229e174cSsthen/* Enable large inode numbers on Mac OS X 10.5.  */
635229e174cSsthen#ifndef _DARWIN_USE_64_BIT_INODE
636229e174cSsthen# define _DARWIN_USE_64_BIT_INODE 1
637229e174cSsthen#endif
638229e174cSsthen
639933707f3Ssthen/* Number of bits in a file offset, on hosts where this is settable. */
640933707f3Ssthen#undef _FILE_OFFSET_BITS
641933707f3Ssthen
642933707f3Ssthen/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
643933707f3Ssthen#undef _LARGEFILE_SOURCE
644933707f3Ssthen
645933707f3Ssthen/* Define for large files, on AIX-style hosts. */
646933707f3Ssthen#undef _LARGE_FILES
647933707f3Ssthen
648933707f3Ssthen/* Define to 1 if on MINIX. */
649933707f3Ssthen#undef _MINIX
650933707f3Ssthen
6515d76a658Ssthen/* Enable for compile on Minix */
6525d76a658Ssthen#undef _NETBSD_SOURCE
6535d76a658Ssthen
654933707f3Ssthen/* Define to 2 if the system does not provide POSIX.1 features except with
655933707f3Ssthen   this defined. */
656933707f3Ssthen#undef _POSIX_1_SOURCE
657933707f3Ssthen
658933707f3Ssthen/* Define to 1 if you need to in order for `stat' and other things to work. */
659933707f3Ssthen#undef _POSIX_SOURCE
660933707f3Ssthen
661933707f3Ssthen/* Define to empty if `const' does not conform to ANSI C. */
662933707f3Ssthen#undef const
663933707f3Ssthen
664933707f3Ssthen/* Define to `int' if <sys/types.h> doesn't define. */
665933707f3Ssthen#undef gid_t
666933707f3Ssthen
667933707f3Ssthen/* in_addr_t */
668933707f3Ssthen#undef in_addr_t
669933707f3Ssthen
670933707f3Ssthen/* in_port_t */
671933707f3Ssthen#undef in_port_t
672933707f3Ssthen
673933707f3Ssthen/* Define to `__inline__' or `__inline' if that's what the C compiler
674933707f3Ssthen   calls it, or to nothing if 'inline' is not supported under any name.  */
675933707f3Ssthen#ifndef __cplusplus
676933707f3Ssthen#undef inline
677933707f3Ssthen#endif
678933707f3Ssthen
679933707f3Ssthen/* Define to `short' if <sys/types.h> does not define. */
680933707f3Ssthen#undef int16_t
681933707f3Ssthen
682933707f3Ssthen/* Define to `int' if <sys/types.h> does not define. */
683933707f3Ssthen#undef int32_t
684933707f3Ssthen
685933707f3Ssthen/* Define to `long long' if <sys/types.h> does not define. */
686933707f3Ssthen#undef int64_t
687933707f3Ssthen
688933707f3Ssthen/* Define to `signed char' if <sys/types.h> does not define. */
689933707f3Ssthen#undef int8_t
690933707f3Ssthen
691933707f3Ssthen/* Define if replacement function should be used. */
692933707f3Ssthen#undef malloc
693933707f3Ssthen
694933707f3Ssthen/* Define to `long int' if <sys/types.h> does not define. */
695933707f3Ssthen#undef off_t
696933707f3Ssthen
697933707f3Ssthen/* Define to `int' if <sys/types.h> does not define. */
698933707f3Ssthen#undef pid_t
699933707f3Ssthen
700933707f3Ssthen/* Define to 'int' if not defined */
701933707f3Ssthen#undef rlim_t
702933707f3Ssthen
703933707f3Ssthen/* Define to `unsigned int' if <sys/types.h> does not define. */
704933707f3Ssthen#undef size_t
705933707f3Ssthen
706933707f3Ssthen/* Define to 'int' if not defined */
707933707f3Ssthen#undef socklen_t
708933707f3Ssthen
709933707f3Ssthen/* Define to `int' if <sys/types.h> does not define. */
710933707f3Ssthen#undef ssize_t
711933707f3Ssthen
712933707f3Ssthen/* Define to 'unsigned char if not defined */
713933707f3Ssthen#undef u_char
714933707f3Ssthen
715933707f3Ssthen/* Define to `int' if <sys/types.h> doesn't define. */
716933707f3Ssthen#undef uid_t
717933707f3Ssthen
718933707f3Ssthen/* Define to `unsigned short' if <sys/types.h> does not define. */
719933707f3Ssthen#undef uint16_t
720933707f3Ssthen
721933707f3Ssthen/* Define to `unsigned int' if <sys/types.h> does not define. */
722933707f3Ssthen#undef uint32_t
723933707f3Ssthen
724933707f3Ssthen/* Define to `unsigned long long' if <sys/types.h> does not define. */
725933707f3Ssthen#undef uint64_t
726933707f3Ssthen
727933707f3Ssthen/* Define to `unsigned char' if <sys/types.h> does not define. */
728933707f3Ssthen#undef uint8_t
729933707f3Ssthen
730933707f3Ssthen/* Define as `fork' if `vfork' does not work. */
731933707f3Ssthen#undef vfork
732933707f3Ssthen
733933707f3Ssthen#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
734933707f3Ssthen#define _GNU_SOURCE 1
735933707f3Ssthen#endif
736933707f3Ssthen
737933707f3Ssthen#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE)
738933707f3Ssthen#define _BSD_SOURCE 1
739933707f3Ssthen#endif
740933707f3Ssthen
741933707f3Ssthen#if defined(OMITTED__D__EXTENSIONS__) && !defined(__EXTENSIONS__)
742933707f3Ssthen#define __EXTENSIONS__ 1
743933707f3Ssthen#endif
744933707f3Ssthen
745933707f3Ssthen#if defined(OMITTED__D_POSIX_C_SOURCE_200112) && !defined(_POSIX_C_SOURCE)
746933707f3Ssthen#define _POSIX_C_SOURCE 200112
747933707f3Ssthen#endif
748933707f3Ssthen
749933707f3Ssthen#if defined(OMITTED__D_XOPEN_SOURCE_600) && !defined(_XOPEN_SOURCE)
750933707f3Ssthen#define _XOPEN_SOURCE 600
751933707f3Ssthen#endif
752933707f3Ssthen
753933707f3Ssthen#if defined(OMITTED__D_XOPEN_SOURCE_EXTENDED_1) && !defined(_XOPEN_SOURCE_EXTENDED)
754933707f3Ssthen#define _XOPEN_SOURCE_EXTENDED 1
755933707f3Ssthen#endif
756933707f3Ssthen
757933707f3Ssthen#if defined(OMITTED__D_ALL_SOURCE) && !defined(_ALL_SOURCE)
758933707f3Ssthen#define _ALL_SOURCE 1
759933707f3Ssthen#endif
760933707f3Ssthen
761933707f3Ssthen#if defined(OMITTED__D_LARGEFILE_SOURCE_1) && !defined(_LARGEFILE_SOURCE)
762933707f3Ssthen#define _LARGEFILE_SOURCE 1
763933707f3Ssthen#endif
764933707f3Ssthen
765933707f3Ssthen
766933707f3Ssthen
767933707f3Ssthen
768933707f3Ssthen#ifndef UNBOUND_DEBUG
769933707f3Ssthen#  define NDEBUG
770933707f3Ssthen#endif
771933707f3Ssthen
7725d76a658Ssthen/** Use small-ldns codebase */
7735d76a658Ssthen#define USE_SLDNS 1
7745d76a658Ssthen#ifdef HAVE_SSL
7755d76a658Ssthen#  define LDNS_BUILD_CONFIG_HAVE_SSL 1
7765d76a658Ssthen#endif
7775d76a658Ssthen
778933707f3Ssthen#include <stdio.h>
779933707f3Ssthen#include <string.h>
780933707f3Ssthen#include <unistd.h>
781933707f3Ssthen#include <assert.h>
782933707f3Ssthen
783933707f3Ssthen#if STDC_HEADERS
784933707f3Ssthen#include <stdlib.h>
785933707f3Ssthen#include <stddef.h>
786933707f3Ssthen#endif
787933707f3Ssthen
7885d76a658Ssthen#ifdef HAVE_STDARG_H
7895d76a658Ssthen#include <stdarg.h>
7905d76a658Ssthen#endif
7915d76a658Ssthen
792933707f3Ssthen#ifdef HAVE_STDINT_H
793933707f3Ssthen#include <stdint.h>
794933707f3Ssthen#endif
795933707f3Ssthen
796933707f3Ssthen#include <errno.h>
797933707f3Ssthen
798933707f3Ssthen#if HAVE_SYS_PARAM_H
799933707f3Ssthen#include <sys/param.h>
800933707f3Ssthen#endif
801933707f3Ssthen
802933707f3Ssthen#ifdef HAVE_SYS_SOCKET_H
803933707f3Ssthen#include <sys/socket.h>
804933707f3Ssthen#endif
805933707f3Ssthen
806933707f3Ssthen#ifdef HAVE_SYS_UIO_H
807933707f3Ssthen#include <sys/uio.h>
808933707f3Ssthen#endif
809933707f3Ssthen
810933707f3Ssthen#ifdef HAVE_NETINET_IN_H
811933707f3Ssthen#include <netinet/in.h>
812933707f3Ssthen#endif
813933707f3Ssthen
814933707f3Ssthen#ifdef HAVE_ARPA_INET_H
815933707f3Ssthen#include <arpa/inet.h>
816933707f3Ssthen#endif
817933707f3Ssthen
818933707f3Ssthen#ifdef HAVE_WINSOCK2_H
819933707f3Ssthen#include <winsock2.h>
820933707f3Ssthen#endif
821933707f3Ssthen
822933707f3Ssthen#ifdef HAVE_WS2TCPIP_H
823933707f3Ssthen#include <ws2tcpip.h>
824933707f3Ssthen#endif
825933707f3Ssthen
8265d76a658Ssthen#ifndef USE_WINSOCK
8275d76a658Ssthen#define ARG_LL "%ll"
8285d76a658Ssthen#else
8295d76a658Ssthen#define ARG_LL "%I64"
8305d76a658Ssthen#endif
8315d76a658Ssthen
832b2cdf21fSsthen#ifndef AF_LOCAL
833b2cdf21fSsthen#define AF_LOCAL AF_UNIX
834b2cdf21fSsthen#endif
835b2cdf21fSsthen
836933707f3Ssthen
837933707f3Ssthen
838933707f3Ssthen#ifdef HAVE_ATTR_FORMAT
839933707f3Ssthen#  define ATTR_FORMAT(archetype, string_index, first_to_check) \
840933707f3Ssthen    __attribute__ ((format (archetype, string_index, first_to_check)))
841933707f3Ssthen#else /* !HAVE_ATTR_FORMAT */
842933707f3Ssthen#  define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
843933707f3Ssthen#endif /* !HAVE_ATTR_FORMAT */
844933707f3Ssthen
845933707f3Ssthen
846933707f3Ssthen#if defined(DOXYGEN)
847933707f3Ssthen#  define ATTR_UNUSED(x)  x
848933707f3Ssthen#elif defined(__cplusplus)
849933707f3Ssthen#  define ATTR_UNUSED(x)
850933707f3Ssthen#elif defined(HAVE_ATTR_UNUSED)
851933707f3Ssthen#  define ATTR_UNUSED(x)  x __attribute__((unused))
852933707f3Ssthen#else /* !HAVE_ATTR_UNUSED */
853933707f3Ssthen#  define ATTR_UNUSED(x)  x
854933707f3Ssthen#endif /* !HAVE_ATTR_UNUSED */
855933707f3Ssthen
856933707f3Ssthen
857933707f3Ssthen#ifndef HAVE_FSEEKO
858933707f3Ssthen#define fseeko fseek
859933707f3Ssthen#define ftello ftell
860933707f3Ssthen#endif /* HAVE_FSEEKO */
861933707f3Ssthen
862933707f3Ssthen
863933707f3Ssthen#ifndef MAXHOSTNAMELEN
864933707f3Ssthen#define MAXHOSTNAMELEN 256
865933707f3Ssthen#endif
866933707f3Ssthen
867*24893edcSsthen#if !defined(HAVE_SNPRINTF) || defined(SNPRINTF_RET_BROKEN)
868933707f3Ssthen#define snprintf snprintf_unbound
869933707f3Ssthen#define vsnprintf vsnprintf_unbound
870933707f3Ssthen#include <stdarg.h>
871933707f3Ssthenint snprintf (char *str, size_t count, const char *fmt, ...);
872933707f3Ssthenint vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
873*24893edcSsthen#endif /* HAVE_SNPRINTF or SNPRINTF_RET_BROKEN */
874933707f3Ssthen
875933707f3Ssthen#ifndef HAVE_INET_PTON
876933707f3Ssthen#define inet_pton inet_pton_unbound
877933707f3Ssthenint inet_pton(int af, const char* src, void* dst);
878933707f3Ssthen#endif /* HAVE_INET_PTON */
879933707f3Ssthen
880933707f3Ssthen
881933707f3Ssthen#ifndef HAVE_INET_NTOP
882933707f3Ssthen#define inet_ntop inet_ntop_unbound
883933707f3Ssthenconst char *inet_ntop(int af, const void *src, char *dst, size_t size);
884933707f3Ssthen#endif
885933707f3Ssthen
886933707f3Ssthen
887933707f3Ssthen#ifndef HAVE_INET_ATON
888933707f3Ssthen#define inet_aton inet_aton_unbound
889933707f3Ssthenint inet_aton(const char *cp, struct in_addr *addr);
890933707f3Ssthen#endif
891933707f3Ssthen
892933707f3Ssthen
893933707f3Ssthen#ifndef HAVE_MEMMOVE
894933707f3Ssthen#define memmove memmove_unbound
895933707f3Ssthenvoid *memmove(void *dest, const void *src, size_t n);
896933707f3Ssthen#endif
897933707f3Ssthen
898933707f3Ssthen
8995d76a658Ssthen#ifndef HAVE_STRLCAT
9005d76a658Ssthen#define strlcat strlcat_unbound
9015d76a658Ssthensize_t strlcat(char *dst, const char *src, size_t siz);
9025d76a658Ssthen#endif
9035d76a658Ssthen
9045d76a658Ssthen
905933707f3Ssthen#ifndef HAVE_STRLCPY
906933707f3Ssthen#define strlcpy strlcpy_unbound
907933707f3Ssthensize_t strlcpy(char *dst, const char *src, size_t siz);
908933707f3Ssthen#endif
909933707f3Ssthen
910933707f3Ssthen
911933707f3Ssthen#ifndef HAVE_GMTIME_R
912933707f3Ssthen#define gmtime_r gmtime_r_unbound
913933707f3Ssthenstruct tm *gmtime_r(const time_t *timep, struct tm *result);
914933707f3Ssthen#endif
915933707f3Ssthen
916933707f3Ssthen
917fdfb4ba6Ssthen#ifndef HAVE_REALLOCARRAY
918fdfb4ba6Ssthen#define reallocarray reallocarrayunbound
919fdfb4ba6Ssthenvoid* reallocarray(void *ptr, size_t nmemb, size_t size);
920fdfb4ba6Ssthen#endif
921fdfb4ba6Ssthen
922fdfb4ba6Ssthen
923229e174cSsthen#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
924933707f3Ssthen#define sleep(x) Sleep((x)*1000) /* on win32 */
925933707f3Ssthen#endif /* HAVE_SLEEP */
926933707f3Ssthen
927933707f3Ssthen
928933707f3Ssthen#ifndef HAVE_USLEEP
929933707f3Ssthen#define usleep(x) Sleep((x)/1000 + 1) /* on win32 */
930933707f3Ssthen#endif /* HAVE_USLEEP */
931933707f3Ssthen
932933707f3Ssthen
933933707f3Ssthen#ifndef HAVE_RANDOM
934933707f3Ssthen#define random rand /* on win32, for tests only (bad random) */
935933707f3Ssthen#endif /* HAVE_RANDOM */
936933707f3Ssthen
937933707f3Ssthen
938933707f3Ssthen#ifndef HAVE_SRANDOM
939933707f3Ssthen#define srandom(x) srand(x) /* on win32, for tests only (bad random) */
940933707f3Ssthen#endif /* HAVE_SRANDOM */
941933707f3Ssthen
942933707f3Ssthen
943933707f3Ssthen/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
944933707f3Ssthen#ifdef HAVE_WINSOCK2_H
945933707f3Ssthen#define FD_SET_T (u_int)
946933707f3Ssthen#else
947933707f3Ssthen#define FD_SET_T
948933707f3Ssthen#endif
949933707f3Ssthen
950933707f3Ssthen
951933707f3Ssthen#ifndef IPV6_MIN_MTU
952933707f3Ssthen#define IPV6_MIN_MTU 1280
953933707f3Ssthen#endif /* IPV6_MIN_MTU */
954933707f3Ssthen
955933707f3Ssthen
956933707f3Ssthen#ifdef MEMCMP_IS_BROKEN
957d8d14d0cSsthen#include "compat/memcmp.h"
958933707f3Ssthen#define memcmp memcmp_unbound
959933707f3Ssthenint memcmp(const void *x, const void *y, size_t n);
960933707f3Ssthen#endif
961933707f3Ssthen
962933707f3Ssthen
963933707f3Ssthen
964933707f3Ssthen#ifndef HAVE_CTIME_R
965933707f3Ssthen#define ctime_r unbound_ctime_r
966933707f3Ssthenchar *ctime_r(const time_t *timep, char *buf);
967933707f3Ssthen#endif
968933707f3Ssthen
969*24893edcSsthen#ifndef HAVE_ISBLANK
970*24893edcSsthen#define isblank unbound_isblank
971*24893edcSsthenint isblank(int c);
972*24893edcSsthen#endif
973*24893edcSsthen
974933707f3Ssthen#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
975933707f3Ssthen#define strptime unbound_strptime
976933707f3Ssthenstruct tm;
977933707f3Ssthenchar *strptime(const char *s, const char *format, struct tm *tm);
978933707f3Ssthen#endif
979933707f3Ssthen
98098f3ca02Sbrad#ifdef HAVE_LIBRESSL
98198f3ca02Sbrad#  if !HAVE_DECL_STRLCPY
98298f3ca02Sbradsize_t strlcpy(char *dst, const char *src, size_t siz);
98398f3ca02Sbrad#  endif
98498f3ca02Sbrad#  if !HAVE_DECL_STRLCAT
98598f3ca02Sbradsize_t strlcat(char *dst, const char *src, size_t siz);
98698f3ca02Sbrad#  endif
98798f3ca02Sbrad#  if !HAVE_DECL_ARC4RANDOM && defined(HAVE_ARC4RANDOM)
98898f3ca02Sbraduint32_t arc4random(void);
98998f3ca02Sbrad#  endif
99098f3ca02Sbrad#  if !HAVE_DECL_ARC4RANDOM_UNIFORM && defined(HAVE_ARC4RANDOM_UNIFORM)
99198f3ca02Sbraduint32_t arc4random_uniform(uint32_t upper_bound);
99298f3ca02Sbrad#  endif
993fdfb4ba6Ssthen#  if !HAVE_DECL_REALLOCARRAY
994fdfb4ba6Ssthenvoid *reallocarray(void *ptr, size_t nmemb, size_t size);
995fdfb4ba6Ssthen#  endif
99698f3ca02Sbrad#endif /* HAVE_LIBRESSL */
99798f3ca02Sbrad#ifndef HAVE_ARC4RANDOM
99898f3ca02Sbradvoid explicit_bzero(void* buf, size_t len);
99998f3ca02Sbradint getentropy(void* buf, size_t len);
100098f3ca02Sbraduint32_t arc4random(void);
100198f3ca02Sbradvoid arc4random_buf(void* buf, size_t n);
100298f3ca02Sbradvoid _ARC4_LOCK(void);
100398f3ca02Sbradvoid _ARC4_UNLOCK(void);
100498f3ca02Sbrad#endif
100598f3ca02Sbrad#ifndef HAVE_ARC4RANDOM_UNIFORM
100698f3ca02Sbraduint32_t arc4random_uniform(uint32_t upper_bound);
100798f3ca02Sbrad#endif
100898f3ca02Sbrad#ifdef COMPAT_SHA512
100998f3ca02Sbrad#ifndef SHA512_DIGEST_LENGTH
101098f3ca02Sbrad#define SHA512_BLOCK_LENGTH		128
101198f3ca02Sbrad#define SHA512_DIGEST_LENGTH		64
101298f3ca02Sbrad#define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
101398f3ca02Sbradtypedef struct _SHA512_CTX {
101498f3ca02Sbrad	uint64_t	state[8];
101598f3ca02Sbrad	uint64_t	bitcount[2];
101698f3ca02Sbrad	uint8_t	buffer[SHA512_BLOCK_LENGTH];
101798f3ca02Sbrad} SHA512_CTX;
101898f3ca02Sbrad#endif /* SHA512_DIGEST_LENGTH */
101998f3ca02Sbradvoid SHA512_Init(SHA512_CTX*);
102098f3ca02Sbradvoid SHA512_Update(SHA512_CTX*, void*, size_t);
102198f3ca02Sbradvoid SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
102298f3ca02Sbradunsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
102398f3ca02Sbrad#endif /* COMPAT_SHA512 */
102498f3ca02Sbrad
102598f3ca02Sbrad
102698f3ca02Sbrad
1027933707f3Ssthen#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
1028933707f3Ssthen   /* using version of libevent that is not threadsafe. */
1029933707f3Ssthen#  define LIBEVENT_SIGNAL_PROBLEM 1
1030933707f3Ssthen#endif
1031933707f3Ssthen
1032933707f3Ssthen#ifndef CHECKED_INET6
1033933707f3Ssthen#  define CHECKED_INET6
1034933707f3Ssthen#  ifdef AF_INET6
1035933707f3Ssthen#    define INET6
1036933707f3Ssthen#  else
1037933707f3Ssthen#    define AF_INET6        28
1038933707f3Ssthen#  endif
1039933707f3Ssthen#endif /* CHECKED_INET6 */
1040933707f3Ssthen
1041933707f3Ssthen#ifndef HAVE_GETADDRINFO
1042933707f3Ssthenstruct sockaddr_storage;
1043933707f3Ssthen#include "compat/fake-rfc2553.h"
1044933707f3Ssthen#endif
1045933707f3Ssthen
1046933707f3Ssthen#ifdef UNBOUND_ALLOC_STATS
1047933707f3Ssthen#  define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
1048933707f3Ssthen#  define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
1049933707f3Ssthen#  define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
1050933707f3Ssthen#  define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1051933707f3Ssthenvoid *unbound_stat_malloc(size_t size);
1052933707f3Ssthenvoid *unbound_stat_calloc(size_t nmemb, size_t size);
1053933707f3Ssthenvoid unbound_stat_free(void *ptr);
1054933707f3Ssthenvoid *unbound_stat_realloc(void *ptr, size_t size);
1055933707f3Ssthenvoid *unbound_stat_malloc_log(size_t size, const char* file, int line,
1056933707f3Ssthen	const char* func);
1057933707f3Ssthenvoid *unbound_stat_calloc_log(size_t nmemb, size_t size, const char* file,
1058933707f3Ssthen	int line, const char* func);
1059933707f3Ssthenvoid unbound_stat_free_log(void *ptr, const char* file, int line,
1060933707f3Ssthen	const char* func);
1061933707f3Ssthenvoid *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
1062933707f3Ssthen	int line, const char* func);
1063933707f3Ssthen#elif defined(UNBOUND_ALLOC_LITE)
1064933707f3Ssthen#  include "util/alloc.h"
1065933707f3Ssthen#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */
1066933707f3Ssthen
1067933707f3Ssthen/** default port for DNS traffic. */
1068933707f3Ssthen#define UNBOUND_DNS_PORT 53
1069933707f3Ssthen/** default port for unbound control traffic, registered port with IANA,
1070933707f3Ssthen    ub-dns-control  8953/tcp    unbound dns nameserver control */
1071933707f3Ssthen#define UNBOUND_CONTROL_PORT 8953
1072933707f3Ssthen/** the version of unbound-control that this software implements */
1073933707f3Ssthen#define UNBOUND_CONTROL_VERSION 1
1074933707f3Ssthen
1075933707f3Ssthen
1076