[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.
- [libmicrohttpd] branch master updated (ecf9dbb6 -> 237aebfa), gnunet, 2021/07/21
- [libmicrohttpd] 01/09: Restructured files in MSVC project, gnunet, 2021/07/21
- [libmicrohttpd] 05/09: mhd_align.h: added support for MSVC compiler,
gnunet <=
- [libmicrohttpd] 06/09: mhd_str.h: fixed compilation with MSVC, gnunet, 2021/07/21
- [libmicrohttpd] 04/09: mhd_align.h: fixed copy-paste error, gnunet, 2021/07/21
- [libmicrohttpd] 02/09: MSVC project: defaults to Vista+, gnunet, 2021/07/21
- [libmicrohttpd] 09/09: mhd_str: use smaller include, gnunet, 2021/07/21
- [libmicrohttpd] 03/09: MSVC projects: added missing header, gnunet, 2021/07/21
- [libmicrohttpd] 08/09: test_str_tokens_remove: shut spell checker, gnunet, 2021/07/21
- [libmicrohttpd] 07/09: test_str_tokens_remove: test corner cases, gnunet, 2021/07/21