Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Jul 2011 18:31:26 +0400
From: Solar Designer <solar@...nwall.com>
To: musl@...ts.openwall.com
Subject: Re: cluts review

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

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.