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 11:23:19 -0400	[thread overview]
Message-ID: <20120829152319.GW27715@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAFNaaxSMNEccFOh+3MJegsJ1iSXhJrLHTg59SbX5r=Z5TLxRpw@mail.gmail.com>

On Wed, Aug 29, 2012 at 10:08:34AM -0500, Bobby Bingham wrote:
> On Wed, Aug 29, 2012 at 9:43 AM, Rich Felker <dalias@aerifal.cx> wrote:
> >
> > 3. Make as much software as possible "just work".
> >
> 
> I would much rather that the software worked because it was correct,
> and not because musl worked around its brokenness.
> 
> I realize this isn't a very practical viewpoint, especially if you
> hope to have musl see any adoption, but you asked for opinions and I
> think broken software should be allowed to break.  The fixes belong in
> those projects, not worked around in musl.  This is wishful thinking,
> but perhaps if we had a major libc that exposed this brokenness by
> default, it would raise awareness among the authors of other software
> and they would fix it.

Unfortunately a large portion of projects that need extension
functionality of any sort are unwilling to "fix" the issue, because
the existing libcs are so broken. For example, if you want the kitchen
sink on some (most?) BSDs, the only way to get it is to omit all
feature test macros entirely. This makes project maintainers very wary
of using feature test macros.

In principle, musl's approach changed from "make sure broken programs
break as often as possible" to "be as compatible as possible within
the letter of the specs" a long time ago. For example with expose
MAP_ANONYMOUS by default even though it's officially an extension,
because MAP_* is in the reserved namespace for mman.h, making it legal
(albeit of course not required) to expose it. There are several other
places where we do the same with nonstandard fields in structures; if
the field prefix (e.g. st_*, etc.) is in the reserved namespace, we
take advantage of that to accommodate applications as much as
possible.

I originally wanted to pressure broken programs to fix their breakage.
But the goal of musl is to fix libc, not to fix every broken program
out there. And I don't think we can do both at the same time...

> With glibc providing the kitchen sink, they have very little incentive
> to do anything about it, if they're even aware of it in the first
> place.

Actually glibc does something more like #3, but worse. By default it
only standard C functions and unixy stuff that was in _legacy_ unix.
And maybe some random subset of newer stuff they like. It's a very
ugly situation to be dealing with, much uglier than "the kitchen sink"
since some important, desirable interfaces are missing.

> I vote for #1.

Noted. :-)

Rich


  reply	other threads:[~2012-08-29 15:23 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 [this message]
2012-08-29 17:17             ` Gregor Richards
2012-08-29 17:59       ` Isaac Dunham
2012-08-29 18:08         ` Rich Felker
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=20120829152319.GW27715@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).