Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile

This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

MFC after:	1 week
This commit is contained in:
Enji Cooper 2017-01-12 08:40:52 +00:00
parent 35cfc322f1
commit 9527fa4f66
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311969
2 changed files with 8 additions and 4 deletions

View File

@ -51,10 +51,6 @@ 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)
{

View File

@ -11,6 +11,14 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test
ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test
.endif
# Not sure why this isn't defined for all architectures, since most
# have long double.
.if ${MACHINE_CPUARCH} == "aarch64" || \
${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "i386"
CFLAGS+= -D__HAVE_LONG_DOUBLE
.endif
# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
NETBSD_ATF_TESTS_C+= abs_test
NETBSD_ATF_TESTS_C+= atoi_test