diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-07-22 01:17:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-07-22 01:17:16 +0000 |
commit | 14a57219373afd8dd110ee8af89b32767c72c1dc (patch) | |
tree | 548a5cc41150de31cc13e58677107cebf659ddc2 /src/include/platform.h | |
parent | 0e7b74701ae672ef880c2431043a9aa738baf103 (diff) | |
download | libmicrohttpd-14a57219373afd8dd110ee8af89b32767c72c1dc.tar.gz libmicrohttpd-14a57219373afd8dd110ee8af89b32767c72c1dc.zip |
fix
Diffstat (limited to 'src/include/platform.h')
-rw-r--r-- | src/include/platform.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/src/include/platform.h b/src/include/platform.h new file mode 100644 index 00000000..3e81a4f6 --- /dev/null +++ b/src/include/platform.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | This file is part of libmicrohttpd | ||
3 | (C) 2008 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | This library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Lesser General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2.1 of the License, or (at your option) any later version. | ||
9 | |||
10 | This library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with this library; if not, write to the Free Software | ||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file platform.h | ||
22 | * @brief platform-specific includes for libmicrohttpd | ||
23 | * @author Christian Grothoff | ||
24 | * | ||
25 | * This file is included by the libmicrohttpd code | ||
26 | * before "microhttpd.h"; it provides the required | ||
27 | * standard headers (which are platform-specific).<p> | ||
28 | * | ||
29 | * Note that this file depends on our configure.ac | ||
30 | * build process and the generated config.h file. | ||
31 | * Hence you cannot include it directly in applications | ||
32 | * that use libmicrohttpd. | ||
33 | */ | ||
34 | #ifndef PLATFORM_H | ||
35 | #define PLATFORM_H | ||
36 | |||
37 | #include "config.h" | ||
38 | |||
39 | #define _XOPEN_SOURCE_EXTENDED 1 | ||
40 | #define _OPEN_THREADS | ||
41 | #define _OPEN_SYS_SOCK_IPV6 | ||
42 | #define _OPEN_MSGQ_EXT | ||
43 | |||
44 | #include <stdio.h> | ||
45 | #include <stdlib.h> | ||
46 | #include <string.h> | ||
47 | #include <unistd.h> | ||
48 | #include <stdarg.h> | ||
49 | #include <errno.h> | ||
50 | #include <fcntl.h> | ||
51 | #include <signal.h> | ||
52 | #include <pthread.h> | ||
53 | #include <sys/types.h> | ||
54 | |||
55 | /* different OSes have size_t, fd_set in | ||
56 | a broad range of header files; | ||
57 | we just include most of them (if they | ||
58 | are available) */ | ||
59 | |||
60 | #if HAVE_SYS_SELECT_H | ||
61 | #include <sys/select.h> | ||
62 | #endif | ||
63 | #if HAVE_SYS_TYPES_H | ||
64 | #include <sys/types.h> | ||
65 | #endif | ||
66 | #if HAVE_SYS_TIME_H | ||
67 | #include <sys/time.h> | ||
68 | #endif | ||
69 | #if HAVE_SYS_MSG_H | ||
70 | #include <sys/msg.h> | ||
71 | #endif | ||
72 | #if HAVE_SYS_MMAN_H | ||
73 | #include <sys/mman.h> | ||
74 | #endif | ||
75 | #if HAVE_NETDB_H | ||
76 | #include <netdb.h> | ||
77 | #endif | ||
78 | #if HAVE_NETINET_IN_H | ||
79 | #include <netinet/in.h> | ||
80 | #endif | ||
81 | #if HAVE_TIME_H | ||
82 | #include <time.h> | ||
83 | #endif | ||
84 | #if HAVE_SYS_SOCKET_H | ||
85 | #include <sys/socket.h> | ||
86 | #endif | ||
87 | #if HAVE_ARPA_INET_H | ||
88 | #include <arpa/inet.h> | ||
89 | #endif | ||
90 | |||
91 | #include "plibc.h" | ||
92 | |||
93 | |||
94 | #endif | ||