aboutsummaryrefslogtreecommitdiffstats
path: root/floatcomp.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-12-10 21:13:27 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-12-10 21:13:27 +0200
commitb4d5e605c81adf70e66f6ab178a85a05dd7dfc45 (patch)
treea162795177a77ff696f132f6a54fdd2297051e6c /floatcomp.c
parentaa44b534077dcf8cfecdafecfe38791280578429 (diff)
parent4b44495a814afb5ed896ac21fe5aaeb4b3a1cd4a (diff)
downloadegawk-b4d5e605c81adf70e66f6ab178a85a05dd7dfc45.tar.gz
egawk-b4d5e605c81adf70e66f6ab178a85a05dd7dfc45.tar.bz2
egawk-b4d5e605c81adf70e66f6ab178a85a05dd7dfc45.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'floatcomp.c')
-rw-r--r--floatcomp.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/floatcomp.c b/floatcomp.c
index 9d24a67f..16a6d88e 100644
--- a/floatcomp.c
+++ b/floatcomp.c
@@ -26,6 +26,8 @@
#include "awk.h"
#include <math.h>
+#ifdef HAVE_UINTMAX_T
+
/* Assume IEEE-754 arithmetic on pre-C89 hosts. */
#ifndef FLT_RADIX
#define FLT_RADIX 2
@@ -69,28 +71,6 @@ Please port the following code to your weird host;
#define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4))
#define DBL_FRACTION_BITS (DBL_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4))
-/*
- * Floor and Ceil --- Work around a problem in conversion of
- * doubles to exact integers.
- */
-
-/* Floor --- do floor(), also for Cray */
-
-AWKNUM
-Floor(AWKNUM n)
-{
- return floor(n);
-}
-
-/* Ceil --- do ceil(), also for Cray */
-
-AWKNUM
-Ceil(AWKNUM n)
-{
- return ceil(n);
-}
-
-#ifdef HAVE_UINTMAX_T
/* adjust_uint --- fiddle with values, ask Paul Eggert to explain */
uintmax_t