Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2017 08:40:52 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311969 - in head: contrib/netbsd-tests/lib/libc/stdlib lib/libc/tests/stdlib
Message-ID:  <201701120840.v0C8eqOV053867@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701120840.v0C8eqOV053867>