From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9555 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Using libcxx with musl's math.h Date: Thu, 10 Mar 2016 14:13:20 -0500 Message-ID: <20160310191320.GP9349@brightrain.aerifal.cx> References: <56E1C0F4.8010106@codeplay.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457637230 26155 80.91.229.3 (10 Mar 2016 19:13:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2016 19:13:50 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9568-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 10 20:13:40 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 1ae61f-0002Dx-Kb for gllmg-musl@m.gmane.org; Thu, 10 Mar 2016 20:13:35 +0100 Original-Received: (qmail 3643 invoked by uid 550); 10 Mar 2016 19:13:33 -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 3625 invoked from network); 10 Mar 2016 19:13:32 -0000 Content-Disposition: inline In-Reply-To: <56E1C0F4.8010106@codeplay.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9555 Archived-At: 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