gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/09: mhd_align.h: added support for MSVC compiler


From: gnunet
Subject: [libmicrohttpd] 05/09: mhd_align.h: added support for MSVC compiler
Date: Wed, 21 Jul 2021 22:25:24 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit c2a8933a7e192fca3c033c9ece1727d0498f5a23
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Jul 21 22:08:35 2021 +0300

    mhd_align.h: added support for MSVC compiler
---
 src/microhttpd/mhd_align.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/microhttpd/mhd_align.h b/src/microhttpd/mhd_align.h
index 1d477acb..30b4f15d 100644
--- a/src/microhttpd/mhd_align.h
+++ b/src/microhttpd/mhd_align.h
@@ -42,6 +42,16 @@
 
 #endif /* HAVE_C_ALIGNOF */
 
+#ifndef _MHD_ALIGNOF
+#if defined(_MSC_VER) && ! defined(__clang__) && _MSC_VER >= 1900
+/* MSVC has the same problem as older GCC versions:
+   '__alignof()' may return "preferred" alignment instead of "required",
+   but it is related to floating point variables only. */
+#define _MHD_ALIGNOF(type) __alignof(type)
+#endif /* _MSC_VER >= 1900 */
+#endif /* !_MHD_ALIGNOF */
+
+
 #ifdef offsetof
 #define _MHD_OFFSETOF(strct, membr) offsetof(strct, membr)
 #else  /* ! offsetof */

-- 
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]