mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Using libcxx with musl's math.h
Date: Thu, 10 Mar 2016 14:13:20 -0500	[thread overview]
Message-ID: <20160310191320.GP9349@brightrain.aerifal.cx> (raw)
In-Reply-To: <56E1C0F4.8010106@codeplay.com>

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


  reply	other threads:[~2016-03-10 19:13 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 [this message]
2016-03-10 20:01   ` Jeroen Ketema

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=20160310191320.GP9349@brightrain.aerifal.cx \
    --to=dalias@libc.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).