From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Defining __STDC_ISO_10646__, __STDC_IEC_559__ and so on with musl?
Date: Thu, 31 Mar 2016 16:35:48 +0200 [thread overview]
Message-ID: <20160331143547.GP9862@port70.net> (raw)
In-Reply-To: <CAA-4+jd-Sqx-JVkfXCsoB0Sccf7BehZ=x4fUthbMiCMWZd30zQ@mail.gmail.com>
* Masanori Ogino <masanori.ogino@gmail.com> [2016-03-31 20:34:22 +0900]:
> The C standard specifies some predefined macros to determine
> implementation-dependent characteristics, e.g. __STDC_ISO_10646__.
> However, it seems that those macros are omitted with musl-based
> toolchains. (I read cross-musl patches and tested with Gentoo's musl
> toolchain.)
>
> glibc handles them using a small header file named stdc-predef.h and a
yes, this is the right approach we just never got
around adding it. i think it should contain
#if __GCC_IEC_559 > 0
#define __STDC_IEC_559__ 1
#endif
#if __GCC_IEC_559_COMPLEX > 0
#define __STDC_IEC_559_COMPLEX__ 1
#endif
#define __STDC_ISO_10646__ 201505L
> hook to GCC. (glibc has the header separately and GCC treats it
> specially since the macros should be defined even if the source code
> doesn't include any headers.)
>
> Could we provide the macros with similar approaches or patches to GCC
> to just define them?
>
i think we don't have to modify gcc,
on *-linux* targets t-glibc is included
which does the stdc-predef.h include magic.
> --
> Masanori Ogino
next prev parent reply other threads:[~2016-03-31 14:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 11:34 Masanori Ogino
2016-03-31 14:35 ` Szabolcs Nagy [this message]
2016-03-31 14:48 ` Christian Neukirchen
2016-03-31 14:54 ` Masanori Ogino
2016-03-31 14:49 ` Rich Felker
2016-03-31 14:50 ` Masanori Ogino
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160331143547.GP9862@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).