diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-02-20 14:52:31 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-02-20 14:52:31 +0000 |
commit | d633fc6b5bb397893cc2943214c2600f97326976 (patch) | |
tree | 09a97008cf64a0977c96a7a203e90573737938d2 /process.c | |
parent | 88eef2d7fec7a3380f495d768c72d1292260ea18 (diff) |
* 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
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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() { |