reorder includes: add <config.h> if needed and include it at first
[ntk/apt.git] / apt-pkg / vendorlist.cc
index 5899970..8432091 100644 (file)
@@ -1,8 +1,15 @@
-#include <apt-pkg/vendorlist.h>
+#include<config.h>
+
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apti18n.h>
 
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <apt-pkg/vendorlist.h>
+
 pkgVendorList::~pkgVendorList()
 {
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 
@@ -21,11 +28,11 @@ bool pkgVendorList::ReadMainList()
    Configuration Cnf;
 
    string CnfFile = _config->FindDir("Dir::Etc::vendorparts");
-   if (FileExists(CnfFile) == true)
+   if (DirectoryExists(CnfFile) == true)
       if (ReadConfigDir(Cnf,CnfFile,true) == false)
         return false;
    CnfFile = _config->FindFile("Dir::Etc::vendorlist");
-   if (FileExists(CnfFile) == true)
+   if (RealFileExists(CnfFile) == true)
       if (ReadConfigFile(Cnf,CnfFile,true) == false)
         return false;
 
@@ -143,3 +150,7 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput)       /*
    return NULL;
 }
                                                                        /*}}}*/
+
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif