summaryrefslogtreecommitdiff
path: root/setup/execute.c
diff options
context:
space:
mode:
authorRussell Rice2007-01-02 04:41:29 +0000
committerRussell Rice2007-01-02 04:41:29 +0000
commitd66cbb5fcdb61fcfa64356627a3dd4e68b100f9a (patch)
tree5b42499f86cbb68c0074a92a32caa467cf8988bf /setup/execute.c
parentb826c4691da8620276b4f9574d90374ff85f9793 (diff)
downloadchocolate-doom-d66cbb5fcdb61fcfa64356627a3dd4e68b100f9a.tar.gz
chocolate-doom-d66cbb5fcdb61fcfa64356627a3dd4e68b100f9a.tar.bz2
chocolate-doom-d66cbb5fcdb61fcfa64356627a3dd4e68b100f9a.zip
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
Diffstat (limited to 'setup/execute.c')
-rw-r--r--setup/execute.c8
1 files changed, 7 insertions, 1 deletions
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"