]> git.cworth.org Git - apitrace/blobdiff - common/os_win32.cpp
retrace: Implement glxCopySubBufferMESA
[apitrace] / common / os_win32.cpp
index f297a5551357f5b7631519374bc4ad36149090a6..05a7a46c37d89ef33f812c79995732d6e6358ac3 100644 (file)
@@ -23,6 +23,8 @@
  *
  **************************************************************************/
 
+#ifdef _WIN32
+
 #include <windows.h>
 
 #include <assert.h>
@@ -42,7 +44,7 @@ String
 getProcessName(void)
 {
     String path;
-    size_t size = MAX_PATH;
+    DWORD size = MAX_PATH;
     char *buf = path.buf(size);
 
     DWORD nWritten = GetModuleFileNameA(NULL, buf, size);
@@ -57,7 +59,7 @@ String
 getCurrentDir(void)
 {
     String path;
-    size_t size = MAX_PATH;
+    DWORD size = MAX_PATH;
     char *buf = path.buf(size);
     
     DWORD ret = GetCurrentDirectoryA(size, buf);
@@ -69,6 +71,12 @@ getCurrentDir(void)
     return path;
 }
 
+bool
+createDirectory(const String &path)
+{
+    return CreateDirectoryA(path, NULL);
+}
+
 bool
 String::exists(void) const
 {
@@ -166,7 +174,7 @@ int execute(char * const * args)
         sep = ' ';
     }
 
-    STARTUPINFO startupInfo;
+    STARTUPINFOA startupInfo;
     memset(&startupInfo, 0, sizeof(startupInfo));
     startupInfo.cb = sizeof(startupInfo);
 
@@ -332,3 +340,5 @@ resetExceptionCallback(void)
 
 
 } /* namespace os */
+
+#endif  // defined(_WIN32)