From: matz@... (Yukihiro Matsumoto) Date: 1999-06-29T13:59:13+09:00 Subject: [ruby-list:15142] Re: pty on NeXTSTEP3.3J まつもと ゆきひろです In message "[ruby-list:15137] Re: pty on NeXTSTEP3.3J" on 99/06/29, Yukihiro Matsumoto writes: |調べてみると union wait を使うのは old BSD style なのだそう |です。で、autoconfにはそれ用のチェックがありましたので、採用 |してみることにします。 | |今はCVSにアクセスできないので差分は後で出します。確認をお願 |いします。 これが差分です。 --- configure.in 1999/06/25 09:02:34 1.1.1.2.2.23 +++ configure.in 1999/06/29 04:57:41 @@ -163,7 +154,8 @@ AC_HEADER_DIRENT AC_HEADER_STDC +AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \ - sys/select.h sys/time.h sys/times.h sys/param.h sys/wait.h\ - syscall.h a.out.h string.h utime.h memory.h direct.h fnmatch.h) + sys/select.h sys/time.h sys/times.h sys/param.h syscall.h\ + a.out.h string.h utime.h memory.h direct.h fnmatch.h) dnl Checks for typedefs, structures, and compiler characteristics. --- ext/pty/pty.c 1999/06/11 06:30:00 1.1.2.6 +++ ext/pty/pty.c 1999/06/29 04:57:41 @@ -9,5 +9,9 @@ #include #endif +#ifdef HAVE_SYS_WAIT_H #include +#else +#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) +#endif #include @@ -161,5 +165,5 @@ 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)