mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Masanori Ogino <masanori.ogino@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Defining __STDC_ISO_10646__, __STDC_IEC_559__ and so on with musl?
Date: Thu, 31 Mar 2016 23:50:59 +0900	[thread overview]
Message-ID: <CAA-4+jcOtVfpLKsEW+ZbVKH0LYnHO4S61uNtXF+gCWAfqbxzJQ@mail.gmail.com> (raw)
In-Reply-To: <20160331143547.GP9862@port70.net>

2016-03-31 23:35 GMT+09:00 Szabolcs Nagy <nsz@port70.net>:
> * 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

OK, I will try. I hit a problem with such macros, so I sent a mail. :)

> #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

ISO/IEC 10646:2014/Amd 1:2015, right?

>> 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.

OK.

-- 
Masanori Ogino


      parent reply	other threads:[~2016-03-31 14:50 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
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 [this message]

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=CAA-4+jcOtVfpLKsEW+ZbVKH0LYnHO4S61uNtXF+gCWAfqbxzJQ@mail.gmail.com \
    --to=masanori.ogino@gmail.com \
    --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).