From d9735e9e3e09c94b05e5b81e86cce6c7f7cf72af Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 2 Feb 2006 23:53:07 +0000 Subject: [PATCH] * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that '#include ' works and that you can apply ++ to iterators. --- ChangeLog | 7 +++++++ m4/cxx.m4 | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f47e6844..ebbbba62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-02-02 Paul Eggert + + More portability fixes for problems summarized by Nelson H. F. Beebe. + + * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that + '#include ' works and that you can apply ++ to iterators. + 2006-02-01 Paul Eggert Work around portability problems summarized by Nelson H. F. Beebe in diff --git a/m4/cxx.m4 b/m4/cxx.m4 index a8eff8ee..a63593f2 100644 --- a/m4/cxx.m4 +++ b/m4/cxx.m4 @@ -29,10 +29,18 @@ AC_DEFUN([BISON_TEST_FOR_WORKING_CXX_COMPILER], [AC_LANG_PROGRAM( [#include #include + #include #include using namespace std;], [std::cerr << ""; - cout << "";])], + cout << ""; + typedef std::pair uipair; + std::map m; + std::map::iterator i; + m.insert (uipair (4, -4)); + for (i = m.begin (); i != m.end (); ++i) + if (i->first != 4) + return 1;])], [bison_cv_cxx_works=yes], [bison_cv_cxx_works=no], [bison_cv_cxx_works=cross]) -- 2.47.2