From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9558 Path: news.gmane.org!not-for-mail From: Jeroen Ketema Newsgroups: gmane.linux.lib.musl.general Subject: Re: Using libcxx with musl's math.h Date: Thu, 10 Mar 2016 20:01:10 +0000 Message-ID: References: <56E1C0F4.8010106@codeplay.com> <20160310191320.GP9349@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1457640095 8193 80.91.229.3 (10 Mar 2016 20:01:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2016 20:01:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9571-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 10 21:01:35 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ae6lz-0007U4-Dt for gllmg-musl@m.gmane.org; Thu, 10 Mar 2016 21:01:27 +0100 Original-Received: (qmail 17655 invoked by uid 550); 10 Mar 2016 20:01:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17636 invoked from network); 10 Mar 2016 20:01:23 -0000 Authentication-Results: mail.codeplay.com (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=codeplay.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeplay.com; h= x-mailer:to:references:message-id:content-transfer-encoding:date :date:in-reply-to:from:from:subject:subject:mime-version :content-type:content-type; s=dkim; t=1457640075; x=1458504076; bh=IfqTdodQbdBPBFA6iJE/Rpv9vD1E10aKxvHvvexSUWM=; b=xU+oier9gB2u X4Z1uqIeewFNv+jhGV9h8EuwUtHVbfj7xH7f4hbDWEcI6CT1B3uWBUE1N3qhnCY+ 1vj2GXzND7cub+7VZcVOMBXdmzgV68Jo68mJf1Vy/TsLcd0ahXbaQfK5q9qgi/bQ Rnd4vQUKLwTCjSOX2Mg/n4zYl1F5Q6w1ZgFZvWasGGa6RFcKdTpgLkGUywUr0NcM whuvF2jCPLMVilwc7S+4FyLiq3qDH5rDrF+Hmft/IGyZmUfk110/jCxbO01pQt2w 6Vdv4R1Npw2FMw4nQGRd3RGfl6hafJcRB2o0iMxlKfU/njxWRr4hQ8MSZEVviELU STjIq+mE9Q== X-Virus-Scanned: Debian amavisd-new at mail.codeplay.com X-Spam-Flag: NO X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-0.999 tagged_above=-100 required=6.31 tests=[ALL_TRUSTED=-1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no In-Reply-To: <20160310191320.GP9349@brightrain.aerifal.cx> X-Mailer: Apple Mail (2.3112) Xref: news.gmane.org gmane.linux.lib.musl.general:9558 Archived-At: Hi Rich, Thanks for your quick answer. Digging a bit deeper, it turns out that libcxx comes with it=E2=80=99s = own math.h, which uses #include_next to include the C library's math.h. = I totally missed this the first time through libcxx=E2=80=99s headers. = Sorry for the noise. Best, Jeroen > On 10 Mar 2016, at 19:13, Rich Felker wrote: >=20 > On Thu, Mar 10, 2016 at 06:46:12PM +0000, Jeroen Ketema wrote: >> Hello, >>=20 >> 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): >>=20 >> cmath:309:9: error: no member named 'signbit' in the global >> namespace; did you mean '__signbit'? >> using ::signbit; >> ~~^ >>=20 >> where signbit is a macro in musl, but where libcxx expects it to be >> a function. >>=20 >> 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. >=20 > 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. >=20 > Rich