summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--bignum.c3
-rw-r--r--configure.in15
-rw-r--r--defines.h9
-rw-r--r--marshal.c3
-rw-r--r--missing.h4
-rw-r--r--numeric.c4
-rw-r--r--ruby.h4
-rw-r--r--rubysig.h2
-rw-r--r--signal.c2
-rw-r--r--win32/win32.h3
11 files changed, 43 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 9420a33..715d1dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Mon Dec 22 17:23:42 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (ac_cv_func_setitimer): moved from defines.h
+
+ * defines.h, rubysig.h, signal.c: removed macro handling which
+ should be done in configure.
+
+ * configure.in (intrinsics.h): check if present.
+
+ * ruby.h: include intrinsics.h if available.
+
+ * bignum.c, marshal.c: include ieeefp.h if available.
+
+ * missing.h (isinf): define as a macro if finite() and isnan()
+ are available. [ruby-core:02032]
+
Mon Dec 22 17:07:31 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in (mingw): set isnan, finite and isinf to yes.
diff --git a/bignum.c b/bignum.c
index 255b5d1..5089bff 100644
--- a/bignum.c
+++ b/bignum.c
@@ -14,6 +14,9 @@
#include <math.h>
#include <ctype.h>
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
VALUE rb_cBignum;
diff --git a/configure.in b/configure.in
index 79950f0..59389bd 100644
--- a/configure.in
+++ b/configure.in
@@ -278,7 +278,9 @@ rhapsody*) ;;
darwin*) LIBS="-lobjc $LIBS";;
hpux*) LIBS="-lm $LIBS"
ac_cv_c_inline=no;;
-human*) ac_cv_func_getpgrp_void=yes;;
+human*) ac_cv_func_getpgrp_void=yes
+ ac_cv_func_setitimer=no
+ ;;
beos*) ;;
cygwin*) rb_cv_have_daylight=no
ac_cv_var_tzname=no
@@ -309,7 +311,9 @@ mingw*) LIBS="-lwsock32 $LIBS"
os2-emx*) LIBS="-lm $LIBS"
ac_cv_lib_dir_opendir=no;;
msdosdjgpp*) LIBS="-lm $LIBS"
- ac_cv_func_getpgrp_void=yes;;
+ ac_cv_func_getpgrp_void=yes
+ ac_cv_func_setitimer=no
+ ;;
freebsd*) LIBS="-lm $LIBS"
AC_CACHE_CHECK([whether -lxpg4 has to be linked],
rb_cv_lib_xpg4_needed,
@@ -343,6 +347,8 @@ freebsd*) LIBS="-lm $LIBS"
fi
fi
;;
+bow) ac_cv_func_setitimer=no
+ ;;
*) LIBS="-lm $LIBS";;
esac
AC_CHECK_LIB(crypt, crypt)
@@ -364,7 +370,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\
fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \
sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \
- ucontext.h)
+ ucontext.h intrinsics.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
@@ -654,7 +660,8 @@ if test $rb_cv_huge_st_ino = yes; then
fi
case "$target_cpu" in
-m68*|i?86|sparc) rb_cv_stack_grow_dir=-1;;
+m68*|i?86|ia64|sparc*|alpha*) rb_cv_stack_grow_dir=-1;;
+hppa*) rb_cv_stack_grow_dir=+1;;
esac
AC_CACHE_CHECK(stack growing direction, rb_cv_stack_grow_dir,
[AC_TRY_RUN([
diff --git a/defines.h b/defines.h
index 6d9a701..af5f3bb 100644
--- a/defines.h
+++ b/defines.h
@@ -184,15 +184,6 @@ flush_register_windows(void)
#define ENV_IGNORECASE
#endif
-#if defined(__human68k__)
-#undef HAVE_RANDOM
-#undef HAVE_SETITIMER
-#endif
-
-#if defined(DJGPP) || defined(__BOW__)
-#undef HAVE_SETITIMER
-#endif
-
#ifndef RUBY_PLATFORM
#define RUBY_PLATFORM "unknown-unknown"
#endif
diff --git a/marshal.c b/marshal.c
index d998293..1a30ee0 100644
--- a/marshal.c
+++ b/marshal.c
@@ -19,6 +19,9 @@
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
#define BITSPERSHORT (2*CHAR_BIT)
#define SHORTMASK ((1<<BITSPERSHORT)-1)
diff --git a/missing.h b/missing.h
index f3339f3..ac499bd 100644
--- a/missing.h
+++ b/missing.h
@@ -60,7 +60,11 @@ extern double erfc _((double));
#endif
#ifndef HAVE_ISINF
+# if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
+# define isinf(x) (!finite(x) && !isnan(x))
+# else
extern int isinf _((double));
+# endif
#endif
#ifndef HAVE_ISNAN
diff --git a/numeric.c b/numeric.c
index a33c83a..5078144 100644
--- a/numeric.c
+++ b/numeric.c
@@ -19,10 +19,6 @@
#include <floatingpoint.h>
#endif
-#ifdef _UNICOSMP
-#include <intrinsics.h>
-#endif
-
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
diff --git a/ruby.h b/ruby.h
index d258fa1..dda9acc 100644
--- a/ruby.h
+++ b/ruby.h
@@ -31,6 +31,10 @@ extern "C" {
# include <strings.h>
#endif
+#ifdef HAVE_INTRINSICS_H
+# include <intrinsics.h>
+#endif
+
#include <stddef.h>
#include <stdio.h>
diff --git a/rubysig.h b/rubysig.h
index 3ecdf98..9049325 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -70,7 +70,7 @@ void rb_trap_restore_mask _((void));
RUBY_EXTERN int rb_thread_critical;
void rb_thread_schedule _((void));
-#if defined(HAVE_SETITIMER) && !defined(__BOW__)
+#if defined(HAVE_SETITIMER)
RUBY_EXTERN int rb_thread_pending;
# define CHECK_INTS do {\
if (!rb_prohibit_interrupt) {\
diff --git a/signal.c b/signal.c
index 4e489a7..155f52a 100644
--- a/signal.c
+++ b/signal.c
@@ -553,7 +553,7 @@ trap(arg)
if (sig < 0 || sig > NSIG) {
rb_raise(rb_eArgError, "invalid signal number (%d)", sig);
}
-#if defined(HAVE_SETITIMER) && !defined(__BOW__)
+#if defined(HAVE_SETITIMER)
if (sig == SIGVTALRM) {
rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; cannot set handler");
}
diff --git a/win32/win32.h b/win32/win32.h
index 99507e4..92dd59c 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -183,9 +183,6 @@ extern pid_t rb_w32_getpid(void);
#ifndef isnan
#define isnan(x) _isnan(x)
#endif
-#ifndef isinf
-#define isinf(x) (!_finite(x) && !_isnan(x))
-#endif
#ifndef finite
#define finite(x) _finite(x)
#endif