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
This commit is contained in:
parent
a7bdf21cf7
commit
4c8085db66
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274072
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user