lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 8c89218 1/2: Remove LMI_COMPILER_PROVIDES* ma


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 8c89218 1/2: Remove LMI_COMPILER_PROVIDES* macros
Date: Thu, 27 Apr 2017 16:21:33 -0400 (EDT)

branch: master
commit 8c89218961ed3faf826eeabec49ad4fe953c92f9
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove LMI_COMPILER_PROVIDES* macros
    
    Code written in standard C++ should require no feature tests.
---
 config_ming323.hpp | 11 -----------
 configure.ac       |  6 ------
 fenv_lmi_test.cpp  |  8 --------
 3 files changed, 25 deletions(-)

diff --git a/config_ming323.hpp b/config_ming323.hpp
index 6eabd8b..a39972e 100644
--- a/config_ming323.hpp
+++ b/config_ming323.hpp
@@ -34,16 +34,5 @@
 #   error Use this file only for MinGW gcc version 3.2.3 or higher.
 #endif // Not MinGW gcc-3.2.3+ .
 
-// Assume C++98 conformance by default. Define macros to indicate
-// departures from C++98, whether positive (such as providing C99
-// functions) or negative.
-
-// Version numbers are in 'include/_mingw.h' here:
-//   http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/?cvsroot=src
-
-#if 200 <= LMI_MINGW_VERSION
-#   define LMI_COMPILER_PROVIDES_RINT
-#endif // 200 <= LMI_MINGW_VERSION
-
 #endif // config_ming323_hpp
 
diff --git a/configure.ac b/configure.ac
index 7be29bb..1d12dfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,12 +261,6 @@ fi
 AM_CONDITIONAL(HAVE_SNPRINTF, [test "x$lmi_cv_func_snprintf" == "xyes"])
 AM_CONDITIONAL(LMI_WITH_CGI, [test "x$lmi_cgicc_option" == "xyes"])
 
-dnl existing code already uses these macros so continue to use them instead of
-dnl the usual HAVE_EXPM1/HAVE_LOG1P
-AC_CHECK_FUNC(strtof, AC_DEFINE(LMI_COMPILER_PROVIDES_STRTOF, [1], [Define 
this if you have strtof() function]))
-AC_CHECK_FUNC(strtold, AC_DEFINE(LMI_COMPILER_PROVIDES_STRTOLD, [1], [Define 
this if you have strtold() function]))
-AC_CHECK_FUNC(rint, AC_DEFINE(LMI_COMPILER_PROVIDES_RINT, [1], [Define this if 
you have rint() function]))
-
 dnl === Library checks ===
 
 dnl --- curses.h
diff --git a/fenv_lmi_test.cpp b/fenv_lmi_test.cpp
index 4672b78..1441aa2 100644
--- a/fenv_lmi_test.cpp
+++ b/fenv_lmi_test.cpp
@@ -187,39 +187,31 @@ int test_main(int, char*[])
 
     fenv_rounding   (fe_tonearest);
     BOOST_TEST_EQUAL(fe_tonearest , fenv_rounding());
-#if defined LMI_COMPILER_PROVIDES_RINT
     BOOST_TEST_EQUAL(-2, rint(-2.5));
     BOOST_TEST_EQUAL(-2, rint(-1.5));
     BOOST_TEST_EQUAL( 2, rint( 1.5));
     BOOST_TEST_EQUAL( 2, rint( 2.5));
-#endif // defined LMI_COMPILER_PROVIDES_RINT
 
     fenv_rounding   (fe_downward);
     BOOST_TEST_EQUAL(fe_downward  , fenv_rounding());
-#if defined LMI_COMPILER_PROVIDES_RINT
     BOOST_TEST_EQUAL(-3, rint(-2.5));
     BOOST_TEST_EQUAL(-2, rint(-1.5));
     BOOST_TEST_EQUAL( 1, rint( 1.5));
     BOOST_TEST_EQUAL( 2, rint( 2.5));
-#endif // defined LMI_COMPILER_PROVIDES_RINT
 
     fenv_rounding   (fe_upward);
     BOOST_TEST_EQUAL(fe_upward    , fenv_rounding());
-#if defined LMI_COMPILER_PROVIDES_RINT
     BOOST_TEST_EQUAL(-2, rint(-2.5));
     BOOST_TEST_EQUAL(-1, rint(-1.5));
     BOOST_TEST_EQUAL( 2, rint( 1.5));
     BOOST_TEST_EQUAL( 3, rint( 2.5));
-#endif // defined LMI_COMPILER_PROVIDES_RINT
 
     fenv_rounding   (fe_towardzero);
     BOOST_TEST_EQUAL(fe_towardzero, fenv_rounding());
-#if defined LMI_COMPILER_PROVIDES_RINT
     BOOST_TEST_EQUAL(-2, rint(-2.5));
     BOOST_TEST_EQUAL(-1, rint(-1.5));
     BOOST_TEST_EQUAL( 1, rint( 1.5));
     BOOST_TEST_EQUAL( 2, rint( 2.5));
-#endif // defined LMI_COMPILER_PROVIDES_RINT
 
     fenv_initialize();
     BOOST_TEST(fenv_validate());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]