svn commit: r311969 - in head: contrib/netbsd-tests/lib/libc/stdlib lib/libc/tests/stdlib

Ngie Cooper ngie at FreeBSD.org
Thu Jan 12 08:40:54 UTC 2017


Author: ngie
Date: Thu Jan 12 08:40:52 2017
New Revision: 311969
URL: https://svnweb.freebsd.org/changeset/base/311969

Log:
  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

Modified:
  head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
  head/lib/libc/tests/stdlib/Makefile

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c	Thu Jan 12 08:31:42 2017	(r311968)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c	Thu Jan 12 08:40:52 2017	(r311969)
@@ -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)
 {

Modified: head/lib/libc/tests/stdlib/Makefile
==============================================================================
--- head/lib/libc/tests/stdlib/Makefile	Thu Jan 12 08:31:42 2017	(r311968)
+++ head/lib/libc/tests/stdlib/Makefile	Thu Jan 12 08:40:52 2017	(r311969)
@@ -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


More information about the svn-src-head mailing list