diff options
Diffstat (limited to 'src/include/platform.h')
-rw-r--r-- | src/include/platform.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/include/platform.h b/src/include/platform.h index e12d08e44..bdfbb4a4b 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -38,13 +38,8 @@ | |||
38 | #endif | 38 | #endif |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef WINDOWS | ||
42 | #define BREAKPOINT asm ("int $3;"); | ||
43 | #define GNUNET_SIGCHLD 17 | ||
44 | #else | ||
45 | #define BREAKPOINT | 41 | #define BREAKPOINT |
46 | #define GNUNET_SIGCHLD SIGCHLD | 42 | #define GNUNET_SIGCHLD SIGCHLD |
47 | #endif | ||
48 | 43 | ||
49 | #ifdef HAVE_SYS_TYPES_H | 44 | #ifdef HAVE_SYS_TYPES_H |
50 | #include <sys/types.h> | 45 | #include <sys/types.h> |
@@ -70,18 +65,6 @@ | |||
70 | 65 | ||
71 | #define VERBOSE_STATS 0 | 66 | #define VERBOSE_STATS 0 |
72 | 67 | ||
73 | #ifdef CYGWIN | ||
74 | #include <sys/reent.h> | ||
75 | #endif | ||
76 | |||
77 | #ifdef _MSC_VER | ||
78 | #ifndef FD_SETSIZE | ||
79 | #define FD_SETSIZE 1024 | ||
80 | #endif | ||
81 | #include <Winsock2.h> | ||
82 | #include <ws2tcpip.h> | ||
83 | #else | ||
84 | #ifndef MINGW | ||
85 | #include <netdb.h> | 68 | #include <netdb.h> |
86 | #include <sys/socket.h> | 69 | #include <sys/socket.h> |
87 | #include <sys/un.h> | 70 | #include <sys/un.h> |
@@ -100,10 +83,6 @@ | |||
100 | #include <sys/ioctl.h> | 83 | #include <sys/ioctl.h> |
101 | #include <sys/wait.h> | 84 | #include <sys/wait.h> |
102 | #include <grp.h> | 85 | #include <grp.h> |
103 | #else | ||
104 | #include "winproc.h" | ||
105 | #endif | ||
106 | #endif | ||
107 | 86 | ||
108 | #include <string.h> | 87 | #include <string.h> |
109 | #include <stdio.h> | 88 | #include <stdio.h> |
@@ -114,20 +93,13 @@ | |||
114 | #include <errno.h> | 93 | #include <errno.h> |
115 | #include <signal.h> | 94 | #include <signal.h> |
116 | #include <libgen.h> | 95 | #include <libgen.h> |
117 | #ifdef WINDOWS | ||
118 | #include <malloc.h> /* for alloca(), on other OSes it's in stdlib.h */ | ||
119 | #endif | ||
120 | #ifdef HAVE_MALLOC_H | 96 | #ifdef HAVE_MALLOC_H |
121 | #include <malloc.h> /* for mallinfo on GNU */ | 97 | #include <malloc.h> /* for mallinfo on GNU */ |
122 | #endif | 98 | #endif |
123 | #ifndef _MSC_VER | ||
124 | #include <unistd.h> /* KLB_FIX */ | 99 | #include <unistd.h> /* KLB_FIX */ |
125 | #endif | ||
126 | #include <sys/stat.h> | 100 | #include <sys/stat.h> |
127 | #include <sys/types.h> | 101 | #include <sys/types.h> |
128 | #ifndef _MSC_VER | ||
129 | #include <dirent.h> /* KLB_FIX */ | 102 | #include <dirent.h> /* KLB_FIX */ |
130 | #endif | ||
131 | #include <fcntl.h> | 103 | #include <fcntl.h> |
132 | #include <math.h> | 104 | #include <math.h> |
133 | #if HAVE_SYS_PARAM_H | 105 | #if HAVE_SYS_PARAM_H |
@@ -170,10 +142,6 @@ | |||
170 | #if HAVE_SYS_UCRED_H | 142 | #if HAVE_SYS_UCRED_H |
171 | #include <sys/ucred.h> | 143 | #include <sys/ucred.h> |
172 | #endif | 144 | #endif |
173 | #ifdef CYGWIN | ||
174 | #include <windows.h> | ||
175 | #include <cygwin/if.h> | ||
176 | #endif | ||
177 | #if HAVE_IFADDRS_H | 145 | #if HAVE_IFADDRS_H |
178 | #include <ifaddrs.h> | 146 | #include <ifaddrs.h> |
179 | #endif | 147 | #endif |
@@ -196,24 +164,11 @@ | |||
196 | #include <sys/endian.h> | 164 | #include <sys/endian.h> |
197 | #endif | 165 | #endif |
198 | 166 | ||
199 | /* From plibc. */ | ||
200 | #ifdef Q_OS_WIN32 | ||
201 | #define WINDOWS 1 | ||
202 | #endif | ||
203 | |||
204 | #ifndef WINDOWS | ||
205 | #define DIR_SEPARATOR '/' | 167 | #define DIR_SEPARATOR '/' |
206 | #define DIR_SEPARATOR_STR "/" | 168 | #define DIR_SEPARATOR_STR "/" |
207 | #define PATH_SEPARATOR ':' | 169 | #define PATH_SEPARATOR ':' |
208 | #define PATH_SEPARATOR_STR ":" | 170 | #define PATH_SEPARATOR_STR ":" |
209 | #define NEWLINE "\n" | 171 | #define NEWLINE "\n" |
210 | #else | ||
211 | #define DIR_SEPARATOR '\\' | ||
212 | #define DIR_SEPARATOR_STR "\\" | ||
213 | #define PATH_SEPARATOR ';' | ||
214 | #define PATH_SEPARATOR_STR ";" | ||
215 | #define NEWLINE "\r\n" | ||
216 | #endif | ||
217 | 172 | ||
218 | #include "compat.h" | 173 | #include "compat.h" |
219 | 174 | ||
@@ -231,15 +186,7 @@ | |||
231 | #define LIBEXTRACTOR_GETTEXT_DOMAIN "org.gnunet.libextractor" | 186 | #define LIBEXTRACTOR_GETTEXT_DOMAIN "org.gnunet.libextractor" |
232 | #endif | 187 | #endif |
233 | 188 | ||
234 | #ifdef CYGWIN | ||
235 | #define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */ | ||
236 | #define SIOCGIFFLAGS _IOW('s', 101, struct ifreq) /* Get if flags */ | ||
237 | #define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */ | ||
238 | #endif | ||
239 | |||
240 | #ifndef MINGW | ||
241 | #include <sys/mman.h> | 189 | #include <sys/mman.h> |
242 | #endif | ||
243 | 190 | ||
244 | #ifdef FREEBSD | 191 | #ifdef FREEBSD |
245 | #define __BYTE_ORDER BYTE_ORDER | 192 | #define __BYTE_ORDER BYTE_ORDER |
@@ -286,13 +233,8 @@ atoll(const char *nptr); | |||
286 | #define MAKE_UNALIGNED(val) val | 233 | #define MAKE_UNALIGNED(val) val |
287 | #endif | 234 | #endif |
288 | 235 | ||
289 | #if WINDOWS | ||
290 | #define FDTYPE HANDLE | ||
291 | #define SOCKTYPE SOCKET | ||
292 | #else | ||
293 | #define FDTYPE int | 236 | #define FDTYPE int |
294 | #define SOCKTYPE int | 237 | #define SOCKTYPE int |
295 | #endif | ||
296 | 238 | ||
297 | /** | 239 | /** |
298 | * The termination signal | 240 | * The termination signal |