diff options
Diffstat (limited to 'src/platform/platform_interface.h')
-rw-r--r-- | src/platform/platform_interface.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/platform/platform_interface.h b/src/platform/platform_interface.h new file mode 100644 index 00000000..6e88be50 --- /dev/null +++ b/src/platform/platform_interface.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | This file is part of libmicrohttpd | ||
3 | (C) 2014 Karlson2k (Evgeny Grin) | ||
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. | ||
17 | If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file platform/platfrom_interface.h | ||
22 | * @brief internal platform abstraction functions | ||
23 | * @author Karlson2k (Evgeny Grin) | ||
24 | */ | ||
25 | |||
26 | #ifndef MHD_PLATFORM_INTERFACE_H | ||
27 | #define MHD_PLATFORM_INTERFACE_H | ||
28 | |||
29 | /* MHD_socket_close_(fd) close any FDs (non-W32) / close only socket FDs (W32) */ | ||
30 | #if !defined(_WIN32) || defined(__CYGWIN__) | ||
31 | #define MHD_socket_close_(fd) close((fd)) | ||
32 | #else | ||
33 | #define MHD_socket_close_(fd) closesocket((fd)) | ||
34 | #endif | ||
35 | |||
36 | #endif // MHD_PLATFORM_INTERFACE_H | ||