fast timeout on disconnect
[oweals/gnunet.git] / src / include / platform.h
index a649d3aa5ceabd2ab76e0e451343f92676425dad..30fa8f9b5988c42eee57173247ae70c12d31c107 100644 (file)
 
 #ifdef WINDOWS
 #define BREAKPOINT asm("int $3;");
+#define GNUNET_SIGCHLD 17
 #else
 #define BREAKPOINT
+#define GNUNET_SIGCHLD SIGCHLD
 #endif
 
 #ifdef HAVE_SYS_TYPES_H
@@ -80,7 +82,9 @@
 #ifndef MINGW
 #include <netdb.h>
 #include <sys/socket.h>
+#include <sys/un.h>
 #include <netinet/in.h>
+#include <netinet/ip.h> /* superset of previous */
 #include <arpa/inet.h>
 #include <netinet/tcp.h>
 #include <pwd.h>
@@ -95,6 +99,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <stdarg.h>
 #include <errno.h>
 #include <signal.h>
 #ifdef GNUNET_freeBSD
 #include <semaphore.h>
 #endif
-#ifdef OSX
+#ifdef DARWIN
 #include <dlfcn.h>
 #include <semaphore.h>
 #include <net/if.h>
 #include <errno.h>
 #include <limits.h>
 
+#if HAVE_VFORK_H
+#include <vfork.h>
+#endif
+
 #if HAVE_CTYPE_H
 #include <ctype.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"
 #define __BIG_ENDIAN BIG_ENDIAN
 #endif
 
-#ifdef OSX
-#define socklen_t unsigned int
+#ifdef DARWIN
 #define __BYTE_ORDER BYTE_ORDER
 #define __BIG_ENDIAN BIG_ENDIAN
- /* not available on OS X, override configure */
+ /* not available on darwin, override configure */
 #undef HAVE_STAT64
 #undef HAVE_MREMAP
 #endif
@@ -210,6 +215,10 @@ long long atoll (const char *nptr);
 #include "langinfo.h"
 #endif
 
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)(-1))
+#endif
+
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
 #endif