summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-22 08:23:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-22 08:23:55 +0000
commit748b699d1b39cf9db5190a9b5f25fa8f32291677 (patch)
treeeeadf9e794d838ec4b899dcb3f1ff7c527f4911f
parent25b6ac95f2d2b034832e95a41536106c17c0fa07 (diff)
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 9420a3355f..715d1ddce0 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 255b5d141f..5089bff950 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 79950f0c21..59389bd378 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 6d9a7013c8..af5f3bba02 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 d998293da8..1a30ee07b5 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 f3339f3200..ac499bd7d7 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 a33c83adaf..50781446e8 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 d258fa111f..dda9acc972 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 3ecdf9860d..9049325a36 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 4e489a73bb..155f52a853 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 99507e44d8..92dd59c169 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