diff options
author | dirk <dirk@FreeBSD.org> | 2001-02-25 20:48:14 +0000 |
---|---|---|
committer | dirk <dirk@FreeBSD.org> | 2001-02-25 20:48:14 +0000 |
commit | fb709c3f7c0f6f66a92a3e14e1245e07df2855f9 (patch) | |
tree | e8edd4ec1d233c7ad0e39243355fbb8a3f645375 /sysutils/mkisofs | |
parent | 52fc65b587d47492187578bd7e25ee62c94d98e7 (diff) | |
download | FreeBSD-ports-fb709c3f7c0f6f66a92a3e14e1245e07df2855f9.zip FreeBSD-ports-fb709c3f7c0f6f66a92a3e14e1245e07df2855f9.tar.gz |
Add a patch for the old and new __dtoa().
Submitted by: tegge
PR: ports/25286
Diffstat (limited to 'sysutils/mkisofs')
-rw-r--r-- | sysutils/mkisofs/files/patch-aj | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sysutils/mkisofs/files/patch-aj b/sysutils/mkisofs/files/patch-aj new file mode 100644 index 0000000..fbc2f5a --- /dev/null +++ b/sysutils/mkisofs/files/patch-aj @@ -0,0 +1,42 @@ +--- lib/cvt.c.orig Wed Sep 8 15:03:20 1999 ++++ lib/cvt.c Sun Feb 25 10:06:50 2001 +@@ -31,7 +31,7 @@ + #include <standard.h> + + #ifdef HAVE_DTOA /* 4.4BSD floating point implementation */ +-extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep)); ++extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep, char **resultp)); + #endif + + #ifndef HAVE_ECVT +@@ -57,7 +57,13 @@ + static char *buf; + char *bufend; + char *ep; +- char *bp = __dtoa(value, 2, ndigit, decpt, sign, &ep); ++ char *bp; ++ static char *dtoaresult = NULL; ++ ++ free(dtoaresult); ++ dtoaresult = NULL; ++ ++ bp = __dtoa(value, 2, ndigit, decpt, sign, &ep, &dtoaresult); + + if (value == 0.0) { + /* +@@ -102,7 +108,13 @@ + static char *buf; + char *bufend; + char *ep; +- char *bp = __dtoa(value, 3, ndigit, decpt, sign, &ep); ++ char *bp; ++ static char *dtoaresult = NULL; ++ ++ free(dtoaresult); ++ dtoaresult = NULL; ++ ++ bp = __dtoa(value, 3, ndigit, decpt, sign, &ep, &dtoaresult); + + if (value == 0.0) { + /* + |