[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37568 - in libmicrohttpd: src/include src/microhttpd w32/c
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37568 - in libmicrohttpd: src/include src/microhttpd w32/common |
Date: |
Sat, 23 Jul 2016 20:55:03 +0200 |
Author: Karlson2k
Date: 2016-07-23 20:55:02 +0200 (Sat, 23 Jul 2016)
New Revision: 37568
Added:
libmicrohttpd/src/include/mhd_options.h
Modified:
libmicrohttpd/src/include/platform.h
libmicrohttpd/src/microhttpd/Makefile.am
libmicrohttpd/src/microhttpd/mhd_str.c
libmicrohttpd/w32/common/libmicrohttpd-files.vcxproj
libmicrohttpd/w32/common/libmicrohttpd-filters.vcxproj
Log:
Added new header mhd_options.h
Added: libmicrohttpd/src/include/mhd_options.h
===================================================================
--- libmicrohttpd/src/include/mhd_options.h (rev 0)
+++ libmicrohttpd/src/include/mhd_options.h 2016-07-23 18:55:02 UTC (rev
37568)
@@ -0,0 +1,96 @@
+/*
+ This file is part of libmicrohttpd
+ Copyright (C) 2016 Karlson2k (Evgeny Grin)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
+*/
+
+/**
+ * @file microhttpd/mhd_options.h
+ * @brief additional automatic macros for MHD_config.h
+ * @author Karlson2k (Evgeny Grin)
+ *
+ * This file includes MHD_config.h and adds automatic macros based on values
+ * in MHD_config.h, compiler built-in macros and commandline-defined macros
+ * (but not based on values defined in other headers). Works also as a guard
+ * to prevent double inclusion of MHD_config.h
+ */
+
+#ifndef MHD_OPTIONS_H
+#define MHD_OPTIONS_H 1
+
+#include "MHD_config.h"
+
+
+#ifndef _MHD_EXTERN
+#if defined(BUILDING_MHD_LIB) && defined(_WIN32) && \
+ (defined(DLL_EXPORT) || defined(MHD_W32DLL))
+#define _MHD_EXTERN __declspec(dllexport) extern
+#else /* !BUILDING_MHD_LIB || !_WIN32 || (!DLL_EXPORT && !MHD_W32DLL) */
+#define _MHD_EXTERN extern
+#endif /* !BUILDING_MHD_LIB || !_WIN32 || (!DLL_EXPORT && !MHD_W32DLL) */
+#endif /* ! _MHD_EXTERN */
+
+/* Some platforms (FreeBSD, Solaris, W32) allow to override
+ default FD_SETSIZE by defining it before including
+ headers. */
+#ifdef FD_SETSIZE
+/* FD_SETSIZE defined in command line or in MHD_config.h */
+/* Use function to retrieve system default FD_SETSIZE value. */
+#define _MHD_SYS_DEFAULT_FD_SETSIZE get_system_fdsetsize_value()
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+/* Platform with WinSock and without overridden FD_SETSIZE */
+#define FD_SETSIZE 2048 /* Override default small value */
+/* Use function to retrieve system default FD_SETSIZE value. */
+#define _MHD_SYS_DEFAULT_FD_SETSIZE get_system_fdsetsize_value()
+#else /* !FD_SETSIZE && !WinSock*/
+/* System default value of FD_SETSIZE is used */
+#define _MHD_SYS_DEFAULT_FD_SETSIZE FD_SETSIZE
+#define _MHD_FD_SETSIZE_IS_DEFAULT 1
+#endif /* !FD_SETSIZE && !WinSock*/
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#if OS390
+#define _OPEN_THREADS
+#define _OPEN_SYS_SOCK_IPV6
+#define _OPEN_MSGQ_EXT
+#define _LP64
+#endif
+
+#if defined(_WIN32)
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#else /* _WIN32_WINNT */
+#if _WIN32_WINNT < 0x0501
+#error "Headers for Windows XP or later are required"
+#endif /* _WIN32_WINNT < 0x0501 */
+#endif /* _WIN32_WINNT */
+#ifndef WIN32_LEAN_AND_MEAN
+/* Do not include unneeded parts of W32 headers. */
+#define WIN32_LEAN_AND_MEAN 1
+#endif /* !WIN32_LEAN_AND_MEAN */
+#endif /* _WIN32 */
+
+#if LINUX+0 && (defined(HAVE_SENDFILE64) || defined(HAVE_LSEEK64)) && !
defined(_LARGEFILE64_SOURCE)
+/* On Linux, special macro is required to enable definitions of some xxx64
functions */
+#define _LARGEFILE64_SOURCE 1
+#endif
+
+#ifdef HAVE_C11_GMTIME_S
+/* Special macro is required to enable C11 definition of gmtime_s() function */
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif /* HAVE_C11_GMTIME_S */
+
+#endif /* MHD_OPTIONS_H */
Modified: libmicrohttpd/src/include/platform.h
===================================================================
--- libmicrohttpd/src/include/platform.h 2016-07-22 22:13:17 UTC (rev
37567)
+++ libmicrohttpd/src/include/platform.h 2016-07-23 18:55:02 UTC (rev
37568)
@@ -34,76 +34,8 @@
#ifndef MHD_PLATFORM_H
#define MHD_PLATFORM_H
-#ifndef HAVE_USED_MHD_CONFIG_H
-#define HAVE_USED_MHD_CONFIG_H
-#include "MHD_config.h"
-#endif
+#include "mhd_options.h"
-#ifndef BUILDING_MHD_LIB
-#ifdef _MHD_EXTERN
-#undef _MHD_EXTERN
-#endif /* _MHD_EXTERN */
-#if defined(_WIN32) && defined(MHD_W32LIB)
-#define _MHD_EXTERN extern
-#elif defined (_WIN32) && defined(MHD_W32DLL)
-#define _MHD_EXTERN __declspec(dllimport)
-#else
-#define _MHD_EXTERN extern
-#endif
-#elif !defined(_MHD_EXTERN) /* && BUILDING_MHD_LIB */
-#if defined(_WIN32) && defined(MHD_W32LIB)
-#define _MHD_EXTERN extern
-#elif defined (_WIN32) && defined(MHD_W32DLL)
-#define _MHD_EXTERN extern __declspec(dllexport)
-#else
-#define _MHD_EXTERN extern
-#endif
-#endif /* BUILDING_MHD_LIB */
-
-
-#ifdef FD_SETSIZE
-/* FD_SETSIZE defined in command line or in MHD_config.h */
-/* Some platforms (FreeBSD, Solaris, W32) allow to override
- default FD_SETSIZE by defining it before including
- headers. */
-#define _MHD_SYS_DEFAULT_FD_SETSIZE get_system_fdsetsize_value()
-#elif defined(_WIN32) && !defined(__CYGWIN__)
-/* Platform with WinSock and without overridden FD_SETSIZE */
-#define FD_SETSIZE 2048 /* Override default small value */
-#define _MHD_SYS_DEFAULT_FD_SETSIZE get_system_fdsetsize_value()
-#else /* !FD_SETSIZE && !WinSock*/
-#define _MHD_SYS_DEFAULT_FD_SETSIZE FD_SETSIZE
-#define _MHD_FD_SETSIZE_IS_DEFAULT 1
-#endif /* FD_SETSIZE */
-
-#define _XOPEN_SOURCE_EXTENDED 1
-#if OS390
-#define _OPEN_THREADS
-#define _OPEN_SYS_SOCK_IPV6
-#define _OPEN_MSGQ_EXT
-#define _LP64
-#endif
-
-#if defined(_WIN32)
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#else /* _WIN32_WINNT */
-#if _WIN32_WINNT < 0x0501
-#error "Headers for Windows XP or later are required"
-#endif /* _WIN32_WINNT < 0x0501 */
-#endif /* _WIN32_WINNT */
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif /* !WIN32_LEAN_AND_MEAN */
-#endif /* _WIN32 */
-
-#if LINUX+0 && (defined(HAVE_SENDFILE64) || defined(HAVE_LSEEK64)) && !
defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#ifdef HAVE_C11_GMTIME_S
-#define __STDC_WANT_LIB_EXT1__ 1
-#endif /* HAVE_C11_GMTIME_S */
-
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
Modified: libmicrohttpd/src/microhttpd/Makefile.am
===================================================================
--- libmicrohttpd/src/microhttpd/Makefile.am 2016-07-22 22:13:17 UTC (rev
37567)
+++ libmicrohttpd/src/microhttpd/Makefile.am 2016-07-23 18:55:02 UTC (rev
37568)
@@ -62,6 +62,7 @@
daemon.c \
internal.c internal.h \
memorypool.c memorypool.h \
+ mhd_options.h \
mhd_mono_clock.c mhd_mono_clock.h \
mhd_limits.h mhd_byteorder.h \
sysfdsetsize.c sysfdsetsize.h \
Modified: libmicrohttpd/src/microhttpd/mhd_str.c
===================================================================
--- libmicrohttpd/src/microhttpd/mhd_str.c 2016-07-22 22:13:17 UTC (rev
37567)
+++ libmicrohttpd/src/microhttpd/mhd_str.c 2016-07-23 18:55:02 UTC (rev
37568)
@@ -25,7 +25,7 @@
#include "mhd_str.h"
-#include "MHD_config.h"
+#include "mhd_options.h"
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
Modified: libmicrohttpd/w32/common/libmicrohttpd-files.vcxproj
===================================================================
--- libmicrohttpd/w32/common/libmicrohttpd-files.vcxproj 2016-07-22
22:13:17 UTC (rev 37567)
+++ libmicrohttpd/w32/common/libmicrohttpd-files.vcxproj 2016-07-23
18:55:02 UTC (rev 37568)
@@ -21,6 +21,7 @@
<ItemGroup>
<ClInclude Include="$(MhdSrc)include\autoinit_funcs.h" />
<ClInclude Include="$(MhdSrc)include\microhttpd.h" />
+ <ClInclude Include="$(MhdSrc)include\mhd_options.h" />
<ClInclude Include="$(MhdSrc)include\platform.h" />
<ClInclude Include="$(MhdSrc)include\platform_interface.h" />
<ClInclude Include="$(MhdSrc)include\w32functions.h" />
Modified: libmicrohttpd/w32/common/libmicrohttpd-filters.vcxproj
===================================================================
--- libmicrohttpd/w32/common/libmicrohttpd-filters.vcxproj 2016-07-22
22:13:17 UTC (rev 37567)
+++ libmicrohttpd/w32/common/libmicrohttpd-filters.vcxproj 2016-07-23
18:55:02 UTC (rev 37568)
@@ -38,6 +38,9 @@
<ClInclude Include="$(MhdSrc)include\w32functions.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="$(MhdSrc)include\mhd_options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="$(MhdW32Common)MHD_config.h">
<Filter>Header Files</Filter>
</ClInclude>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37568 - in libmicrohttpd: src/include src/microhttpd w32/common,
gnunet <=