mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "dgutson ." <danielgutson@gmail.com>
To: musl@lists.openwall.com
Subject: Re: Re: #define __MUSL__ in features.h
Date: Thu, 15 Mar 2018 15:51:22 -0300	[thread overview]
Message-ID: <CAFdMc-3Wifmb5TdoddYyzkBSxUSY1tVb_=vTs9OW93myXAA=CQ@mail.gmail.com> (raw)
In-Reply-To: <20180315183939.GI1436@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]

On Thu, Mar 15, 2018 at 3:39 PM, Rich Felker <dalias@libc.org> wrote:

> On Thu, Mar 15, 2018 at 12:55:29PM -0300, dgutson . wrote:
> > > On Fri, Mar 29, 2013 at 09:44:05PM +0100, Daniel Cegiełka wrote:
> > > > Is it possible to add to the features.h __MUSL__ definition?
> > > >
> > > > glibc can be identified by __GLIBC__, uclibc through __UCLIBC__ etc.
> > >
> > > Is this question in the FAQ yet? If not, it really should be. The
> > > answer is no, it won't be added, because it's a bug to assume a
> > > certain implementation has particular properties rather than testing.
> >
> > That is a beautiful theory in an ideal world, but in the real world,
> >
> > implementations have bugs, and sometimes we need to workaround these
> bugs.
>
> If there's an actual bug you need to work around, detect it.
> Hard-coding "musl is buggy" is not beneficial to us; rather it leads
> to broken hacks lingering long after the bug is fixed.
>
> > (e.g. the FD* issue reported by Martin Galvan).
>
> That's not a bug. It's compiler warnings being wrongly produced for a
> system header, probably because someone added -I/usr/include or
> similar (normally GCC suppresses these).
>
> The musl policy regarding not having a macro like __MUSL__ is doing
> exactly what it's intended to do: encouraging developers and package
> maintainers to come to us (or investigate on their own) and fix the
> underlying portability problems (and sometimes musl bugs) rather than
> writing hacks to a specific version of musl that will be wrong a few
> versions later.
>

Fact #1: Software is not perfect. Bugs may show up. And sometimes in bad
timing when doing a release.
So, user developers have two options: hack the library with a workaround,
and release with a
hacked library untested and unverified by its supporting community, or they
can leave the library as-is, and
implement the workaround in the using code (which requires the macro in
order to limit the impact to the library implementation).

Fact #2: Fixes take time, because community projects have their own agenda
and triaging policies.

So, in the hypothetical bug of a library (no matter this particular case I
referred to, there were, there are, and there will always be bugs)
the macro will work as an escape hatch until the fix of the hypothetical
bug is ready upstream.

I'm writing this from a very practical and industry point of view (who have
worked in FLOSS projects before and commercial projects).


>
> Rich
>



-- 
Who’s got the sweetest disposition?
One guess, that’s who?
Who’d never, ever start an argument?
Who never shows a bit of temperament?
Who's never wrong but always right?
Who'd never dream of starting a fight?
Who get stuck with all the bad luck?

[-- Attachment #2: Type: text/html, Size: 3721 bytes --]

  parent reply	other threads:[~2018-03-15 18:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 15:55 dgutson .
2018-03-15 18:39 ` Rich Felker
2018-03-15 18:48   ` Martin Galvan
2018-03-15 18:53     ` Rich Felker
2018-03-15 19:00       ` dgutson .
2018-03-15 19:13         ` dgutson .
2018-03-15 19:42           ` Rich Felker
2018-03-15 20:16           ` u-uy74
2018-03-15 20:44             ` u-uy74
2018-03-15 19:37         ` Rich Felker
2018-03-15 19:42           ` dgutson .
2018-03-15 19:02       ` Martin Galvan
2018-03-15 19:32         ` Rich Felker
2018-03-15 19:37           ` dgutson .
2018-03-15 19:43             ` Rich Felker
2018-03-15 19:52               ` dgutson .
2018-03-15 21:46           ` Szabolcs Nagy
2018-03-15 22:38             ` Rich Felker
2018-03-15 18:51   ` dgutson . [this message]
2018-03-15 21:06     ` Markus Wichmann

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='CAFdMc-3Wifmb5TdoddYyzkBSxUSY1tVb_=vTs9OW93myXAA=CQ@mail.gmail.com' \
    --to=danielgutson@gmail.com \
    --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).