From 0923c7a543d377bae9da0ad7075c8f9664ae70dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 20 Feb 1995 09:50:50 +0000 Subject: Mon Feb 20 04:04:57 1995 Roland McGrath * config.h.in [HAVE_ELF || HAVE_GNU_LD]: Define HAVE_WEAK_SYMBOLS. * stdlib/strtod.c (PASTE, PASTE1): New helper macros; use these in access to float.h macros. * misc/efgcvt.c: New file. * misc/Makefile (routines): Add efgcvt. --- stdlib/strtod.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'stdlib/strtod.c') diff --git a/stdlib/strtod.c b/stdlib/strtod.c index d647753e79..6bd2dd685a 100644 --- a/stdlib/strtod.c +++ b/stdlib/strtod.c @@ -47,13 +47,16 @@ Cambridge, MA 02139, USA. */ /* Constants we need from float.h; select the set for the FLOAT precision. */ -#define MANT_DIG FLT##_MANT_DIG -#define MAX_EXP FLT##_MAX_EXP -#define MIN_EXP FLT##_MIN_EXP -#define MAX_10_EXP FLT##_MAX_10_EXP -#define MIN_10_EXP FLT##_MIN_10_EXP -#define MAX_10_EXP_LOG FLT##_MAX_10_EXP_LOG - +#define MANT_DIG PASTE(FLT,_MANT_DIG) +#define MAX_EXP PASTE(FLT,_MAX_EXP) +#define MIN_EXP PASTE(FLT,_MIN_EXP) +#define MAX_10_EXP PASTE(FLT,_MAX_10_EXP) +#define MIN_10_EXP PASTE(FLT,_MIN_10_EXP) +#define MAX_10_EXP_LOG PASTE(FLT,_MAX_10_EXP_LOG) + +/* Extra macros required to get FLT expanded before the pasting. */ +#define PASTE(a,b) PASTE1(a,b) +#define PASTE1(a,b) a##b /* Function to construct a floating point number from an MP integer containing the fraction bits, a base 2 exponent, and a sign flag. */ -- cgit v1.2.3