From bb0f1a4bf19e4d2679cd4b634fa68daaf9d9aa81 Mon Sep 17 00:00:00 2001 From: Dirk Froemberg Date: Sun, 25 Feb 2001 20:48:14 +0000 Subject: Add a patch for the old and new __dtoa(). Submitted by: tegge PR: ports/25286 --- sysutils/cdrecord/files/patch-aj | 42 ++++++++++++++++++++++++++++++++++ sysutils/cdrtools-devel/files/patch-aj | 42 ++++++++++++++++++++++++++++++++++ sysutils/cdrtools/files/patch-aj | 42 ++++++++++++++++++++++++++++++++++ sysutils/mkisofs-devel/files/patch-aj | 42 ++++++++++++++++++++++++++++++++++ sysutils/mkisofs/files/patch-aj | 42 ++++++++++++++++++++++++++++++++++ 5 files changed, 210 insertions(+) create mode 100644 sysutils/cdrecord/files/patch-aj create mode 100644 sysutils/cdrtools-devel/files/patch-aj create mode 100644 sysutils/cdrtools/files/patch-aj create mode 100644 sysutils/mkisofs-devel/files/patch-aj create mode 100644 sysutils/mkisofs/files/patch-aj diff --git a/sysutils/cdrecord/files/patch-aj b/sysutils/cdrecord/files/patch-aj new file mode 100644 index 000000000000..fbc2f5ad3a22 --- /dev/null +++ b/sysutils/cdrecord/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 + + #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) { + /* + diff --git a/sysutils/cdrtools-devel/files/patch-aj b/sysutils/cdrtools-devel/files/patch-aj new file mode 100644 index 000000000000..fbc2f5ad3a22 --- /dev/null +++ b/sysutils/cdrtools-devel/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 + + #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) { + /* + diff --git a/sysutils/cdrtools/files/patch-aj b/sysutils/cdrtools/files/patch-aj new file mode 100644 index 000000000000..fbc2f5ad3a22 --- /dev/null +++ b/sysutils/cdrtools/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 + + #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) { + /* + diff --git a/sysutils/mkisofs-devel/files/patch-aj b/sysutils/mkisofs-devel/files/patch-aj new file mode 100644 index 000000000000..fbc2f5ad3a22 --- /dev/null +++ b/sysutils/mkisofs-devel/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 + + #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) { + /* + diff --git a/sysutils/mkisofs/files/patch-aj b/sysutils/mkisofs/files/patch-aj new file mode 100644 index 000000000000..fbc2f5ad3a22 --- /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 + + #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) { + /* + -- cgit v1.2.3