Some fixes inspired by Fedora 15:
authorMorgan Deters <mdeters@gmail.com>
Sat, 18 Jun 2011 02:44:41 +0000 (02:44 +0000)
committerMorgan Deters <mdeters@gmail.com>
Sat, 18 Jun 2011 02:44:41 +0000 (02:44 +0000)
* 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

Makefile
Makefile.subdir
configure.ac
src/context/cdlist.h
src/context/cdlist_context_memory.h
src/context/context_mm.h
src/expr/node.h
src/expr/node_value.h

index d79e03f4674abaab4f406933098d7cf920639e6d..8737dae1f102f4a603f4f3bd15fd97377d506433 100644 (file)
--- 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); \
index 7b7c90561fa4569345ecd465ec27dbcc5918b3a9..4bafe4684a0cf3a443fc2b71b73c7b6c0820a63f 100644 (file)
@@ -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); \
index ff150844ff591271494dcc7c2699c56a0e4e8195..f6f2f5a04a1e54bc61e79df8b404861d2bf9870d 100644 (file)
@@ -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
 
index 7edef4121e3fe98a58e2b5cabcd2f811e8ed3c2f..c999ecadb273aa0e4ec23d42ef0dc8d9992b918c 100644 (file)
@@ -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;
 
index 2fd1ceb8c124ba8f8b1440b52ae84926c914391d..45a44756d29d2bbdb08778656168c8107c2a3087 100644 (file)
@@ -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;
 
index 71f7041c787673de2ec72895dd13196543fc26fa..56ef7ab590987b01a794d625fb14eb445419f8e6 100644 (file)
@@ -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;
index 372eec8c0d6275e19c40089da8f4fc313a63adb7..9997195920bc4596e2526c34d17c4ef902c677b7 100644 (file)
@@ -612,7 +612,7 @@ public:
 
   public:
     typedef NodeTemplate<ref_count> value_type;
-    typedef ptrdiff_t difference_type;
+    typedef std::ptrdiff_t difference_type;
     typedef NodeTemplate<ref_count>* pointer;
     typedef NodeTemplate<ref_count>& reference;
 
index 1722bae3091e577f935a3dbc1d72a27d59ad0a7e..f2da42731ea137e68ccda7246d09a5c68d257c21 100644 (file)
@@ -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;