diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-07-15 07:59:59 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-07-15 07:59:59 +0000 |
commit | 86307f52ee1b3c5aa76e2fd6ee118e681dd76905 (patch) | |
tree | 4f5675ce901200d4245c6697d4e8d1c224949174 /ext/pty/pty.c | |
parent | e12510c502a3c8a81aeda66d1867eb1e760ce533 (diff) |
990715
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty/pty.c')
-rw-r--r-- | ext/pty/pty.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 0438ca7e9b..2cd8d6f9a4 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -8,7 +8,11 @@ #if !defined(HAVE_OPENPTY) && !defined(HAVE__GETPTY) #include <sys/ioctl.h> #endif +#ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> +#else +#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) +#endif #include <ctype.h> #include <ruby.h> @@ -160,7 +164,7 @@ chld_changed() #ifdef HAVE_WAITPID cpid = waitpid(-1, &statusp, WUNTRACED|WNOHANG); #else - cpid = wait3((int *) &statusp, WUNTRACED|WNOHANG, 0); + cpid = wait3(&statusp, WUNTRACED|WNOHANG, 0); #endif if (cpid == 0 || cpid == -1) return; |