]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/fileutl.cc
abstract version hash comparison a bit
[apt.git] / apt-pkg / contrib / fileutl.cc
index 17833f090c0eebe14f40870b23afaa68942f4891..55ba41128c4cceffa5271a977965692eafd5efa1 100644 (file)
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/configuration.h>
-
+#include <apt-pkg/macros.h>
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <sys/select.h>
+#include <time.h>
+#include <string>
+#include <vector>
 #include <cstdlib>
 #include <cstring>
 #include <cstdio>
-
 #include <iostream>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <dirent.h>
@@ -891,7 +897,7 @@ bool FileFd::Open(string FileName,unsigned int const Mode,CompressMode Compress,
    {
       for (; compressor != compressors.end(); ++compressor)
       {
-        std::string file = std::string(FileName).append(compressor->Extension);
+        std::string file = FileName + compressor->Extension;
         if (FileExists(file) == false)
            continue;
         FileName = file;
@@ -1793,7 +1799,7 @@ bool FileFd::FileFdError(const char *Description,...) {
 }
                                                                        /*}}}*/
 
-gzFile FileFd::gzFd() { return (gzFile) d->gz; }
+gzFile FileFd::gzFd() { return d->gz; }
 
 
 // Glob - wrapper around "glob()"                                      /*{{{*/