34 #ifndef HAVE_USED_CONFIG_H
35 #define HAVE_USED_CONFIG_H
37 #include "gnunet_private_config.h"
42 #define GNUNET_SIGCHLD SIGCHLD
44 #ifdef HAVE_SYS_TYPES_H
45 #include <sys/types.h>
50 #undef HAVE_STATIC_ASSERT
56 #define ALLOW_EXTRA_CHECKS GNUNET_YES
62 #define _XOPEN_SOURCE 499
71 #define VERBOSE_STATS 0
74 #include <sys/socket.h>
77 #include <netinet/in.h>
79 #if HAVE_NETINET_IN_SYSTM_H
80 #include <netinet/in_systm.h>
83 #include <netinet/ip.h>
85 #include <arpa/inet.h>
86 #include <netinet/tcp.h>
88 #include <sys/ioctl.h>
105 #include <sys/stat.h>
106 #include <sys/types.h>
111 #include <sys/param.h>
114 #include <sys/time.h>
120 #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
121 #include <semaphore.h>
125 #include <semaphore.h>
128 #if defined(__linux__) || defined(GNU)
132 #include <sys/sockio.h>
133 #include <sys/filio.h>
134 #include <sys/loadavg.h>
135 #include <semaphore.h>
141 #include <sys/ucred.h>
154 #if HAVE_SYS_RESOURCE_H
155 #include <sys/resource.h>
161 #if HAVE_SYS_ENDIAN_H
162 #include <sys/endian.h>
165 #define DIR_SEPARATOR '/'
166 #define DIR_SEPARATOR_STR "/"
167 #define PATH_SEPARATOR ':'
168 #define PATH_SEPARATOR_STR ":"
178 #define _(String) dgettext (PACKAGE, String)
179 #define LIBEXTRACTOR_GETTEXT_DOMAIN "libextractor"
181 #include <sys/mman.h>
184 #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
185 #define __BYTE_ORDER BYTE_ORDER
186 #define __BIG_ENDIAN BIG_ENDIAN
190 #define __BYTE_ORDER BYTE_ORDER
191 #define __BIG_ENDIAN BIG_ENDIAN
204 #include "langinfo.h"
208 #define SIZE_MAX ((size_t) (-1))
212 #define O_LARGEFILE 0
218 #ifndef AI_NUMERICSERV
219 #define AI_NUMERICSERV 0
223 #if defined(__sparc__)
224 #define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \
228 #define MAKE_UNALIGNED(val) val
234 #define GNUNET_TERM_SIG SIGTERM
241 #define PATH_MAX 4096
244 #if HAVE_THREAD_LOCAL_GCC
245 #define GNUNET_THREAD_LOCAL __thread
247 #define GNUNET_THREAD_LOCAL
252 #ifndef EXIT_INVALIDARGUMENT
253 #define EXIT_INVALIDARGUMENT 2
256 #ifndef EXIT_NOTIMPLEMENTED
257 #define EXIT_NOTIMPLEMENTED 3
260 #ifndef EXIT_NOPERMISSION
261 #define EXIT_NOPERMISSION 4
264 #ifndef EXIT_NOTINSTALLED
265 #define EXIT_NOTINSTALLED 5
268 #ifndef EXIT_NOTCONFIGURED
269 #define EXIT_NOTCONFIGURED 6
272 #ifndef EXIT_NOTRUNNING
273 #define EXIT_NOTRUNNING 7
279 #if __has_attribute (__nonstring__)
280 # define __nonstring __attribute__((__nonstring__))