aboutsummaryrefslogtreecommitdiffstats
path: root/floatcomp.c
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-12-23 18:26:45 +0100
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-12-23 18:26:45 +0100
commitee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f (patch)
tree3945f1b3afd64a7147582611f21b7f5e59891e41 /floatcomp.c
parent0ac63db595a009d1f07dba8246e52710348b0798 (diff)
parentc66f7da30bb5635957b6e68c1e1db7e77e7b4174 (diff)
downloadegawk-ee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f.tar.gz
egawk-ee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f.tar.bz2
egawk-ee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f.zip
Merge remote-tracking branch 'origin/master' into cmake
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