Skip to content
Snippets Groups Projects
Commit 3b7ea3de authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

frexp test fixed, and tests for fpsetmask() added

Rev: src/configure.in:1.219
parent 5bd66d5e
Branches
Tags
No related merge requests found
AC_REVISION("$Id: configure.in,v 1.218 1998/07/17 11:40:37 grubba Exp $") AC_REVISION("$Id: configure.in,v 1.219 1998/07/22 21:04:52 hubbe Exp $")
AC_INIT(interpret.c) AC_INIT(interpret.c)
AC_CONFIG_HEADER(machine.h) AC_CONFIG_HEADER(machine.h)
...@@ -686,7 +686,7 @@ locale.h sys/resource.h sys/select.h sys/mman.h setjmp.h limits.h pthread.h \ ...@@ -686,7 +686,7 @@ locale.h sys/resource.h sys/select.h sys/mman.h setjmp.h limits.h pthread.h \
thread.h dlfcn.h dld.h dl.h sys/times.h sched.h sys/procfs.h sys/param.h \ thread.h dlfcn.h dld.h dl.h sys/times.h sched.h sys/procfs.h sys/param.h \
winsock.h sys/ioct.h sys/socket.h malloc.h netinet/in.h sys/wait.h winbase.h \ winsock.h sys/ioct.h sys/socket.h malloc.h netinet/in.h sys/wait.h winbase.h \
grp.h pwd.h passwd.h group.h winsock2.h signal.h sys/file.h poll.h sys/poll.h \ grp.h pwd.h passwd.h group.h winsock2.h signal.h sys/file.h poll.h sys/poll.h \
socket.h ieeefp.h fp_class.h) socket.h ieeefp.h fp_class.h ieeefp.h floatingpoint.h)
AC_CHECK_SIZEOF(char *,4) AC_CHECK_SIZEOF(char *,4)
AC_CHECK_SIZEOF(long,4) AC_CHECK_SIZEOF(long,4)
...@@ -813,6 +813,7 @@ int main() ...@@ -813,6 +813,7 @@ int main()
xFreeBSD*) xFreeBSD*)
# Threads on FreeBSD earlier than 1998-06-07 are broken. # Threads on FreeBSD earlier than 1998-06-07 are broken.
LIBS="${OLDLIBS}"
AC_MSG_CHECKING(if this version of FreeBSD may have working threads) AC_MSG_CHECKING(if this version of FreeBSD may have working threads)
AC_CACHE_VAL(pike_cv_freebsd_threads, [ AC_CACHE_VAL(pike_cv_freebsd_threads, [
AC_TRY_RUN([ AC_TRY_RUN([
...@@ -1075,6 +1076,7 @@ AC_CHECK_FUNCS( \ ...@@ -1075,6 +1076,7 @@ AC_CHECK_FUNCS( \
finite \ finite \
signbit \ signbit \
nice \ nice \
fpsetmask \
) )
if test x$pike_cv_sys_os = xWindows_NT ; then if test x$pike_cv_sys_os = xWindows_NT ; then
...@@ -1454,7 +1456,7 @@ int main() ...@@ -1454,7 +1456,7 @@ int main()
int p,e; int p,e;
x=frexp(1.0, &e); x=frexp(1.0, &e);
if(x * pow(2.0,(double)e) != 1.0) exit(3) if(x * pow(2.0,(double)e) != 1.0) exit(3);
p=-7; p=-7;
for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++) for(x=3.0/4.0*pow(2.0,(double)p);x<50000.0;x*=2.0,p++)
...@@ -1670,11 +1672,22 @@ AC_CACHE_VAL(pike_cv_sys_idiot_sigfpe, ...@@ -1670,11 +1672,22 @@ AC_CACHE_VAL(pike_cv_sys_idiot_sigfpe,
AC_TRY_RUN([ AC_TRY_RUN([
#include <math.h> #include <math.h>
#ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
float foo_float = 0.0; float foo_float = 0.0;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
float x=2.0, y=-128.0; float x=2.0, y=-128.0;
#ifdef HAVE_FPSETMASK
fpsetmask(0);
#endif
x = pow(2.0, -128.0); x = pow(2.0, -128.0);
foo_float = x; foo_float = x;
if (x == 2.0) exit(1); if (x == 2.0) exit(1);
...@@ -1707,11 +1720,22 @@ if test $pike_cv_sys_idiot_sigfpe = yes ; then ...@@ -1707,11 +1720,22 @@ if test $pike_cv_sys_idiot_sigfpe = yes ; then
AC_TRY_RUN([ AC_TRY_RUN([
#include <math.h> #include <math.h>
#ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
float foo_float = 0.0; float foo_float = 0.0;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
float x=2.0, y=-128.0; float x=2.0, y=-128.0;
#ifdef HAVE_FPSETMASK
fpsetmask(0);
#endif
x = pow(2.0, -128.0); x = pow(2.0, -128.0);
foo_float = x; foo_float = x;
if (x == 2.0) exit(1); if (x == 2.0) exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment