Index: tests/src/binaryio-test.hh =================================================================== --- tests/src/binaryio-test.hh (revision 223) +++ tests/src/binaryio-test.hh (revision 224) @@ -115,11 +115,10 @@ if (not stream) throw herdstat::FileException("bar"); - herdstat::io::BinaryIStreamIterator strEOF; + std::vector s2; + s2.assign(herdstat::io::BinaryIStreamIterator(stream), + herdstat::io::BinaryIStreamIterator()); - std::vector s2( - herdstat::io::BinaryIStreamIterator(stream), strEOF); - std::cout << "s2 = '"; std::copy(s2.begin(), s2.end(), std::ostream_iterator(std::cout, " ")); Index: configure.ac =================================================================== --- configure.ac (revision 223) +++ configure.ac (revision 224) @@ -10,8 +10,8 @@ VERSION_MAJOR=0 VERSION_MINOR=2 VERSION_MICRO=0 -VERSION_SUFFIX= -VERSION_SUFFIX_VERSION= +VERSION_SUFFIX=p +VERSION_SUFFIX_VERSION=1 VERSION_FULL="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_MICRO" if ! test -z "$VERSION_SUFFIX" ; then @@ -104,6 +104,41 @@ AC_DEFINE_UNQUOTED(HAVE_GCC4, 1, [GCC Version 4]) fi +AC_MSG_CHECKING([if ${CXX} supports __attribute__ ((unused))]) +AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ +#include +void foo(int x __attribute__ ((unused))) +{ printf("foo\n"); } +],[ + int i = 10; + foo(i); + return 0; + ]), + [HAS_ATTR_UNUSED="yes"],[HAS_ATTR_UNUSED="no"]) +AC_MSG_RESULT([$HAS_ATTR_UNUSED]) + +if test "x$HAS_ATTR_UNUSED" = "xyes" ; then + AC_DEFINE(HAVE_ATTR_UNUSED, 1, [C compiler supports the unused attribute]) +fi + +AC_MSG_CHECKING([if ${CXX} supports __attribute__ ((deprecated))]) +AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ +class __attribute__ ((deprecated)) Foo +{ + public: + Foo() __attribute__ ((deprecated)) { } +}; +],[ + Foo foo; + return 0; + ]), + [HAS_ATTR_DEPRECAED="yes"],[HAS_ATTR_DEPRECAED="no"]) +AC_MSG_RESULT([$HAS_ATTR_DEPRECAED]) + +if test "x$HAS_ATTR_DEPRECAED" = "xyes" ; then + AC_DEFINE(HAVE_ATTR_DEPRECATED, 1, [C compiler supports the deprecated attribute]) +fi + LHS_CHECK_CXXFLAG([-pedantic]) LHS_CHECK_CXXFLAG([-ansi]) LHS_CHECK_CXXFLAG([-W]) Index: herdstat/defs.hh =================================================================== --- herdstat/defs.hh (revision 223) +++ herdstat/defs.hh (revision 224) @@ -35,7 +35,7 @@ #define NELEMS(x) (sizeof(x) / sizeof(x[0])) #ifndef LIBHERDSTAT_DEPRECATED -# if defined(__GNUC__) || defined(DOXYGEN) +# if defined(HAVE_ATTR_DEPRECATED) || defined(DOXYGEN) # define LIBHERDSTAT_DEPRECATED __attribute__ ((deprecated)) # else # define LIBHERDSTAT_DEPRECATED @@ -43,7 +43,7 @@ #endif #ifndef LIBHERDSTAT_UNUSED -# if defined(__GNUC__) || defined(DOXYGEN) +# if defined(HAVE_ATTR_UNUSED) || defined(DOXYGEN) # define LIBHERDSTAT_UNUSED __attribute__ ((unused)) # else # define LIBHERDSTAT_UNUSED Index: herdstat/fetcher/impmap.cc =================================================================== --- herdstat/fetcher/impmap.cc (revision 223) +++ herdstat/fetcher/impmap.cc (revision 224) @@ -24,6 +24,8 @@ # include "config.h" #endif +#include + #include #include #include Index: herdstat/portage/exceptions.cc =================================================================== --- herdstat/portage/exceptions.cc (revision 223) +++ herdstat/portage/exceptions.cc (revision 224) @@ -24,6 +24,8 @@ # include "config.h" #endif +#include + #include namespace herdstat { Index: herdstat/io/binary_stream.cc =================================================================== --- herdstat/io/binary_stream.cc (revision 223) +++ herdstat/io/binary_stream.cc (revision 224) @@ -24,6 +24,7 @@ # include "config.h" #endif +#include #include namespace herdstat { Index: herdstat/util/file.hh =================================================================== --- herdstat/util/file.hh (revision 223) +++ herdstat/util/file.hh (revision 224) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include