diff options
Diffstat (limited to 'base/process.h')
-rw-r--r-- | base/process.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/base/process.h b/base/process.h index b8ea94f..5c07442 100644 --- a/base/process.h +++ b/base/process.h @@ -30,14 +30,17 @@ #ifndef BASE_PROCESS_H__ #define BASE_PROCESS_H__ -#include <windows.h> #include "base/basictypes.h" +#ifdef OS_WIN +#include <windows.h> +#endif + // ProcessHandle is a platform specific type which represents the underlying OS // handle to a process. -#ifdef WIN32 +#if defined(OS_WIN) typedef HANDLE ProcessHandle; -#else +#elif defined(OS_POSIX) typedef int ProcessHandle; #endif @@ -65,7 +68,9 @@ class Process { // Close the Process Handle. void Close() { +#ifdef OS_WIN CloseHandle(process_); +#endif process_ = 0; } |