From d633fc6b5bb397893cc2943214c2600f97326976 Mon Sep 17 00:00:00 2001 From: eban Date: Tue, 20 Feb 2001 14:52:31 +0000 Subject: * process.c: add W* macro if not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'process.c') diff --git a/process.c b/process.c index 85b205831f..7f62331d83 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() { -- cgit v1.2.3