diff --git a/ChangeLog b/ChangeLog index d7fcb7f0ab..4987eb0331 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Jun 16 21:23:59 2000 WATANABE Hirofumi + + * configure.in: add pause(2) checking. + + * eval.c: define pause() if missing. + Fri Jun 16 05:18:45 2000 Yasuhiro Fukuma * configure.in: FreeBSD: do not link dummy libxpg4 which was diff --git a/configure.in b/configure.in index 6cb2b47b14..5696dfb6e2 100644 --- a/configure.in +++ b/configure.in @@ -222,7 +222,7 @@ AC_CHECK_FUNCS(fmod killpg drand48 random wait4 waitpid syscall getcwd\ truncate chsize times utimes fcntl lockf setitimer\ setruid seteuid setreuid setrgid setegid setregid\ getpgrp setpgrp getpgid setpgid getgroups getpriority\ - dlopen sigprocmask sigaction _setjmp setsid getrlimit) + dlopen sigprocmask sigaction _setjmp setsid getrlimit pause) AC_STRUCT_TIMEZONE AC_CACHE_CHECK(for external int daylight, rb_cv_have_daylight, [AC_TRY_LINK([#include diff --git a/eval.c b/eval.c index fab7a9ee57..0282bbda02 100644 --- a/eval.c +++ b/eval.c @@ -69,6 +69,14 @@ struct timeval { #include +#if !defined HAVE_PAUSE +# if defined _WIN32 && !defined __CYGWIN__ +# define pause() Sleep(INFINITE) +# else +# define pause() sleep(0x7fffffff) +# endif +#endif + VALUE rb_cProc; static VALUE rb_cBinding; static VALUE proc_call _((VALUE,VALUE));