bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: KO Myung-Hun <komh78@gmail.com>
To: bug-gnulib@gnu.org
Subject: [PATCH 3/7] stddef: Fix compilation for max_align_t on OS/2 kLIBC
Date: Tue, 19 Jan 2021 01:40:09 +0900	[thread overview]
Message-ID: <20210118164013.42063-3-komh@chollian.net> (raw)
In-Reply-To: <20210118164013.42063-1-komh@chollian.net>

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



  parent reply	other threads:[~2021-01-18 17:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 16:40 [PATCH 1/7] spawn: Use special invocation for <spawn.h> on OS/2 kLIBC KO Myung-Hun
2021-01-18 16:40 ` [PATCH 2/7] yield: Fix linkage to threadlib " KO Myung-Hun
2021-01-18 16:40 ` KO Myung-Hun [this message]
2021-01-18 16:40 ` [PATCH 4/7] stdlib: putenv() needs a cast " KO Myung-Hun
2021-01-19 17:54   ` Bruno Haible
2021-01-22 14:35     ` KO Myung-Hun
2021-01-31  8:32     ` KO Myung-Hun
2021-01-18 16:40 ` [PATCH 5/7] zerosize-ptr: Fix compilation " KO Myung-Hun
2021-01-19 18:10   ` Bruno Haible
2021-01-22 14:26     ` KO Myung-Hun
2021-01-18 16:40 ` [PATCH 6/7] dirent: Redefine dirfd macro as a rpl function always KO Myung-Hun
2021-01-18 16:40 ` [PATCH 7/7] spawn-pipe: Fix SIGSEGV on OS/2 kLIBC KO Myung-Hun
2021-01-19 18:28 ` [PATCH 1/7] spawn: Use special invocation for <spawn.h> " Bruno Haible
2021-01-22 14:37   ` KO Myung-Hun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210118164013.42063-3-komh@chollian.net \
    --to=komh78@gmail.com \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).