Browse Source

build win32

David Rose 16 years ago
parent
commit
6c0957c21a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      direct/src/plugin/p3dInstanceManager.cxx

+ 4 - 2
direct/src/plugin/p3dInstanceManager.cxx

@@ -35,6 +35,8 @@
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 #include <shlobj.h>
 #include <shlobj.h>
+#include <io.h>      // chmod()
+#include <direct.h>  // rmdir()
 #else
 #else
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <signal.h>
 #include <signal.h>
@@ -1073,7 +1075,7 @@ delete_directory_recursively(const string &root_dir) {
     if (result == 0) {
     if (result == 0) {
       nout << "Deleted " << root_dir << "\n";
       nout << "Deleted " << root_dir << "\n";
     } else {
     } else {
-      if (access(root_dir.c_str(), F_OK) == 0) {
+      if (access(root_dir.c_str(), 0) == 0) {
         nout << "Could not delete " << root_dir << "\n";
         nout << "Could not delete " << root_dir << "\n";
       }
       }
     }
     }
@@ -1123,7 +1125,7 @@ delete_directory_recursively(const string &root_dir) {
   if (result == 0) {
   if (result == 0) {
     nout << "Removed directory " << root_dir << "\n";
     nout << "Removed directory " << root_dir << "\n";
   } else {
   } else {
-    if (access(pathname.c_str(), F_OK) == 0) {
+    if (access(pathname.c_str(), 0) == 0) {
       nout << "Could not remove directory " << root_dir << "\n";
       nout << "Could not remove directory " << root_dir << "\n";
     }
     }
   }
   }