changeset 103:173b39ea0728

* win32 fixes
author Chris Cannam
date Fri, 05 May 2006 13:29:31 +0000
parents 0a846f83a4b7
children 174d33f28824
files base/NonRTThread.cpp base/System.cpp base/System.h
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/base/NonRTThread.cpp	Fri May 05 13:06:47 2006 +0000
+++ b/base/NonRTThread.cpp	Fri May 05 13:29:31 2006 +0000
@@ -15,7 +15,9 @@
 
 #include "NonRTThread.h"
 
+#ifndef _WIN32
 #include <pthread.h>
+#endif
 
 NonRTThread::NonRTThread(QObject *parent) :
     QThread(parent)
--- a/base/System.cpp	Fri May 05 13:06:47 2006 +0000
+++ b/base/System.cpp	Fri May 05 13:29:31 2006 +0000
@@ -25,6 +25,11 @@
 
 extern "C" {
 
+void usleep(unsigned long usec)
+{
+    Sleep(usec / 1000);
+}
+
 void gettimeofday(struct timeval *tv, void *tz)
 {
     union { 
@@ -45,7 +50,7 @@
 GetProcessStatus(int pid)
 {
 #ifdef _WIN32
-    DWORD handle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
+    HANDLE handle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
     if (!handle) {
         return ProcessNotRunning;
     } else {
--- a/base/System.h	Fri May 05 13:06:47 2006 +0000
+++ b/base/System.h	Fri May 05 13:29:31 2006 +0000
@@ -34,9 +34,8 @@
 #define PATH_SEPARATOR ';'
 #define DEFAULT_VAMP_PATH "%ProgramFiles%\\Vamp Plugins"
 
-#define usleep(u) Sleep((u)/1000)
-
 extern "C" {
+void usleep(unsigned long usec);
 void gettimeofday(struct timeval *p, void *tz);
 }