Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 31 Mar 2016 16:35:48 +0200
From: Szabolcs Nagy <>
Subject: Re: Defining __STDC_ISO_10646__, __STDC_IEC_559__ and so on
 with musl?

* Masanori Ogino <> [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

#if __GCC_IEC_559_COMPLEX > 0
#define __STDC_IEC_559_COMPLEX__ 1

#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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.