diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/util/fontxlfd.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 690682d..3436796 100644 --- a/configure.ac +++ b/configure.ac @@ -67,8 +67,8 @@ AC_CHECK_FUNCS([poll readlink strlcat]) AC_CONFIG_LIBOBJ_DIR([src/util]) AC_REPLACE_FUNCS([reallocarray realpath strlcat strlcpy]) -# Check for BSDish err.h -AC_CHECK_HEADERS([err.h]) +# Checks for header files. +AC_CHECK_HEADERS([err.h float.h]) # Checks for typedefs, structures, and compiler characteristics. AC_SYS_LARGEFILE diff --git a/src/util/fontxlfd.c b/src/util/fontxlfd.c index f37e253..b232c36 100644 --- a/src/util/fontxlfd.c +++ b/src/util/fontxlfd.c @@ -183,12 +183,7 @@ xlfd_round_double(double x) significant digits. How do you round to n significant digits on a binary machine? */ -#if defined(i386) || defined(__i386__) || \ - defined(ia64) || defined(__ia64__) || \ - defined(__alpha__) || defined(__alpha) || \ - defined(__hppa__) || \ - defined(__amd64__) || defined(__amd64) || \ - defined(sgi) +#ifdef HAVE_FLOAT_H #include <float.h> /* if we have IEEE 754 fp, we can round to binary digits... */ @@ -249,7 +244,7 @@ xlfd_round_double(double x) } else #endif -#endif /* i386 || __i386__ */ +#endif /* HAVE_FLOAT_H */ { /* * If not IEEE 754: Let printf() do it for you. |