Message ID | 20110222101821.GA5474@physik.fu-berlin.de |
---|---|
State | New |
Headers | show |
On Tue, Feb 22, 2011 at 12:18, Tobias Burnus <tobias.burnus@physik.fu-berlin.de> wrote: > Seemingly, no one tried to compile libgfortran on > a system which didn't support roundl but had > nextafterl. That has changed: NetBSD is such a > system and, thus, compiling failed (cf. PR). > > Solution: Remove the "static" and add a "t" to > "nex(t)afterl". > > OK for the trunk? Ok. > How far back to we want to go? > I was thinking of patching 4.4 and 4.5. This patch is so trivial and obvious, that I don't see any risk in backporting. So I leave it up to you to decide how far back you have energy to go. :)
2011-02-22 Tobias Burnus <burnus@net-b.de> Kai-Uwe Eckhardt <kuehro@gmx.de> PR libfortran/47830 * intrinsics/c99_functions.c (roundl): Make C valid for HAVE_NEXTAFTERL. diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c index 8a9c2f1..9ba5544 100644 --- a/libgfortran/intrinsics/c99_functions.c +++ b/libgfortran/intrinsics/c99_functions.c @@ -600,7 +600,7 @@ roundl (long double x) if (x > DBL_MAX || x < -DBL_MAX) { #ifdef HAVE_NEXTAFTERL - static long double prechalf = nexafterl (0.5L, LDBL_MAX); + long double prechalf = nextafterl (0.5L, LDBL_MAX); #else static long double prechalf = 0.5L; #endif