bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 3/7] stddef: Fix compilation for max_align_t on OS/2 kLIBC


From: KO Myung-Hun
Subject: [PATCH 3/7] stddef: Fix compilation for max_align_t on OS/2 kLIBC
Date: Tue, 19 Jan 2021 01:40:09 +0900

On OS/2 kLIBC, `max_align_t' is defined only in C++ mode.

* lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
---
 lib/stddef.in.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 77147e9bc..c415cbb85 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -104,7 +104,8 @@ typedef long max_align_t;
    On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was
    included.  Its definition is good since it has an alignment of 8 (on x86
    and x86_64).  */
-#if defined _MSC_VER && defined __cplusplus
+#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \
+  && defined __cplusplus
 # include <cstddef>
 #else
 # if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
-- 
2.22.0




reply via email to

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