Skip to content

Commit

Permalink
Some fixes inspired by Fedora 15:
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mdeters committed Jun 18, 2011
1 parent 0555d96 commit d5d73d5
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down
9 changes: 4 additions & 5 deletions Makefile.subdir
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand All @@ -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); \
Expand Down
17 changes: 12 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/context/cdlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class CDList : public ContextObj {
// 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;

Expand Down
2 changes: 1 addition & 1 deletion src/context/cdlist_context_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ class CDList<T, ContextMemoryAllocator<T> > : public ContextObj {

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;

Expand Down
2 changes: 1 addition & 1 deletion src/context/context_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/expr/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class NodeTemplate {

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;

Expand Down
2 changes: 1 addition & 1 deletion src/expr/node_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class NodeValue {
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;

Expand Down

0 comments on commit d5d73d5

Please sign in to comment.