svn commit: r274072 - head/contrib/netbsd-tests/lib/libc/stdlib
Garrett Cooper
ngie at FreeBSD.org
Tue Nov 4 00:04:37 UTC 2014
Author: ngie
Date: Tue Nov 4 00:04:36 2014
New Revision: 274072
URL: https://svnweb.freebsd.org/changeset/base/274072
Log:
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
Modified:
head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Tue Nov 4 00:02:23 2014 (r274071)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Tue Nov 4 00:04:36 2014 (r274072)
@@ -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);
More information about the svn-src-head
mailing list