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
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>
86#include <netinet/tcp.h>
106#include <sys/types.h>
111#include <sys/param.h>
120#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
121#include <semaphore.h>
125#include <semaphore.h>
129#if defined(__linux__) || defined(GNU)
133#include <sys/sockio.h>
134#include <sys/filio.h>
135#include <sys/loadavg.h>
136#include <semaphore.h>
142#include <sys/ucred.h>
155#if HAVE_SYS_RESOURCE_H
156#include <sys/resource.h>
163#include <sys/endian.h>
166#define DIR_SEPARATOR '/'
167#define DIR_SEPARATOR_STR "/"
168#define PATH_SEPARATOR ':'
169#define PATH_SEPARATOR_STR ":"
179#define _(String) dgettext (PACKAGE, String)
180#define LIBEXTRACTOR_GETTEXT_DOMAIN "libextractor"
185#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
186#define __BYTE_ORDER BYTE_ORDER
187#define __BIG_ENDIAN BIG_ENDIAN
191#define __BYTE_ORDER BYTE_ORDER
192#define __BIG_ENDIAN BIG_ENDIAN
209#define SIZE_MAX ((size_t) (-1))
219#ifndef AI_NUMERICSERV
220#define AI_NUMERICSERV 0
224#if defined(__sparc__)
225#define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \
229#define MAKE_UNALIGNED(val) val
235#define GNUNET_TERM_SIG SIGTERM
245#if HAVE_THREAD_LOCAL_GCC
246#define GNUNET_THREAD_LOCAL __thread
248#define GNUNET_THREAD_LOCAL
253#ifndef EXIT_INVALIDARGUMENT
254#define EXIT_INVALIDARGUMENT 2
257#ifndef EXIT_NOTIMPLEMENTED
258#define EXIT_NOTIMPLEMENTED 3
261#ifndef EXIT_NOPERMISSION
262#define EXIT_NOPERMISSION 4
265#ifndef EXIT_NOTINSTALLED
266#define EXIT_NOTINSTALLED 5
269#ifndef EXIT_NOTCONFIGURED
270#define EXIT_NOTCONFIGURED 6
273#ifndef EXIT_NOTRUNNING
274#define EXIT_NOTRUNNING 7
277#ifndef EXIT_NO_RESTART
278#define EXIT_NO_RESTART 9
284#if __has_attribute (__nonstring__)
285# define __nonstring __attribute__((__nonstring__))