commit d66cbb5fcdb61fcfa64356627a3dd4e68b100f9a
Author: Russell Rice <rtc_marine@hotmail.com>
AuthorDate: Tue Jan 2 04:41:29 2007 +0000
Commit: Russell Rice <rtc_marine@hotmail.com>
CommitDate: Tue Jan 2 04:41:29 2007 +0000
sys/wait.h does not exist on windows (thank mingw for sucking), add
WIFEXITED and WEXITSTATUS macros so it can compile under windows.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 813
---
setup/execute.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/setup/execute.c b/setup/execute.c
index 8f60288b..800e33b7 100644
--- a/setup/execute.c
+++ b/setup/execute.c
@@ -27,7 +27,13 @@
#include <string.h>
#include <sys/types.h>
-#include <sys/wait.h>
+
+#ifndef WINDOWS
+ #include <sys/wait.h>
+#else
+ #define WEXITSTATUS(stat_val) ((stat_val) & 255)
+ #define WIFEXITED(stat_val) (((stat_val) & 0xff00) == 0)
+#endif
#include "textscreen.h"