summaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-20 14:52:31 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-20 14:52:31 +0000
commit1cf3c68d4813038119d900084abe31bd2acb2e7a (patch)
tree09a97008cf64a0977c96a7a203e90573737938d2 /process.c
parent775819d51f74fb75697ee31f739c48544e288bf3 (diff)
downloadruby-1cf3c68d4813038119d900084abe31bd2acb2e7a.tar.gz
ruby-1cf3c68d4813038119d900084abe31bd2acb2e7a.tar.xz
ruby-1cf3c68d4813038119d900084abe31bd2acb2e7a.zip
* process.c: add W* macro if not available.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/process.c b/process.c
index 85b205831..7f62331d8 100644
--- a/process.c
+++ b/process.c
@@ -57,6 +57,25 @@ struct timeval rb_time_interval _((VALUE));
static VALUE S_Tms;
#endif
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w) & 0xff) == 0)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
+#endif
+#ifndef WIFSTOPPED
+#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0x7f)
+#endif
+#ifndef WSTOPSIG
+#define WSTOPSIG WEXITSTATUS
+#endif
+
static VALUE
get_pid()
{