This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] PR79017 workaround incomplete C99 math on darwin
- From: Mike Stump <mikestump at comcast dot net>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Jan 2017 10:43:26 -0800
- Subject: Re: [PATCH] PR79017 workaround incomplete C99 math on darwin
- Authentication-results: sourceware.org; auth=none
- References: <20170109171603.GJ13348@redhat.com>
On Jan 9, 2017, at 9:16 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> Older versions of OS X (at least Leopard) are missing some
> declarations of C99 functions from <math.h>, which causes our
> configure test to decide that all C99 functions are missing from
> <math.h>. Rather then splitting up the check into dozens of smaller
> checks for individual functions (which would be stage 1 material) this
> just adds a special case for the six missing functions, so that darwin
> checks for them separately and defaines a new macro to say they're
> missing.
>
> PR libstdc++/79017
> * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
> functions separately on darwin and if they're missing define
> _GLIBCXX_NO_C99_ROUNDING_FUNCS.
> * config.h.in: Regenerate.
> * configure: Regenerate.
> * include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
> (llrintf, llrintl, llround, llroundf, llroundl): Do not define.
Another possibility might be possible if llrint is the same as lrint and lrint is present... then liberty can define forwarders on a per function basis if they aren't there.
I think this is the case when sizeof (long long) == sizeof(long).