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>
49 #undef HAVE_STATIC_ASSERT
55 #define ALLOW_EXTRA_CHECKS GNUNET_YES
61 #define _XOPEN_SOURCE 499
70 #define VERBOSE_STATS 0
73 #include <sys/socket.h>
76 #include <netinet/in.h>
78 #if HAVE_NETINET_IN_SYSTM_H
79 #include <netinet/in_systm.h>
82 #include <netinet/ip.h>
84 #include <arpa/inet.h>
85 #include <netinet/tcp.h>
87 #include <sys/ioctl.h>
104 #include <sys/stat.h>
105 #include <sys/types.h>
110 #include <sys/param.h>
113 #include <sys/time.h>
119 #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
120 #include <semaphore.h>
124 #include <semaphore.h>
127 #if defined(__linux__) || defined(GNU)
131 #include <sys/sockio.h>
132 #include <sys/filio.h>
133 #include <sys/loadavg.h>
134 #include <semaphore.h>
140 #include <sys/ucred.h>
153 #if HAVE_SYS_RESOURCE_H
154 #include <sys/resource.h>
160 #if HAVE_SYS_ENDIAN_H
161 #include <sys/endian.h>
164 #define DIR_SEPARATOR '/'
165 #define DIR_SEPARATOR_STR "/"
166 #define PATH_SEPARATOR ':'
167 #define PATH_SEPARATOR_STR ":"
177 #define _(String) dgettext (PACKAGE, String)
178 #define LIBEXTRACTOR_GETTEXT_DOMAIN "libextractor"
180 #include <sys/mman.h>
183 #if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
184 #define __BYTE_ORDER BYTE_ORDER
185 #define __BIG_ENDIAN BIG_ENDIAN
189 #define __BYTE_ORDER BYTE_ORDER
190 #define __BIG_ENDIAN BIG_ENDIAN
203 #include "langinfo.h"
207 #define SIZE_MAX ((size_t) (-1))
211 #define O_LARGEFILE 0
217 #ifndef AI_NUMERICSERV
218 #define AI_NUMERICSERV 0
222 #if defined(__sparc__)
223 #define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \
227 #define MAKE_UNALIGNED(val) val
233 #define GNUNET_TERM_SIG SIGTERM
240 #define PATH_MAX 4096
243 #if HAVE_THREAD_LOCAL_GCC
244 #define GNUNET_THREAD_LOCAL __thread
246 #define GNUNET_THREAD_LOCAL
251 #ifndef EXIT_INVALIDARGUMENT
252 #define EXIT_INVALIDARGUMENT 2
255 #ifndef EXIT_NOTIMPLEMENTED
256 #define EXIT_NOTIMPLEMENTED 3
259 #ifndef EXIT_NOPERMISSION
260 #define EXIT_NOPERMISSION 4
263 #ifndef EXIT_NOTINSTALLED
264 #define EXIT_NOTINSTALLED 5
267 #ifndef EXIT_NOTCONFIGURED
268 #define EXIT_NOTCONFIGURED 6
271 #ifndef EXIT_NOTRUNNING
272 #define EXIT_NOTRUNNING 7
278 #if __has_attribute (__nonstring__)
279 # define __nonstring __attribute__((__nonstring__))