File dejavulibre-gcc47.patch of Package djvulibre

diff -wruN djvulibre-3.5.22.orig/gui/indep/utils/execdir.cpp djvulibre-3.5.22/gui/indep/utils/execdir.cpp
--- djvulibre-3.5.22.orig/gui/indep/utils/execdir.cpp	2007-03-26 00:48:24.000000000 +0400
+++ djvulibre-3.5.22/gui/indep/utils/execdir.cpp	2012-04-26 21:01:46.006517484 +0400
@@ -144,11 +144,11 @@
     {
       GURL url = GURL(file, paths[pos]);
       GUTF8String urls = (const char*)url;
-      int pos = urls.search(osi);
-      if (pos >= 0)
+      int pos1 = urls.search(osi);
+      if (pos1 >= 0)
         {
           GUTF8String urlx;
-          urlx += urls.substr(0, pos);
+          urlx += urls.substr(0, pos1);
           urlx += djview3;
           urlx += urls.substr(pos+strlen(osi), -1);
           GURL url = GURL::UTF8(urlx);
diff -wruN djvulibre-3.5.22.orig/libdjvu/GContainer.h djvulibre-3.5.22/libdjvu/GContainer.h
--- djvulibre-3.5.22.orig/libdjvu/GContainer.h	2008-01-07 14:48:52.000000000 +0300
+++ djvulibre-3.5.22/libdjvu/GContainer.h	2012-04-26 14:03:33.642053653 +0400
@@ -65,10 +65,10 @@
 # pragma interface
 #endif
 
-
 #include "GException.h"
 #include "GSmartPointer.h"
 #include <string.h>
+#include <unistd.h>
 
 #ifdef HAVE_NAMESPACES
 namespace DJVU {
@@ -962,21 +962,21 @@
   /** Inserts an element after the last element of the list. 
       The new element is initialized with a copy of argument #elt#. */
   void append(const TYPE &elt)
-    { GListImpl<TI>::append(newnode((const TI&)elt)); }
+    { GListImpl<TI>::append(this->newnode((const TI&)elt)); }
   /** Inserts an element before the first element of the list. 
       The new element is initialized with a copy of argument #elt#. */
   void prepend(const TYPE &elt)
-    { GListImpl<TI>::prepend(newnode((const TI&)elt)); }
+    { GListImpl<TI>::prepend(this->newnode((const TI&)elt)); }
   /** Inserts a new element after the list element at position #pos#.  When
       position #pos# is null the element is inserted at the beginning of the
       list.  The new element is initialized with a copy of #elt#. */
   void insert_after(GPosition pos, const TYPE &elt)
-    { GListImpl<TI>::insert_after(pos, newnode((const TI&)elt)); }
+    { GListImpl<TI>::insert_after(pos, this->newnode((const TI&)elt)); }
   /** Inserts a new element before the list element at position #pos#. When
       position #pos# is null the element is inserted at the end of the
       list. The new element is initialized with a copy of #elt#. */
   void insert_before(GPosition pos, const TYPE &elt)
-    { GListImpl<TI>::insert_before(pos, newnode((const TI&)elt)); }
+    { GListImpl<TI>::insert_before(pos, this->newnode((const TI&)elt)); }
   /** Inserts an element of another list into this list.  This function
       removes the element at position #frompos# in list #frompos#, inserts it
       in the current list before the element at position #pos#, and advances
@@ -1197,7 +1197,7 @@
 template<class K, class TI> GCONT HNode *
 GMapImpl<K,TI>::get_or_create(const K &key)
 {
-  GCONT HNode *m = get(key);
+  GCONT HNode *m = this->get(key);
   if (m) return m;
   MNode *n = (MNode*) operator new (sizeof(MNode));
 #if GCONTAINER_ZERO_FILL
@@ -1206,7 +1206,7 @@
   new ((void*)&(n->key)) K  (key);
   new ((void*)&(n->val)) TI ();
   n->hashcode = hash((const K&)(n->key));
-  installnode(n);
+  this->installnode(n);
   return n;
 }
 
@@ -1272,13 +1272,13 @@
       contains key #key#. This variant of #operator[]# is necessary when
       dealing with a #const GMAP<KTYPE,VTYPE>#. */
   const VTYPE& operator[](const KTYPE &key) const
-    { return (const VTYPE&)(((const typename GMapImpl<KTYPE,TI>::MNode*)(get_or_throw(key)))->val); }
+    { return (const VTYPE&)(((const typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_throw(key)))->val); }
   /** Returns a reference to the value of the map entry for key #key#.  This
       reference can be used for both reading (as "#a[n]#") and modifying (as
       "#a[n]=v#"). If there is no entry for key #key#, a new entry is created
       for that key with the null constructor #VTYPE::VTYPE()#. */
   VTYPE& operator[](const KTYPE &key)
-    { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(get_or_create(key)))->val); }
+    { return (VTYPE&)(((typename GMapImpl<KTYPE,TI>::MNode*)(this->get_or_create(key)))->val); }
   /** Destroys the map entry for position #pos#.  
       Nothing is done if position #pos# is not a valid position. */
   void del(GPosition &pos)
openSUSE Build Service is sponsored by