diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-22 08:23:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-22 08:23:55 +0000 |
commit | 748b699d1b39cf9db5190a9b5f25fa8f32291677 (patch) | |
tree | eeadf9e794d838ec4b899dcb3f1ff7c527f4911f | |
parent | 25b6ac95f2d2b034832e95a41536106c17c0fa07 (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-- | ChangeLog | 16 | ||||
-rw-r--r-- | bignum.c | 3 | ||||
-rw-r--r-- | configure.in | 15 | ||||
-rw-r--r-- | defines.h | 9 | ||||
-rw-r--r-- | marshal.c | 3 | ||||
-rw-r--r-- | missing.h | 4 | ||||
-rw-r--r-- | numeric.c | 4 | ||||
-rw-r--r-- | ruby.h | 4 | ||||
-rw-r--r-- | rubysig.h | 2 | ||||
-rw-r--r-- | signal.c | 2 | ||||
-rw-r--r-- | win32/win32.h | 3 |
11 files changed, 43 insertions, 22 deletions
@@ -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. @@ -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([ @@ -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 @@ -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) @@ -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 @@ -19,10 +19,6 @@ #include <floatingpoint.h> #endif -#ifdef _UNICOSMP -#include <intrinsics.h> -#endif - #ifdef HAVE_FLOAT_H #include <float.h> #endif @@ -31,6 +31,10 @@ extern "C" { # include <strings.h> #endif +#ifdef HAVE_INTRINSICS_H +# include <intrinsics.h> +#endif + #include <stddef.h> #include <stdio.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) {\ @@ -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 |