aboutsummaryrefslogtreecommitdiff
path: root/w32/common
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-04-24 23:00:06 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-04-24 23:01:18 +0300
commit0a374c71b8f7fccd1682f6f6d6b967fdd6e2502b (patch)
tree82175c3b97ce99df69cd96afa03ec526a8b81b6e /w32/common
parenteb76464cdf0164ae68c53c6b017d261a715a93c5 (diff)
downloadlibmicrohttpd-0a374c71b8f7fccd1682f6f6d6b967fdd6e2502b.tar.gz
libmicrohttpd-0a374c71b8f7fccd1682f6f6d6b967fdd6e2502b.zip
Updates for MSVC builds
Diffstat (limited to 'w32/common')
-rw-r--r--w32/common/MHD_config.h62
-rw-r--r--w32/common/libmicrohttpd-filters.vcxproj6
2 files changed, 51 insertions, 17 deletions
diff --git a/w32/common/MHD_config.h b/w32/common/MHD_config.h
index 89b750a3..0458ee10 100644
--- a/w32/common/MHD_config.h
+++ b/w32/common/MHD_config.h
@@ -14,12 +14,25 @@
14#define __STDC_NO_VLA__ 1 14#define __STDC_NO_VLA__ 1
15#endif 15#endif
16 16
17/* If clang is used then variable-length arrays are supported. */
18#ifdef __clang__
19#define HAVE_C_VARARRAYS 1
20#endif
21
17/* Define to 1 if your C compiler supports inline functions. */ 22/* Define to 1 if your C compiler supports inline functions. */
18#define INLINE_FUNC 1 23#define INLINE_FUNC 1
19 24
20/* Define to prefix which will be used with MHD inline functions. */ 25/* Define to prefix which will be used with MHD inline functions. */
21#define _MHD_static_inline static __forceinline 26#define _MHD_static_inline static __forceinline
22 27
28#ifdef __clang__
29/* Define to 1 if you have __builtin_bswap32() builtin function */
30#define MHD_HAVE___BUILTIN_BSWAP32 1
31
32/* Define to 1 if you have __builtin_bswap64() builtin function */
33#define MHD_HAVE___BUILTIN_BSWAP64 1
34#endif /* __clang__ */
35
23 36
24/* *** MHD configuration *** */ 37/* *** MHD configuration *** */
25/* Undef to disable feature */ 38/* Undef to disable feature */
@@ -88,6 +101,33 @@
88#define HAVE_INTTYPES_H 1 101#define HAVE_INTTYPES_H 1
89#endif 102#endif
90 103
104#if _MSC_VER + 0 >= 1800 /* VS 2013 and later */
105/* Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines
106 'bool' type. */
107#define HAVE_STDBOOL_H 1
108#else /* before VS 2013 */
109
110/* Define to type name which will be used as boolean type. */
111#define bool int
112
113/* Define to value interpreted by compiler as boolean "false", if "false" is
114 not defined by system headers. */
115#define false 0
116
117/* Define to value interpreted by compiler as boolean "true", if "true" is not
118 defined by system headers. */
119#define true (!0)
120#endif /* before VS 2013 */
121
122/* Define to 1 if you have the `getsockname' function. */
123#define HAVE_GETSOCKNAME 1
124
125/* Define if you have usable `getsockname' function. */
126#define MHD_USE_GETSOCKNAME 1
127
128/* Define to 1 if your compiler supports __func__ magic-macro. */
129#define HAVE___FUNC__ 1
130
91 131
92/* *** Headers information *** */ 132/* *** Headers information *** */
93/* Not really important as not used by code currently */ 133/* Not really important as not used by code currently */
@@ -110,6 +150,9 @@
110/* Define to 1 if you have the <math.h> header file. */ 150/* Define to 1 if you have the <math.h> header file. */
111#define HAVE_MATH_H 1 151#define HAVE_MATH_H 1
112 152
153/* Define to 1 if you have the <sdkddkver.h> header file. */
154#define HAVE_SDKDDKVER_H 1
155
113/* Define to 1 if you have the <memory.h> header file. */ 156/* Define to 1 if you have the <memory.h> header file. */
114#define HAVE_MEMORY_H 1 157#define HAVE_MEMORY_H 1
115 158
@@ -140,23 +183,8 @@
140/* Define to 1 if you have the <stddef.h> header file. */ 183/* Define to 1 if you have the <stddef.h> header file. */
141#define HAVE_STDDEF_H 1 184#define HAVE_STDDEF_H 1
142 185
143#if _MSC_VER+0 >= 1800 /* VS 2013 and later */ 186/* Define to 1 if you have the <windows.h> header file. */
144/* Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines 187#define HAVE_WINDOWS_H 1
145 'bool' type. */
146#define HAVE_STDBOOL_H 1
147#else /* before VS 2013 */
148
149/* Define to type name which will be used as boolean type. */
150#define bool int
151
152/* Define to value interpreted by compiler as boolean "false", if "false" is
153 not defined by system headers. */
154#define false 0
155
156/* Define to value interpreted by compiler as boolean "true", if "true" is not
157 defined by system headers. */
158#define true (!0)
159#endif /* before VS 2013 */
160 188
161 189
162/* *** Other useful staff *** */ 190/* *** Other useful staff *** */
diff --git a/w32/common/libmicrohttpd-filters.vcxproj b/w32/common/libmicrohttpd-filters.vcxproj
index 1c409941..b74ad25a 100644
--- a/w32/common/libmicrohttpd-filters.vcxproj
+++ b/w32/common/libmicrohttpd-filters.vcxproj
@@ -153,6 +153,12 @@
153 <ClCompile Include="$(MhdSrc)microhttpd\mhd_itc.c"> 153 <ClCompile Include="$(MhdSrc)microhttpd\mhd_itc.c">
154 <Filter>Source Files</Filter> 154 <Filter>Source Files</Filter>
155 </ClCompile> 155 </ClCompile>
156 <ClInclude Include="$(MhdSrc)microhttpd\mhd_send.h">
157 <Filter>Source Files</Filter>
158 </ClInclude>
159 <ClCompile Include="$(MhdSrc)microhttpd\mhd_send.c">
160 <Filter>Source Files</Filter>
161 </ClCompile>
156 <ClInclude Include="$(MhdSrc)microhttpd\mhd_compat.h"> 162 <ClInclude Include="$(MhdSrc)microhttpd\mhd_compat.h">
157 <Filter>Source Files</Filter> 163 <Filter>Source Files</Filter>
158 </ClInclude> 164 </ClInclude>