From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/139 Path: news.gmane.org!not-for-mail From: Solar Designer Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts review Date: Wed, 13 Jul 2011 18:31:26 +0400 Message-ID: <20110713143126.GB23463@openwall.com> References: <20110713110723.GA22153@openwall.com> <4E1D8964.3020502@gmail.com> <20110713122128.GA22658@openwall.com> <4E1D9631.3070203@gmail.com> <20110713135423.GA23183@openwall.com> <20110713140002.GD16618@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310567497 15454 80.91.229.12 (13 Jul 2011 14:31:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 14:31:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-223-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 13 16:31:34 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qh0TM-0005qO-QR for gllmg-musl@lo.gmane.org; Wed, 13 Jul 2011 16:31:32 +0200 Original-Received: (qmail 26342 invoked by uid 550); 13 Jul 2011 14:31:32 -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 26334 invoked from network); 13 Jul 2011 14:31:32 -0000 Content-Disposition: inline In-Reply-To: <20110713140002.GD16618@brightrain.aerifal.cx> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.linux.lib.musl.general:139 Archived-At: On Wed, Jul 13, 2011 at 10:00:02AM -0400, Rich Felker wrote: > On Wed, Jul 13, 2011 at 05:54:23PM +0400, Solar Designer wrote: > > OK. Why the "#define _POSIX_C_SOURCE 200809L //sigaction" vs. "#define > > _XOPEN_SOURCE //sigaction" inconsistency, though? I think _XOPEN_SOURCE > > is a safer bet here. > > I would really put this in the makefile for consistency. In principle, > the values of feature test macros could lead to different versions of > certain functions being used, possibly even with different > interfaces/ABI, and cause problems with linking together object files > compiled with different settings. This makes sense to me. Historically, I tend to use the #define thing, but you have a valid point for doing it in the Makefile instead. > I think it's pretty hard to test functions that are part of a standard > that depends on and includes C99, while not requiring a (mostly) > C99-supporting compiler. Of course, those newer functions would need to be skipped when cluts is built and run on an older system. > snprintf is C99 and POSIX and I think it's pretty reasonable to rely > on it. Agreed. > Legacy systems can implement it as a hideous wrapper for > tmpfile(), fprintf(), and fread() if they're not willing to fix their > libcs. :-) Yes, this is hideous. Alexander