gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 08/08: Fixed builds with MSVS


From: gnunet
Subject: [libmicrohttpd] 08/08: Fixed builds with MSVS
Date: Mon, 25 Oct 2021 15:58:58 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit b6a6f46c9437cc2ffc472b0bfdc45d6c9a5b4d27
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Oct 25 16:55:32 2021 +0300

    Fixed builds with MSVS
---
 src/microhttpd/mhd_align.h |  2 +-
 w32/common/MHD_config.h    | 41 +++++++++++++++++++++++++++++++++++++----
 2 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/mhd_align.h b/src/microhttpd/mhd_align.h
index 47e9f199..a4cba166 100644
--- a/src/microhttpd/mhd_align.h
+++ b/src/microhttpd/mhd_align.h
@@ -42,7 +42,7 @@
 #ifndef _MHD_ALIGNOF
 #if defined(_MSC_VER) && ! defined(__clang__) && _MSC_VER >= 1700
 #define _MHD_ALIGNOF(type) __alignof(type)
-#endif /* _MSC_VER >= 1900 */
+#endif /* _MSC_VER >= 1700 */
 #endif /* !_MHD_ALIGNOF */
 
 #ifdef _MHD_ALIGNOF
diff --git a/w32/common/MHD_config.h b/w32/common/MHD_config.h
index 7bbbc4f0..2c51237a 100644
--- a/w32/common/MHD_config.h
+++ b/w32/common/MHD_config.h
@@ -9,13 +9,13 @@
 /* Define if MS VC compiler is used */
 #define MSVC 1
 
-/* Define that MS VC does not support VLAs */
 #ifndef __clang__
+/* Define that MS VC does not support VLAs */
+#ifndef __STDC_NO_VLA__
 #define __STDC_NO_VLA__ 1
-#endif
-
+#endif /* ! __STDC_NO_VLA__ */
+#else
 /* If clang is used then variable-length arrays are supported. */
-#ifdef __clang__
 #define HAVE_C_VARARRAYS 1
 #endif
 
@@ -33,6 +33,31 @@
 #define MHD_HAVE___BUILTIN_BSWAP64 1
 #endif /* __clang__ */
 
+/* The size of `size_t', as computed by sizeof. */
+#if defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) || 
defined(_WIN64)
+#define SIZEOF_SIZE_T 8
+#else  /* ! _WIN64 */
+#define SIZEOF_SIZE_T 4
+#endif /* ! _WIN64 */
+
+/* The size of `tv_sec' member of `struct timeval', as computed by sizeof */
+#define SIZEOF_STRUCT_TIMEVAL_TV_SEC 4
+
+/* The size of `uint64_t', as computed by sizeof. */
+#define SIZEOF_UINT64_T 8
+
+/* The size of `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of `unsigned long long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+
+/* Define to supported 'noreturn' function declaration */
+#if defined(_STDC_VERSION__) && (__STDC_VERSION__ + 0) >= 201112L
+#define _MHD_NORETURN _Noreturn
+#else  /* before C11 */
+#define _MHD_NORETURN __declspec(noreturn)
+#endif /* before C11 */
 
 /* *** MHD configuration *** */
 /* Undef to disable feature */
@@ -128,6 +153,14 @@
 /* Define to 1 if your compiler supports __func__ magic-macro. */
 #define HAVE___FUNC__ 1
 
+#if _MSC_VER + 0 >= 1900 /* VS 2015 and later */
+#if defined(_STDC_VERSION__) && (__STDC_VERSION__ + 0) >= 201112L
+/* Define to 1 if your compiler supports 'alignof()' */
+#define HAVE_C_ALIGNOF 1
+/* Define to 1 if you have the <stdalign.h> header file. */
+#define HAVE_STDALIGN_H 1
+#endif /* C11 */
+#endif /* VS 2015 and later */
 
 /* *** Headers information *** */
 /* Not really important as not used by code currently */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]