From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9794 Path: news.gmane.org!not-for-mail From: Masanori Ogino 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 23:50:59 +0900 Message-ID: References: <20160331143547.GP9862@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1459435895 9918 80.91.229.3 (31 Mar 2016 14:51:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 14:51:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9807-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 31 16:51:34 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 1aldwM-0007Lk-Cv for gllmg-musl@m.gmane.org; Thu, 31 Mar 2016 16:51:18 +0200 Original-Received: (qmail 26550 invoked by uid 550); 31 Mar 2016 14:51:11 -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 26529 invoked from network); 31 Mar 2016 14:51:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=4QBk+UbUiyrum7LagxyViI4r1lo14NAPHlPy9ilb6oA=; b=YilCHARIOFxMfsv+cGVf+6qeLwoG4FVywjDy7JkJooLMPRMVh6mlnvY4bGTup1NDoE j5pjU4SptQiP7YSAUiPyhunDDsr/mpsqga6NaTIsspXGT8WsBi36ZekeTM4RZBc+VcIU EvwbxVvYQOV0GikbQ/RKqUm5SWAmn800USbXMu0yDVocZY/h0ikW+NmfVZhsat3hv6YB 5afPxuAfOy/E8Pnwe/X8+lBrzPogucglCL+3fpw8HozkjoW0rdaHrCUilUPvyEebbgZB u9BbGRl4MMfkWek0WO0zM6JhnZQ8z6AKu34CVGwxUmJAKPAtcihMWaRwwotWjxoTPIbg wTZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to; bh=4QBk+UbUiyrum7LagxyViI4r1lo14NAPHlPy9ilb6oA=; b=dX9kuW+tnAY+j5POSQvIec1IctEGKK1Ts/Yj+H3pA8GKpUoS9XVULBjO5/Hgu9MZ9+ crft4z5/Ecf8iKun1LUImTSet/7ETWvDOiVlZJOZMMgfY7BlUV6jYEWZJy57n2UuhWPk jEima6w1z29XJh1TAphX5hlSat4FGlKurxKvxwltBxKXSO3rQkgKF4o/gU4NP5khifh2 TflQX/MH79X62baphH+WKw/hdr3ypQ8EXUkqnp/e1oe6aOzQqnNKbc4iRM+71tf2lGXY EAchSTd+JrlmUJZZcTATz4WLSQ5Q/aZCMO8innRcm3xdkF2bqI233lZrlFGzoLiWUx2I KFnQ== X-Gm-Message-State: AD7BkJIUUASF8fOOiqIvD7GIp90z+HyRlGMsZLyt5iGdXoIieueRyrJpYxB9yOSqrZk6UKx84X/Q1j6TnMbBrQ== X-Received: by 10.202.104.92 with SMTP id d89mr848347oic.75.1459435859222; Thu, 31 Mar 2016 07:50:59 -0700 (PDT) Original-Sender: masanoriogino@gmail.com In-Reply-To: <20160331143547.GP9862@port70.net> X-Google-Sender-Auth: exNfPIZtzo000YsTZkphg7pXMDc Xref: news.gmane.org gmane.linux.lib.musl.general:9794 Archived-At: 2016-03-31 23:35 GMT+09:00 Szabolcs Nagy : > * 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 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