fixes to compile with latest gcc
authorMichael Andres <ma@suse.de>
Tue, 3 Apr 2007 20:35:13 +0000 (20:35 +0000)
committerMichael Andres <ma@suse.de>
Tue, 3 Apr 2007 20:35:13 +0000 (20:35 +0000)
16 files changed:
zypp/Fetcher.cc
zypp/Fetcher.h
zypp/Pathname.cc
zypp/PublicKey.cc
zypp/Rel.cc
zypp/base/Fd.cc
zypp/parser/SAXParser.cc
zypp/solver/detail/Pending.cc
zypp/solver/detail/Pending.h
zypp/source/SUSEMediaVerifier.cc
zypp/source/SUSEMediaVerifier.h
zypp/source/susetags/SUSETagsDownloader.cc
zypp/source/susetags/SUSETagsDownloader.h
zypp/zypp_detail/ZYppImpl.cc
zypp2/cache/CachedResolvableDataProvider.h
zypp2/cache/Utils.h

index d04179c..970b785 100644 (file)
@@ -43,7 +43,7 @@ void Fetcher::insertCache( const Pathname &cache_dir )
 void Fetcher::start( const Pathname &dest_dir )
 {
   MediaSetAccess media(_url, _path);
-  
+
   for ( list<OnMediaLocation>::const_iterator it_res = _resources.begin(); it_res != _resources.end(); ++it_res )
   {
     bool got_from_cache = false;
@@ -64,7 +64,7 @@ void Fetcher::start( const Pathname &dest_dir )
             MIL << "file " << (*it_res).filename() << " found in previous cache. Using cached copy." << endl;
             // checksum is already checked.
             // we could later implement double failover and try to download if file copy fails.
-          
+
             // replicate the complete path in the target directory
             Pathname dest_full_path = dest_dir + (*it_res).filename();
             if ( assert_dir( dest_full_path.dirname() ) != 0 )
@@ -77,7 +77,7 @@ void Fetcher::start( const Pathname &dest_dir )
               // try next cache
               continue;
             }
-            
+
             got_from_cache = true;
             break;
           }
@@ -86,7 +86,7 @@ void Fetcher::start( const Pathname &dest_dir )
         {
           // File exists in cache but with a different checksum
           // so just try next cache
-          continue; 
+          continue;
         }
       }
       else
@@ -96,7 +96,7 @@ void Fetcher::start( const Pathname &dest_dir )
         continue;
       }
     }
-    
+
     if ( ! got_from_cache )
     {
       // try to get the file from the net
@@ -145,4 +145,4 @@ void Fetcher::start( const Pathname &dest_dir )
 //           ZYPP_THROW(SourceMetadataException( file_url.asString() + " " + N_(" fails checksum verification.") ));
 //       }
 
-} // namespace zypp
\ No newline at end of file
+} // namespace zypp
index 4b43008..f26e046 100644 (file)
@@ -17,8 +17,8 @@
 
 namespace zypp
 {
-  
-  /** 
+
+  /**
   * Edition represents <code>[epoch:]version[-release]</code>
   *
   * This class allows to retrieve a group of files which can
@@ -39,7 +39,7 @@ namespace zypp
     * Constructs a fetcher from a url and path
     */
     Fetcher( const Url &url, const Pathname &path );
-    
+
     /**
     * Enqueue a object for transferal, they will not
     * be transfered until \ref start() is called
@@ -60,7 +60,7 @@ namespace zypp
     * directory
     */
     void start( const Pathname &dest_dir );
-  
+
   private:
     Url _url;
     Pathname _path;
@@ -69,4 +69,4 @@ namespace zypp
   };
 
 } // ns zypp
-#endif
\ No newline at end of file
+#endif
index ab7b639..abb121c 100644 (file)
@@ -9,6 +9,8 @@
 /** \file      zypp/Pathname.cc
  *
 */
+#include <iostream>
+
 #include "zypp/Pathname.h"
 
 using std::string;
index 04f8c53..144608e 100644 (file)
@@ -202,4 +202,4 @@ namespace zypp
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
-///////////////////////////////////////////////////////////////////
\ No newline at end of file
+///////////////////////////////////////////////////////////////////
index d921ebf..7c9983f 100644 (file)
@@ -9,6 +9,7 @@
 /** \file zypp/Rel.cc
  *
 */
+#include <iostream>
 #include <map>
 
 #include "zypp/base/Exception.h"
index 2acc714..e3e396c 100644 (file)
@@ -16,6 +16,8 @@ extern "C"
 #include <fcntl.h>
 }
 
+#include <iostream>
+
 #include "zypp/base/Exception.h"
 #include "zypp/base/Fd.h"
 
index bba14cc..4fa4730 100644 (file)
@@ -197,4 +197,4 @@ SAXParser::~SAXParser()
 }
 
 } // ns parser
-} // ns zypp
\ No newline at end of file
+} // ns zypp
index 8178eda..2db22d0 100644 (file)
  * 02111-1307, USA.
  */
 
+#include <iostream>
+
 #include "zypp/solver/detail/Pending.h"
 
 /////////////////////////////////////////////////////////////////////////
-namespace zypp 
+namespace zypp
 { ///////////////////////////////////////////////////////////////////////
   ///////////////////////////////////////////////////////////////////////
   namespace solver
@@ -33,54 +35,54 @@ namespace zypp
     /////////////////////////////////////////////////////////////////////
     namespace detail
     { ///////////////////////////////////////////////////////////////////
-      
+
       using namespace std;
-      
+
       IMPL_PTR_TYPE(Pending);
-      
+
       //---------------------------------------------------------------------------
-      
+
       string
       Pending::asString ( void ) const
       {
           return toString (*this);
       }
-      
-      
+
+
       string
       Pending::toString ( const Pending & pending )
       {
           return "<pending/>";
       }
-      
-      
+
+
       ostream &
       Pending::dumpOn (ostream & str) const
       {
           str << asString();
           return str;
       }
-      
-      
+
+
       ostream &
       operator<< (ostream & os, const Pending & pending)
       {
           return os << pending.asString();
       }
-      
+
       //---------------------------------------------------------------------------
-      
+
       Pending::Pending (const char *description)
       {
       }
-      
-      
+
+
       Pending::~Pending()
       {
       }
-      
+
       //---------------------------------------------------------------------------
-      
+
       ///////////////////////////////////////////////////////////////////
     };// namespace detail
     /////////////////////////////////////////////////////////////////////
index 290ec4f..e9e487e 100644 (file)
@@ -50,7 +50,7 @@ namespace zypp
       //       CLASS NAME : Pending
 
       class Pending : public base::ReferenceCounted, private base::NonCopyable {
-          
+
 
       typedef enum {
           PENDING_STATUS_INVALID = 0,
index 3a3bbee..45e1250 100644 (file)
@@ -35,3 +35,4 @@ bool SUSEMediaVerifier::isDesiredMedia(const media::MediaAccessRef &ref)
 
 }
 }
+
index 4bc1ed0..92d5183 100644 (file)
@@ -28,4 +28,4 @@ namespace zypp
 
   }
 }
-#endif
\ No newline at end of file
+#endif
index 81838c5..d2b543e 100644 (file)
@@ -66,4 +66,4 @@ void SUSETagsDownloader::download( const Pathname &dest_dir )
 
 }// ns susetags
 }// ns source 
-} // ns zypp
\ No newline at end of file
+} // ns zypp
index d070084..1d3ad5a 100644 (file)
@@ -34,4 +34,4 @@ namespace zypp
   } // ns source
 } // ns zypp
 
-#endif
\ No newline at end of file
+#endif
index 92e670b..d380d02 100644 (file)
@@ -39,10 +39,10 @@ namespace zypp
     inline Locale defaultTextLocale()
     {
       Locale ret( "en" );
-      char * envlist[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
-      for ( char ** envvar = envlist; *envvar; ++envvar )
+      const char * envlist[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
+      for ( const char ** envvar = envlist; *envvar; ++envvar )
         {
-          char * envlang = getenv( *envvar );
+         const char * envlang = getenv( *envvar );
           if ( envlang )
             {
               std::string envstr( envlang );
index 7782c9b..135c8d7 100644 (file)
@@ -64,4 +64,4 @@ namespace zypp
   }
 }
 
-#endif
\ No newline at end of file
+#endif
index 333e3df..50bfffe 100644 (file)
@@ -30,4 +30,4 @@ namespace cache
 }
 }
 
-#endif
\ No newline at end of file
+#endif