mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Re: Best bikeshed ever (feature test macros)
Date: Wed, 29 Aug 2012 14:08:15 -0400	[thread overview]
Message-ID: <20120829180815.GZ27715@brightrain.aerifal.cx> (raw)
In-Reply-To: <20120829105926.4deebc51@newbook>

On Wed, Aug 29, 2012 at 10:59:26AM -0700, Isaac Dunham wrote:
> > >>> 1. Leaving everything as it is.
> > >>> 2. Making the kitchen sink (_GNU_SOURCE) available by default.
> > >>> 3. Making only some limited subset (e.g. POSIX base) available by
> > >>> default.
> > >> The bikeshed should definitely not be colored black.
> > >>
> > >> I'd lean towards 3, 1 is fine too. but please not 2, musl's
> > >> correctness is one of it's unique features...
> 
> Agreed..._GNU_SOURCE is the kitchen sink _and_ the garbage can as well.

And glibc's version of "no feature test macros" is 90% of the garbage
can and 10% of the kitchen sink...

> > _XOPEN_SOURCE=700 has the advantage that it does include lots of
> > things, and is a standard, so it's not an arbitrary moving target.
> > It's probably not sufficient, but I'm not wholly convinced of that.
> 
> I said _XOPEN_SOURCE=600, with musl's behavior (equivalent to
> _XOPEN_SOURCE=700 + obsolete extensions). There are a few extensions
> that occasionally pop up.

Yes. If we do change things I think I'd rather have it work as
_XOPEN_SOURCE=700 + some-other-feature than _XOPEN_SOURCE=600, since
the latter is very confusing to someone readong the headers who might
think defining _XOPEN_SOUCE to 600 by default omits the SUSv4
functionality.

> > _BSD_SOURCE (which on musl apparently implies _XOPEN_SOURCE, which
> > makes sense since it's not like they're not trying) is better, the
> > only reason I don't like it is that it's not a standard, so there's
> > no clear demarcation of what it could imply, and arbitrary new things
> > from the BSDs could be added at any point. 
> When I prepared the patch, I followed _NETBSD_SOURCE on current-ish
> NetBSD.
> It does (did?) not _necessarily_ imply _XOPEN_SOURCE, but there are few
> places where NetBSD does not make X/Open 700 functionality available.

I'm not sure what the current state is, but my preference (in the
absence of other considerations) would be for it to include everything
from XSI that's actually desirable, possibly omitting legacy, useless,
and nonsensical stuff.

Rich


  reply	other threads:[~2012-08-29 18:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 21:41 Rich Felker
2012-08-24 22:24 ` Gregor Richards
2012-08-24 23:59 ` Szabolcs Nagy
2012-08-25  7:35 ` orc
2012-08-25 12:32   ` Rich Felker
2012-08-25 15:29     ` orc
2012-08-25  9:11 ` Luca Barbato
2012-08-27 18:08 ` Isaac Dunham
2012-08-29  5:34 ` philomath
2012-08-29 13:49   ` Rich Felker
2012-08-29 14:01     ` Gregor Richards
2012-08-29 14:43       ` Rich Felker
2012-08-29 15:08         ` Bobby Bingham
2012-08-29 15:23           ` Rich Felker
2012-08-29 17:17             ` Gregor Richards
2012-08-29 17:59       ` Isaac Dunham
2012-08-29 18:08         ` Rich Felker [this message]
2012-09-02  8:48 ` Arvid E. Picciani
2012-09-02 15:19   ` Rich Felker
2012-09-02 15:27     ` Arvid E. Picciani
2012-09-02 15:44       ` Rich Felker
2012-09-02 17:00 ` nwmcsween
2012-09-02 17:06   ` Gregor Richards
2012-09-02 17:13     ` Rich Felker
2012-09-02 17:18       ` Gregor Richards
2012-09-02 17:10   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120829180815.GZ27715@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).