#ifdef WINDOWS
#define BREAKPOINT asm("int $3;");
+#define GNUNET_SIGCHLD 17
#else
#define BREAKPOINT
+#define GNUNET_SIGCHLD SIGCHLD
#endif
#ifdef HAVE_SYS_TYPES_H
#ifdef _MSC_VER
#include <Winsock2.h>
+#include <ws2tcpip.h>
#else
#ifndef MINGW
#include <netdb.h>
#include <sys/socket.h>
+#include <sys/un.h>
+#if HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif
+#include <netinet/ip.h> /* superset of previous */
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <pwd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <stdarg.h>
#include <errno.h>
#include <signal.h>
+#ifdef WINDOWS
+#include <malloc.h> /* for alloca(), on other OSes it's in stdlib.h */
+#endif
#ifndef _MSC_VER
#include <unistd.h> /* KLB_FIX */
#endif
#endif
#ifdef SOLARIS
#include <sys/sockio.h>
+#include <sys/filio.h>
#include <sys/loadavg.h>
#include <semaphore.h>
#endif
+#if HAVE_UCRED_H
+#include <ucred.h>
+#endif
#ifdef CYGWIN
#include <windows.h>
#include <cygwin/if.h>
#include <vfork.h>
#endif
-#if HAVE_CTYPE_H
#include <ctype.h>
-#endif
#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
+#if HAVE_ENDIAN_H
+#include <endian.h>
+#endif
+#if HAVE_SYS_ENDIAN_H
+#include <sys/endian.h>
+#endif
+
#include "plibc.h"
-#undef HAVE_CONFIG_H
-#include <pthread.h>
-#define HAVE_CONFIG_H 1
#include <locale.h>
#ifndef FRAMEWORK_BUILD
#include "gettext.h"
#include "langinfo.h"
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)(-1))
+#endif
+
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif