diff options
author | ngie <ngie@FreeBSD.org> | 2014-11-04 00:04:36 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-11-04 00:04:36 +0000 |
commit | b61f12ca9c75bdded280943511d71335ec49eec0 (patch) | |
tree | 14a1206f62b5be6080332be5646b853e42647f64 /contrib/netbsd-tests/lib/libc/stdlib | |
parent | 52436265329660279f7c8a2609ec9ffe8b65163b (diff) | |
download | FreeBSD-src-b61f12ca9c75bdded280943511d71335ec49eec0.zip FreeBSD-src-b61f12ca9c75bdded280943511d71335ec49eec0.tar.gz |
Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
FreeBSD, and always assume long long double exists on FreeBSD
Submitted by: pho
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdlib')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c index d11e6f0..a449abc 100644 --- a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c +++ b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c @@ -54,6 +54,10 @@ static const char * const inf_strings[] = const char *nan_string = "NaN(x)y"; #endif +#ifdef __FreeBSD__ +#define __HAVE_LONG_DOUBLE +#endif + ATF_TC(strtod_basic); ATF_TC_HEAD(strtod_basic, tc) { @@ -221,7 +225,9 @@ ATF_TC_BODY(strtold_nan, tc) volatile long double ld = strtold(nan_string, &end); ATF_REQUIRE(isnan(ld) != 0); -#if !defined(__FreeBSD__) +#ifdef __FreeBSD__ + ATF_REQUIRE(strcmp(end, "y") == 0); +#else ATF_REQUIRE(__isnanl(ld) != 0); #endif ATF_REQUIRE(strcmp(end, "y") == 0); |