Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E3AF6B12-5C33-465F-8FD5-AE48A6FF883A@codeplay.com>
Date: Thu, 10 Mar 2016 20:01:10 +0000
From: Jeroen Ketema <jeroen@...eplay.com>
To: musl@...ts.openwall.com
Subject: Re: Using libcxx with musl's math.h


Hi Rich,

Thanks for your quick answer.

Digging a bit deeper, it turns out that libcxx comes with it’s own math.h, which uses #include_next to include the C library's math.h. I totally missed this the first time through libcxx’s headers. Sorry for the noise.

Best,

 Jeroen

> On 10 Mar 2016, at 19:13, Rich Felker <dalias@...c.org> wrote:
> 
> On Thu, Mar 10, 2016 at 06:46:12PM +0000, Jeroen Ketema wrote:
>> Hello,
>> 
>> I'm trying to use libcxx's cmath header together with musl's math.h.
>> However this currently fails, because libcxx expects certain symbols
>> to be functions, while musl defines them as macros. For example
>> (compiling with clang):
>> 
>> cmath:309:9: error: no member named 'signbit' in the global
>>      namespace; did you mean '__signbit'?
>> using ::signbit;
>>      ~~^
>> 
>> where signbit is a macro in musl, but where libcxx expects it to be
>> a function.
>> 
>> My question is: what would be the proper way to fix this? The main
>> issue being of course that I cannot simply define signbit to be a
>> function, because it requires a form of overloading.
> 
> I think this is a libcxx bug. C requires signbit to be a macro. If C++
> has different requirements then the C++ implementation should be
> providing an overlay header that satisfies them.
> 
> Rich

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.