mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Kurt H Maier <khm@sdf.org>
To: musl@lists.openwall.com
Subject: Re: Why there's no __MUSL__ macro question
Date: Wed, 23 Mar 2016 09:28:40 -0400	[thread overview]
Message-ID: <20160323132840.GD69755@wopr.sciops.net> (raw)
In-Reply-To: <CAHPF5DAFZkatiD=QnfkT6Ky2PLVku0PUP1FD_GuR5B04hj9LWA@mail.gmail.com>

On Wed, Mar 23, 2016 at 01:08:16PM +0000, Sérgio Marques wrote:
> 
> How are we expected to solve this kind of problem if not by using the
> __MUSL__ macro?

The recommended solution is to fix the code to be portable, instead of
installing yet another special-case workaround.

In this case, wrapping the "#include <execinfo.h>" line in an
#ifdef __GLIBC__ would be more appropriate than special-casing for musl,
since musl is not the only environment that lacks execinfo.h.  I suspect
this code would also fail to build on cygwin, for instance.

If there existed a __MUSL__ macro, the maintainers of software like this
would just use it instead of writing portable code.  By refusing to
implement a __MUSL__ macro, musl is helping to urge projects in the
right direction.

khm



  reply	other threads:[~2016-03-23 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 13:08 Sérgio Marques
2016-03-23 13:28 ` Kurt H Maier [this message]
2016-03-23 14:17   ` Shiz
2016-03-23 15:05     ` 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=20160323132840.GD69755@wopr.sciops.net \
    --to=khm@sdf.org \
    --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).