From 67994d6f6010739c22b1b4ab99aa88b4fe1ab8bd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 23 Jun 1999 12:38:51 +0000 Subject: Update. 1999-06-23 Ulrich Drepper * manual/arith.texi: Document restriction of ndigit parameter of ecvt and friends. * misc/efgcvt.c: Define NDIGIT_MAX. (gcvt): Limit precision in sprintf call to NDIGIT_MAX. Do not dynamically allocate the static buffers. They are small enough. * misc/efgcvt_r.c: Define NDIGIT_MAX. (fcvt_r): Limit precision in snprintf call to NDIGIT_MAX. * misc/qefgcvt.c: Define NDIGIT_MAX. * misc/qefgcvt_r.c: Likewise. * misc/tst-efgcvt.c (special): Add test for large ndigit parameter. --- misc/qefgcvt_r.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc/qefgcvt_r.c') diff --git a/misc/qefgcvt_r.c b/misc/qefgcvt_r.c index 092a639f60..012ab54acc 100644 --- a/misc/qefgcvt_r.c +++ b/misc/qefgcvt_r.c @@ -1,6 +1,6 @@ /* Compatibility functions for floating point formatting, reentrant, long double versions. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,5 +22,6 @@ #define FUNC_PREFIX q #define FLOAT_FMT_FLAG "L" #define FLOAT_NAME_EXT l +# define NDIGIT_MAX LDBL_DIG #include "efgcvt_r.c" -- cgit v1.2.3