Package: gsmlib
Severity: normal
Tags: patch

When building 'gsmlib' on amd64 with gcc-4.0,
I get the following error:

/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I..    
-Wall -D_REENTRANT -O2 -c -o gsm_phonebook.lo `test -f 'gsm_phonebook.cc' || 
echo './'`gsm_phonebook.cc
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -Wall -D_REENTRANT -O2 -c 
gsm_phonebook.cc -MT gsm_phonebook.lo -MD -MP -MF .deps/gsm_phonebook.TPlo  
-fPIC -DPIC -o .libs/gsm_phonebook.lo
In file included from 
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/backward/strstream:51,
                 from gsm_phonebook.cc:21:
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/backward/backward_warning.h:32:2:
 warning: #warning This file includes at least one deprecated or antiquated 
header. Please consider using one of the 32 headers found in section 17.4.1.2 
of the C++ standard. Examples include substituting the <X> header for the <X.h> 
header for C++ includes, or <iostream> instead of the deprecated header 
<iostream.h>. To disable this warning use -Wno-deprecated.
../gsmlib/gsm_map_key.h:76: error: explicit qualification in declaration of 
`bool gsmlib::operator<(const gsmlib::MapKey<SortedStore>&, const 
gsmlib::MapKey<SortedStore>&)'
../gsmlib/gsm_map_key.h:101: error: explicit qualification in declaration of 
`bool gsmlib::operator==(const gsmlib::MapKey<SortedStore>&, const 
gsmlib::MapKey<SortedStore>&)'
../gsmlib/gsm_map_key.h: In instantiation of 
'gsmlib::MapKey<gsmlib::SortedPhonebookBase>':
/usr/lib/gcc/x86_64-linux/4.0.0/../../../../include/c++/4.0.0/bits/stl_pair.h:73:
   instantiated from 'std::pair<const gsmlib::PhoneMapKey, 
gsmlib::PhonebookEntryBase*>'
../gsmlib/gsm_sorted_phonebook_base.h:112:   instantiated from here
../gsmlib/gsm_map_key.h:54: error: template-id 'operator< <>' for 'bool 
gsmlib::operator<(const gsmlib::MapKey<gsmlib::SortedPhonebookBase>&, const 
gsmlib::MapKey<gsmlib::SortedPhonebookBase>&)' does not match any template 
declaration
../gsmlib/gsm_map_key.h:61: error: template-id 'operator==<>' for 'bool 
gsmlib::operator==(const gsmlib::MapKey<gsmlib::SortedPhonebookBase>&, const 
gsmlib::MapKey<gsmlib::SortedPhonebookBase>&)' does not match any template 
declaration
make[3]: *** [gsm_phonebook.lo] Error 1
make[3]: Leaving directory `/gsmlib-1.10/gsmlib'

With the attached patch 'gsmlib' can be compiled
on amd64 using gcc-4.0. The patch includes a patch which was already
necessary for gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gsmlib-1.10/gsmlib/gsm_map_key.h ./gsmlib/gsm_map_key.h
--- ../tmp-orig/gsmlib-1.10/gsmlib/gsm_map_key.h        2002-05-14 
21:38:12.000000000 +0200
+++ ./gsmlib/gsm_map_key.h      2005-02-08 19:46:30.197053831 +0100
@@ -27,6 +27,7 @@
 
   template <class SortedStore> class MapKey
   {
+  public:
     SortedStore &_myStore;   // my store
     // different type keys
     Address _addressKey;
@@ -45,6 +46,7 @@
     MapKey(SortedStore &myStore, string key) :
       _myStore(myStore), _strKey(key) {}
 
+/*
     friend
     bool operator< 
 #ifndef WIN32
@@ -59,6 +61,7 @@
 #endif
                          (const MapKey<SortedStore> &x,
                        const MapKey<SortedStore> &y);
+*/
   };
 
   // compare two keys
@@ -72,7 +75,7 @@
   // MapKey members
   
   template <class SortedStore>
-    bool gsmlib::operator<(const MapKey<SortedStore> &x,
+    bool operator<(const MapKey<SortedStore> &x,
                            const MapKey<SortedStore> &y)
     {
       assert(&x._myStore == &y._myStore);
@@ -97,7 +100,7 @@
     }
 
   template <class SortedStore>
-    bool gsmlib::operator==(const MapKey<SortedStore> &x,
+    bool operator==(const MapKey<SortedStore> &x,
                             const MapKey<SortedStore> &y)
     {
       assert(&x._myStore == &y._myStore);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to