diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-10 16:07:57 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-10 16:07:57 -0500 |
commit | 3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2 (patch) | |
tree | 314c3099bcc57d9af09d249e1e7dd8e45baca642 /libs/pbd/clear_dir.cc | |
parent | d15fda6d751a465d278f477923075d4783f3b1ca (diff) | |
parent | 897fbdc652434d3aa1e67223c3c3ef7ae9be2318 (diff) |
Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there
Diffstat (limited to 'libs/pbd/clear_dir.cc')
-rw-r--r-- | libs/pbd/clear_dir.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/pbd/clear_dir.cc b/libs/pbd/clear_dir.cc index 29410d41e5..2f9c7b772d 100644 --- a/libs/pbd/clear_dir.cc +++ b/libs/pbd/clear_dir.cc @@ -17,13 +17,22 @@ */ -#include <string> +#ifdef COMPILER_MSVC +#include <io.h> // Microsoft's nearest equivalent to <unistd.h> +using PBD::readdir; +using PBD::opendir; +using PBD::closedir; +#else #include <dirent.h> #include <unistd.h> +#endif + +#include <string> #include <sys/stat.h> #include <errno.h> #include <string.h> +#include <glib/gstdio.h> #include <glibmm/miscutils.h> #include "pbd/error.h" @@ -66,7 +75,7 @@ PBD::clear_directory (const string& dir, size_t* size, vector<string>* paths) continue; } - if (::unlink (fullpath.c_str())) { + if (::g_unlink (fullpath.c_str())) { error << string_compose (_("cannot remove file %1 (%2)"), fullpath, strerror (errno)) << endmsg; ret = 1; |