From 523e929122415f6bad52eca72af3222c90caebcf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 5 Jul 1997 03:27:25 +0000 Subject: [PATCH] Include float.h before lisp.h. --- src/data.c | 9 ++++++++- src/doprnt.c | 3 ++- src/floatfns.c | 10 ++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/data.c b/src/data.c index 5fb57407cba..f2dd58344d9 100644 --- a/src/data.c +++ b/src/data.c @@ -22,6 +22,14 @@ Boston, MA 02111-1307, USA. */ #include #include + +/* Put this before lisp.h so that lisp.h can define DBL_DIG if not defined. */ +#ifdef LISP_FLOAT_TYPE +#ifdef STDC_HEADERS +#include +#endif +#endif + #include "lisp.h" #include "puresize.h" #include "charset.h" @@ -36,7 +44,6 @@ Boston, MA 02111-1307, USA. */ #ifdef LISP_FLOAT_TYPE #ifdef STDC_HEADERS -#include #include #endif diff --git a/src/doprnt.c b/src/doprnt.c index 7c703f87d5e..2b988acea5c 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -24,12 +24,13 @@ Boston, MA 02111-1307, USA. */ #include #include #include -#include "lisp.h" #if STDC_HEADERS #include #endif +#include "lisp.h" + #ifndef DBL_MAX_10_EXP #define DBL_MAX_10_EXP 308 /* IEEE double */ #endif diff --git a/src/floatfns.c b/src/floatfns.c index 11cf657f105..29bdccf2989 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -47,15 +47,17 @@ Boston, MA 02111-1307, USA. */ #include #include -#include "lisp.h" -#include "syssignal.h" - -#ifdef LISP_FLOAT_TYPE +/* Put this before lisp.h so that lisp.h can define DBL_DIG if not defined. */ #if STDC_HEADERS #include #endif +#include "lisp.h" +#include "syssignal.h" + +#ifdef LISP_FLOAT_TYPE + /* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ #ifndef IEEE_FLOATING_POINT #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ -- 2.39.2