aboutsummaryrefslogtreecommitdiff
path: root/misc/efgcvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/efgcvt.c')
-rw-r--r--misc/efgcvt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/misc/efgcvt.c b/misc/efgcvt.c
index 95b0b0d..e8a0517 100644
--- a/misc/efgcvt.c
+++ b/misc/efgcvt.c
@@ -1,5 +1,5 @@
/* [efg]cvt -- compatibility functions for floating point formatting.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -19,13 +19,16 @@ Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <float.h>
+
+#define MAXDIG (DBL_DIG + DBL_MAX_10_EXP)
char *
fcvt (value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
{
- static char buf[100];
+ static char buf[MAXDIG];
(void) fcvt_r (value, ndigit, decpt, sign, buf, sizeof buf);
@@ -37,7 +40,7 @@ ecvt (value, ndigit, decpt, sign)
double value;
int ndigit, *decpt, *sign;
{
- static char buf[100];
+ static char buf[MAXDIG];
(void) ecvt_r (value, ndigit, decpt, sign, buf, sizeof buf);