From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9791 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Defining __STDC_ISO_10646__, __STDC_IEC_559__ and so on with musl? Date: Thu, 31 Mar 2016 16:35:48 +0200 Message-ID: <20160331143547.GP9862@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1459434966 26391 80.91.229.3 (31 Mar 2016 14:36:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 14:36:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9804-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 31 16:36:06 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aldhb-0000Lq-IN for gllmg-musl@m.gmane.org; Thu, 31 Mar 2016 16:36:03 +0200 Original-Received: (qmail 8085 invoked by uid 550); 31 Mar 2016 14:36:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 8062 invoked from network); 31 Mar 2016 14:35:59 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9791 Archived-At: * 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 #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