From 32da1c8c1e5d5828004fc0a3d3364bd562df701f Mon Sep 17 00:00:00 2001 From: eck Date: Wed, 24 Oct 1990 14:31:50 +0000 Subject: [PATCH] made a function-call of HUGE_VAL --- lang/cem/libcc.ansi/headers/math.h | 3 ++- lang/cem/libcc.ansi/math/.distr | 1 + lang/cem/libcc.ansi/math/LIST | 1 + lang/cem/libcc.ansi/math/Makefile | 2 +- lang/cem/libcc.ansi/math/hugeval.c | 14 ++++++++++++++ 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 lang/cem/libcc.ansi/math/hugeval.c diff --git a/lang/cem/libcc.ansi/headers/math.h b/lang/cem/libcc.ansi/headers/math.h index 04ca45343..a63b71362 100644 --- a/lang/cem/libcc.ansi/headers/math.h +++ b/lang/cem/libcc.ansi/headers/math.h @@ -6,7 +6,8 @@ #if !defined(_MATH_H) #define _MATH_H -#define HUGE_VAL 9.9e+999 /* though it will generate a warning */ +double __huge_val(void); /* may be infinity */ +#define HUGE_VAL (__huge_val()) double acos(double _x); double asin(double _x); diff --git a/lang/cem/libcc.ansi/math/.distr b/lang/cem/libcc.ansi/math/.distr index 54981b057..60a71bed5 100644 --- a/lang/cem/libcc.ansi/math/.distr +++ b/lang/cem/libcc.ansi/math/.distr @@ -9,6 +9,7 @@ fabs.c floor.c fmod.c frexp.e +hugeval.c ldexp.c localmath.h log.c diff --git a/lang/cem/libcc.ansi/math/LIST b/lang/cem/libcc.ansi/math/LIST index 835e11b14..720a4f4d2 100644 --- a/lang/cem/libcc.ansi/math/LIST +++ b/lang/cem/libcc.ansi/math/LIST @@ -16,5 +16,6 @@ exp.c ldexp.c fmod.c floor.c +hugeval.c frexp.e modf.e diff --git a/lang/cem/libcc.ansi/math/Makefile b/lang/cem/libcc.ansi/math/Makefile index 47e4d3613..a929104bc 100644 --- a/lang/cem/libcc.ansi/math/Makefile +++ b/lang/cem/libcc.ansi/math/Makefile @@ -1,4 +1,4 @@ clean: rm -f asin.o atan2.o atan.o ceil.o fabs.o pow.o log10.o \ log.o sin.o sinh.o sqrt.o tan.o tanh.o exp.o ldexp.o \ - fmod.o floor.o frexp.o modf.o OLIST + fmod.o floor.o hugeval.o frexp.o modf.o OLIST diff --git a/lang/cem/libcc.ansi/math/hugeval.c b/lang/cem/libcc.ansi/math/hugeval.c new file mode 100644 index 000000000..2a5b52684 --- /dev/null +++ b/lang/cem/libcc.ansi/math/hugeval.c @@ -0,0 +1,14 @@ +/* + * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + * + * Author: Hans van Eck + */ +/* $Header$ */ +#include + +double +__huge_val(void) +{ + return 1.0e+1000; /* This will generate a warning */ +} -- 2.34.1