summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-16 12:41:06 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-16 12:41:06 +0000
commitfeb82209abe8b24191933410a1d915a08f807f00 (patch)
tree0556abc0d0e34f242d6e051510e4777c292c5108
parent8d18d5b3f9d96be4120b89ff743856021de84e5b (diff)
2000-06-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--configure.in2
-rw-r--r--eval.c8
3 files changed, 15 insertions, 1 deletions
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 <eban@os.rim.or.jp>
+
+ * configure.in: add pause(2) checking.
+
+ * eval.c: define pause() if missing.
+
Fri Jun 16 05:18:45 2000 Yasuhiro Fukuma <yasuf@bsdclub.org>
* 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 <time.h>
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 <sys/stat.h>
+#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));