summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/libherdstat/files/libherdstat-0.2.0-gcc.patch')
-rw-r--r--dev-cpp/libherdstat/files/libherdstat-0.2.0-gcc.patch148
1 files changed, 148 insertions, 0 deletions
diff --git a/dev-cpp/libherdstat/files/libherdstat-0.2.0-gcc.patch b/dev-cpp/libherdstat/files/libherdstat-0.2.0-gcc.patch
new file mode 100644
index 000000000000..1b341d167b6f
--- /dev/null
+++ b/dev-cpp/libherdstat/files/libherdstat-0.2.0-gcc.patch
@@ -0,0 +1,148 @@
+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<std::string> strEOF;
++ std::vector<std::string> s2;
++ s2.assign(herdstat::io::BinaryIStreamIterator<std::string>(stream),
++ herdstat::io::BinaryIStreamIterator<std::string>());
+
+- std::vector<std::string> s2(
+- herdstat::io::BinaryIStreamIterator<std::string>(stream), strEOF);
+-
+ std::cout << "s2 = '";
+ std::copy(s2.begin(), s2.end(),
+ std::ostream_iterator<std::string>(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 <stdio.h>
++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 <cassert>
++
+ #include <herdstat/fetcher/curlfetcher.hh>
+ #include <herdstat/fetcher/wgetfetcher.hh>
+ #include <herdstat/fetcher/impmap.hh>
+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 <cassert>
++
+ #include <herdstat/portage/exceptions.hh>
+
+ 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 <cassert>
+ #include <herdstat/io/binary_stream.hh>
+
+ namespace herdstat {
+Index: herdstat/util/file.hh
+===================================================================
+--- herdstat/util/file.hh (revision 223)
++++ herdstat/util/file.hh (revision 224)
+@@ -39,6 +39,7 @@
+ #include <vector>
+ #include <cstdlib>
+ #include <cerrno>
++#include <cassert>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>