]> Savannah Git Hosting - gnulib.git/commitdiff
stddef: Fix compilation for max_align_t on OS/2 kLIBC.
authorKO Myung-Hun <komh78@gmail.com>
Mon, 18 Jan 2021 16:40:09 +0000 (01:40 +0900)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2021 17:49:43 +0000 (18:49 +0100)
* lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.

ChangeLog
lib/stddef.in.h

index ee711d38738eec05eb3242c3bb61e0c7463c6ed8..83d724cfbed6a5c5197bc4b62aae0af93ff9304b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-19  KO Myung-Hun  <komh78@gmail.com>
+
+       stddef: Fix compilation for max_align_t on OS/2 kLIBC.
+       * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
+
 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
 
        yield: Implement for OS/2 kLIBC.
index 77147e9bcc7d5a5dabf4085db8dacf0b3568b551..5d3e087b449a27e676e80e3c79f536eca8731938 100644 (file)
@@ -103,8 +103,10 @@ typedef long max_align_t;
    we are currently compiling with gcc.
    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
+   and x86_64).
+   Similarly on OS/2 kLIBC.  */
+#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \
+    && defined __cplusplus
 # include <cstddef>
 #else
 # if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)