From: Morgan Deters Date: Sat, 18 Jun 2011 02:44:41 +0000 (+0000) Subject: Some fixes inspired by Fedora 15: X-Git-Tag: cvc5-1.0.0~8531 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5d73d514946ea4a7f5691f46c4d6b9c2776f59d;p=cvc5.git Some fixes inspired by Fedora 15: * compilation fixes for GCC 4.6.x + ptrdiff_t is now in std:: * fix some make rules that are ok in Make 3.81 but broke in Make 3.82 * look for cxxtestgen.py as well as cxxtestgen.pl, and look for cxxtest headers in /usr/include --- diff --git a/Makefile b/Makefile index d79e03f46..8737dae1f 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,8 @@ # builddir = builds -.PHONY: _default_build_ all -_default_build_: all -all %: +.PHONY: all +all .DEFAULT: @if test -d $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ diff --git a/Makefile.subdir b/Makefile.subdir index 7b7c90561..4bafe4684 100644 --- a/Makefile.subdir +++ b/Makefile.subdir @@ -10,9 +10,8 @@ builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir) unittestdir = $(topdir)/builds/$(CURRENT_BUILD)/test/unit unittestprefix = $(srcdir:src/%=%) -.PHONY: _default_build_ all -_default_build_: all -all %: +.PHONY: all +all .DEFAULT: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ @@ -27,8 +26,8 @@ all %: .PHONY: check units ifeq ($(srcdir:test/%=test),test) # under the test/ directory, additional subtargets -.PHONY: regress regress0 regress1 regress2 regress3 -check units regress regress0 regress1 regress2 regress3: +.PHONY: systemtests regress regress0 regress1 regress2 regress3 +check units systemtests regress regress0 regress1 regress2 regress3: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ diff --git a/configure.ac b/configure.ac index ff150844f..f6f2f5a04 100644 --- a/configure.ac +++ b/configure.ac @@ -629,17 +629,24 @@ fi CXXTESTGEN= AC_PATH_PROG(CXXTESTGEN, cxxtestgen.pl, [], [$CXXTEST:$PATH]) if test -z "$CXXTESTGEN"; then - AC_MSG_NOTICE([unit tests disabled, cxxtestgen.pl not found.]) + AC_PATH_PROG(CXXTESTGEN, cxxtestgen.py, [], [$CXXTEST:$PATH]) +fi +if test -z "$CXXTESTGEN"; then + AC_MSG_NOTICE([unit tests disabled, neither cxxtestgen.pl nor cxxtestgen.py found.]) elif test -z "$CXXTEST"; then CXXTEST=`dirname "$CXXTESTGEN"` AC_MSG_CHECKING([for location of CxxTest headers]) if test -e "$CXXTEST/cxxtest/TestRunner.h"; then AC_MSG_RESULT([$CXXTEST]) else - AC_MSG_RESULT([not found]) - AC_MSG_WARN([unit tests disabled, CxxTest headers not found.]) - CXXTESTGEN= - CXXTEST= + if test -e "/usr/include/cxxtest/TestRunner.h"; then + AC_MSG_RESULT([/usr/include]) + else + AC_MSG_RESULT([not found]) + AC_MSG_WARN([unit tests disabled, CxxTest headers not found.]) + CXXTESTGEN= + CXXTEST= + fi fi fi diff --git a/src/context/cdlist.h b/src/context/cdlist.h index 7edef4121..c999ecadb 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -320,7 +320,7 @@ public: // requirements of a bidirectional iterator ? typedef std::input_iterator_tag iterator_category; typedef T value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef const T* pointer; typedef const T& reference; diff --git a/src/context/cdlist_context_memory.h b/src/context/cdlist_context_memory.h index 2fd1ceb8c..45a44756d 100644 --- a/src/context/cdlist_context_memory.h +++ b/src/context/cdlist_context_memory.h @@ -437,7 +437,7 @@ public: typedef std::input_iterator_tag iterator_category; typedef T value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef const T* pointer; typedef const T& reference; diff --git a/src/context/context_mm.h b/src/context/context_mm.h index 71f7041c7..56ef7ab59 100644 --- a/src/context/context_mm.h +++ b/src/context/context_mm.h @@ -150,7 +150,7 @@ class ContextMemoryAllocator { public: typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef T const* const_pointer; typedef T& reference; diff --git a/src/expr/node.h b/src/expr/node.h index 372eec8c0..999719592 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -612,7 +612,7 @@ public: public: typedef NodeTemplate value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef NodeTemplate* pointer; typedef NodeTemplate& reference; diff --git a/src/expr/node_value.h b/src/expr/node_value.h index 1722bae30..f2da42731 100644 --- a/src/expr/node_value.h +++ b/src/expr/node_value.h @@ -152,7 +152,7 @@ private: public: typedef std::random_access_iterator_tag iterator_category; typedef T value_type; - typedef ptrdiff_t difference_type; + typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef T& reference;