Merge remote-tracking branch 'remotes/origin/exportvis' into windows+cc
[ardour.git] / libs / pbd / file_utils.cc
index 1a32377ff681219a8ded2af273fee0d8dda35119..44254989c1bfbd227930aa9da8e206f1143ab6aa 100644 (file)
@@ -23,8 +23,8 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-#ifdef WIN32
-#include <io.h> // for W_OK
+#ifdef COMPILER_MINGW
+#include <io.h> // For W_OK
 #endif
 
 #include <glibmm/fileutils.h>
@@ -104,7 +104,7 @@ find_matching_files_in_directories (const vector<std::string>& paths,
 }
 
 void
-find_matching_files_in_search_path (const SearchPath& search_path,
+find_matching_files_in_search_path (const Searchpath& search_path,
                                     const Glib::PatternSpec& pattern,
                                     vector<std::string>& result)
 {
@@ -112,7 +112,7 @@ find_matching_files_in_search_path (const SearchPath& search_path,
 }
 
 bool
-find_file_in_search_path(const SearchPath& search_path,
+find_file_in_search_path(const Searchpath& search_path,
                          const string& filename,
                          std::string& result)
 {
@@ -202,9 +202,9 @@ get_absolute_path (const std::string & p)
 bool
 equivalent_paths (const std::string& a, const std::string& b)
 {
-       struct stat bA;
+       GStatBuf bA;
        int const rA = g_stat (a.c_str(), &bA);
-       struct stat bB;
+       GStatBuf bB;
        int const rB = g_stat (b.c_str(), &bB);
 
        return (rA == 0 && rB == 0 && bA.st_dev == bB.st_dev && bA.st_ino == bB.st_ino);
@@ -235,7 +235,7 @@ exists_and_writable (const std::string & p)
           make us unwritable.
        */
 
-       struct stat statbuf;
+       GStatBuf statbuf;
 
        if (g_stat (p.c_str(), &statbuf) != 0) {
                /* doesn't exist - not writable */