1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-12-22 08:23:55 +00:00
parent 25b6ac95f2
commit 748b699d1b
11 changed files with 43 additions and 22 deletions

View file

@ -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.

View file

@ -14,6 +14,9 @@
#include <math.h>
#include <ctype.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
VALUE rb_cBignum;

View file

@ -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([

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -19,10 +19,6 @@
#include <floatingpoint.h>
#endif
#ifdef _UNICOSMP
#include <intrinsics.h>
#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif

4
ruby.h
View file

@ -31,6 +31,10 @@ extern "C" {
# include <strings.h>
#endif
#ifdef HAVE_INTRINSICS_H
# include <intrinsics.h>
#endif
#include <stddef.h>
#include <stdio.h>

View file

@ -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) {\

View file

@ -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");
}

View file

@ -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