From: Laurent Bercot <ska-dietlibc@skarnet.org>
To: musl@lists.openwall.com
Subject: Re: why is there no __MUSL__ macro?
Date: Thu, 11 Sep 2014 12:09:07 +0100 [thread overview]
Message-ID: <541182D3.5010104@skarnet.org> (raw)
In-Reply-To: <541180B9.5070604@posteo.de>
> FFmpeg needs support for library features defined in POSIX.1-2001 with XSI extension and the standards below. Currently configure probes the host and target libc by checking for defined macros like __GLIBC__ and __UCLIBC__. In case of glibc and uclibc it sets -D_XOPEN_SOURCE=600 properly.
Why not set this macro unconditionally ?
All standards-compliant libcs will make the correct symbols visible
if you define _XOPEN_SOURCE to a certain value. This include glibc,
uClibc, musl, and most other modern libcs. Some systems are
notoriously broken (I'm thinking of FreeBSD, which makes a few
standard symbols *not* visible when you define the correct macro),
but they should be the ones with specialcasing if you need to
support them.
> What could be a solution which supports musl?
My answer as a musl user, which may be different from answers from
musl developers, is to use -D_XOPEN_SOURCE=600 without testing for
the libc name, and only use system-specific macros to work around
bugs in non-compliant systems.
--
Laurent
next prev parent reply other threads:[~2014-09-11 11:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 11:00 Jörg Krause
2014-09-11 11:09 ` Laurent Bercot [this message]
2014-09-11 11:17 ` Szabolcs Nagy
2014-09-11 12:02 ` Jörg Krause
2014-09-11 12:38 ` Szabolcs Nagy
2014-09-11 13:33 ` Jörg Krause
2014-09-11 14:48 ` Szabolcs Nagy
2014-09-11 14:30 ` Christian Neukirchen
2014-09-11 11:17 ` Jens
2014-09-11 12:24 ` Jörg Krause
2014-09-11 14:53 ` Isaac Dunham
2014-09-12 7:39 ` Jörg Krause
2014-09-11 14:47 ` Natanael Copa
2014-09-12 7:35 ` Jörg Krause
2014-09-12 15:37 ` 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=541182D3.5010104@skarnet.org \
--to=ska-dietlibc@skarnet.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).