Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1418055521.15892.16.camel@posteo.de>
Date: Mon, 08 Dec 2014 17:18:41 +0100
From: Jörg Krause <jkrause@...teo.de>
To: musl@...ts.openwall.com
Subject: Re: pthread_equal

On Mo, 2014-12-08 at 09:56 -0500, Rich Felker wrote:
> On Mon, Dec 08, 2014 at 03:42:25PM +0100, Jörg Krause wrote:
> > Why does musl declares pthread_equal both as macro and as function?
> 
> C and POSIX allow any of their standard functions to be provided as
> macros too, but the function definition must always be provided. The
> reason I put the macro in musl is simply that it's easy to do and
> gives better code (trivial inline comparison rather than spilling all
> registers and making a function call) and it's not something where the
> implementation could change or need to change.
> 
> Rich

I see! The problem was, that MPD (Music Player Daemon, implemented in C
++) for instance used ::pthread_equal(id, other_id) which did not build
with musl because of the macro expansion.

The maintainer removed the namespace operator to get it work with musl: 
http://git.musicpd.org/cgit/master/mpd.git/commit/?h=v0.18.x&id=d8fc2db910a11dbbba53ba7ecf96d0e32a081076

Jörg

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.