ref: d66cbb5fcdb61fcfa64356627a3dd4e68b100f9a
parent: b826c4691da8620276b4f9574d90374ff85f9793
author: Russell Rice <rtc_marine@hotmail.com>
date: Mon Jan 1 23:41:29 EST 2007
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
--- 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"