On Mon, Oct 28, 2002 at 07:42:15AM +0100, Gerhard Tonn wrote: > Package: korelib > Version: 0.0.1-9 > Severity: important > > Hi, > the package get at least the following compile errors > > c++ -I. -I. -I.. -I../include -g -O2 -Wall -Wp,-MD,.deps/kernel.pp -c -fPIC > -DPIC kernel.cpp -o .libs/kernel.lo > In file included from kernel.cpp:4: > ../include/kore/servicemanager.h:199: `hash' was not declared in this scope > ../include/kore/servicemanager.h:199: parse error before `char' > ../include/kore/servicemanager.h:212: 'srv_hash_type' is used as a type, but > is not defined as a type.
A patch for this follows (lifted largely from the libstdc++ documentation on accessing extensions); with it, korelib builds cleanly using g++ 3.2. However, libkore0's only dependent is aethera, which is part of the qt2 dependency chain. As a result, this can't be uploaded until KDE3 is in the archive and unless a KDE3 version of aethera is available. --- korelib-0.0.1.orig/include/kore/servicemanager.h +++ korelib-0.0.1/include/kore/servicemanager.h @@ -7,9 +7,15 @@ #include <map> #else #if (__GNUC__<3) -#include <hash_map> +# include <hash_map> + namespace Sgi { using ::hash_map; }; // inherit globals #else -#include <ext/hash_map> +# include <ext/hash_map> +# if __GNUC_MINOR__ == 0 + namespace Sgi = std; // GCC 3.0 +# else + namespace Sgi = ::__gnu_cxx; // GCC 3.1 and later +# endif #endif #endif #include <set> @@ -196,7 +202,7 @@ return strcmp(s1,s2) == 0; } }; - typedef hash_multimap<const char*,const Service*, hash<const char*>, eqstr> srv_hash_type; + typedef Sgi::hash_multimap<const char*,const Service*, Sgi::hash<const char*>, eqstr> srv_hash_type; #endif struct ltptr { Cheers, -- Colin Watson [EMAIL PROTECTED]