From: Jeroen Ketema <jeroen@codeplay.com>
To: musl@lists.openwall.com
Subject: Re: Using libcxx with musl's math.h
Date: Thu, 10 Mar 2016 20:01:10 +0000 [thread overview]
Message-ID: <E3AF6B12-5C33-465F-8FD5-AE48A6FF883A@codeplay.com> (raw)
In-Reply-To: <20160310191320.GP9349@brightrain.aerifal.cx>
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@libc.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
prev parent reply other threads:[~2016-03-10 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 18:46 Jeroen Ketema
2016-03-10 19:13 ` Rich Felker
2016-03-10 20:01 ` Jeroen Ketema [this message]
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=E3AF6B12-5C33-465F-8FD5-AE48A6FF883A@codeplay.com \
--to=jeroen@codeplay.com \
--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).