From ecd431535b8bb70d1b0b5f944d9053d6d85e084a Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Sat, 24 Sep 2016 03:13:23 +0200 Subject: [PATCH] Remove define and usage of `_hdr_float` The header file float.h is part of the standard C library, so we can assume it is always available. This header file also isn't included in the sfio build when `_SFBINARY` is defined, resulting in a failed build. The checks defining `_hdr_float` are removed and is only included were required in lib/sfio: in sfputd.c --- ast_common.h.in | 4 ---- lib/sfio/features/sfio | 1 - lib/sfio/sfhdr.h | 5 ----- lib/sfio/sfputd.c | 2 ++ windows/include/FEATURE/sfio | 1 - 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/ast_common.h.in b/ast_common.h.in index cb35cbdbb..a374a6681 100644 --- a/ast_common.h.in +++ b/ast_common.h.in @@ -7,10 +7,6 @@ # define _sys_types 1 #endif -#ifdef HAVE_FLOAT_H -# define _hdr_float 1 -#endif - #ifdef HAVE_SYS_TYPES_H # define _sys_types 1 #endif diff --git a/lib/sfio/features/sfio b/lib/sfio/features/sfio index aee3ad144..70dba1df3 100644 --- a/lib/sfio/features/sfio +++ b/lib/sfio/features/sfio @@ -14,7 +14,6 @@ lib qfrexp lib qldexp hdr unistd -hdr float lib atexit lib onexit diff --git a/lib/sfio/sfhdr.h b/lib/sfio/sfhdr.h index 6d3e8eddd..82ffbb2cd 100644 --- a/lib/sfio/sfhdr.h +++ b/lib/sfio/sfhdr.h @@ -80,7 +80,6 @@ extern "C" { #undef _hdr_vfork #undef _sys_vfork #undef _lib_vfork -#undef _hdr_float #undef _hdr_math #undef _sys_mman #undef _hdr_mman @@ -228,10 +227,6 @@ extern "C" { #include #endif -#if _hdr_float -#include -#endif - #if !defined(_ast_fltmax_double) #if defined(_lib_qfrexp) && _lib_qldexp diff --git a/lib/sfio/sfputd.c b/lib/sfio/sfputd.c index dfe48a0a6..e5459eeb6 100644 --- a/lib/sfio/sfputd.c +++ b/lib/sfio/sfputd.c @@ -13,6 +13,8 @@ #include "sfhdr.h" +#include + /* Write out a floating point value in a portable format ** ** Written by Kiem-Phong Vo. diff --git a/windows/include/FEATURE/sfio b/windows/include/FEATURE/sfio index 49f199a31..7a6e303b3 100644 --- a/windows/include/FEATURE/sfio +++ b/windows/include/FEATURE/sfio @@ -6,7 +6,6 @@ #define _sys_time 1 /* #include ok */ #define _hdr_math 1 /* #include ok */ //#define _hdr_unistd 1 /* #include ok */ -#define _hdr_float 1 /* #include ok */ #define _lib_atexit 1 /* atexit() in default lib(s) */ #define _lib_ftruncate 0 /* ftruncate() in default lib(s) */ #define _lib_lseek64 1 /* lseek64() in default lib(s) */ -- 2.40.0