From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2362 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Design idea for subarchs/abivariants Date: Thu, 29 Nov 2012 09:03:32 +0100 Message-ID: <20121129080332.GN10895@port70.net> References: <20121128192618.GA7491@brightrain.aerifal.cx> <20121128223801.GL10895@port70.net> <20121129001042.GU20323@brightrain.aerifal.cx> <20121129002251.GA13394@intma.in> 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 1354176244 29427 80.91.229.3 (29 Nov 2012 08:04:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2012 08:04:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2363-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 29 09:04:16 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tdz6U-0007bj-Op for gllmg-musl@plane.gmane.org; Thu, 29 Nov 2012 09:04:14 +0100 Original-Received: (qmail 15991 invoked by uid 550); 29 Nov 2012 08:03:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15967 invoked from network); 29 Nov 2012 08:03:44 -0000 Content-Disposition: inline In-Reply-To: <20121129002251.GA13394@intma.in> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2362 Archived-At: * Kurt H Maier [2012-11-28 19:22:51 -0500]: > I'm asking this to be educated, rather than to make a point: why is a > system like this preferable to the way plan9 libc is written, which as > far as I can tell uses no ifdef at all? i looked at this it seems the plan9 and musl approach is similar in the sense that they avoid unnecessary ifdefs (putting arch specific stuff in separate dir etc, plan9 has union mount, musl uses a bits symlink in case of headers) they both use ifdefs for feature test macros (obviously it's much less needed in plan9 but see the ape implementation and it has some, musl needs a lot) they both use ifdefs for typedef and include guards (plan9 only uses them in ape, this is unavioidable in a posix libc) musl has to use ifdefs for some compiler specific features (plan9 don't need this, they have their own compiler) now musl will need to use ifdefs for some arch parameters (endianness, soft vs hard float, long double,..) plan9 libc does not need these because they don't implement such things (there is no soft float or long double support, no fenv, no endian dependent api etc) but plan9 has ifdefs for arch specific options as well (eg in driver code) just not in the libc