Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <541182D3.5010104@skarnet.org>
Date: Thu, 11 Sep 2014 12:09:07 +0100
From: Laurent Bercot <ska-dietlibc@...rnet.org>
To: musl@...ts.openwall.com
Subject: Re: why is there no __MUSL__ macro?

> 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.