Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2006-09-07 02:03:16 +0400
committerDanny Smith <dannysmith@users.sourceforge.net>2006-09-07 02:03:16 +0400
commitab1d66234a0363009e2081c310ddeb9c211b9752 (patch)
tree42c1eb03afc42e6db4922d735ce62e2e0208124c /winsup/mingw/mingwex/gdtoa
parentd39002f9ca0725bbc4eed86bb5b98ae59b7296e8 (diff)
* mingwex/gdtoa/misc.c (pow5mult): Restore original code.
* mingwex/gdtoa/gdtoa.h. Add comment that files have been modified. * mingwex/gdtoa/gdtoaimp.h: Include system headers with <> brackets.
Diffstat (limited to 'winsup/mingw/mingwex/gdtoa')
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gdtoa.h4
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gdtoaimp.h10
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/misc.c25
3 files changed, 8 insertions, 31 deletions
diff --git a/winsup/mingw/mingwex/gdtoa/gdtoa.h b/winsup/mingw/mingwex/gdtoa/gdtoa.h
index f19d5a29c..285834b30 100755
--- a/winsup/mingw/mingwex/gdtoa/gdtoa.h
+++ b/winsup/mingw/mingwex/gdtoa/gdtoa.h
@@ -29,6 +29,9 @@ THIS SOFTWARE.
/* Please send bug reports to David M. Gay (dmg at acm dot org,
* with " at " changed at "@" and " dot " changed to "."). */
+/* Modified by Danny Smith for inclusion in libmingwex.a
+ Aug 2006 */
+
#ifndef GDTOA_H_INCLUDED
#define GDTOA_H_INCLUDED
@@ -108,7 +111,6 @@ extern char* __gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
int mode, int ndigits, int *decpt, char **rve));
extern void __freedtoa ANSI((char*));
-
extern int __strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
extern float __strtof ANSI((CONST char *, char **));
extern double __strtod ANSI((CONST char *, char **));
diff --git a/winsup/mingw/mingwex/gdtoa/gdtoaimp.h b/winsup/mingw/mingwex/gdtoa/gdtoaimp.h
index 9cdab6c16..b27524e7f 100755
--- a/winsup/mingw/mingwex/gdtoa/gdtoaimp.h
+++ b/winsup/mingw/mingwex/gdtoa/gdtoaimp.h
@@ -172,9 +172,9 @@ THIS SOFTWARE.
#define INFNAN_CHECK 1
#define MULTIPLE_THREADS 1
-
+
#ifdef DEBUG
-#include "stdio.h"
+#include <stdio.h>
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
#endif
@@ -235,7 +235,7 @@ extern Char *MALLOC ANSI((size_t));
#endif
#else /* ifndef Bad_float_h */
-#include "float.h"
+#include <float.h>
#endif /* Bad_float_h */
#ifdef IEEE_Arith
@@ -252,7 +252,7 @@ extern Char *MALLOC ANSI((size_t));
#endif
#ifndef __MATH_H__
-#include "math.h"
+#include <math.h>
#endif
#ifdef __cplusplus
@@ -479,7 +479,6 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t));
#define Bcopy(x,y) memcpy(&x->sign,&y->sign,y->wds*sizeof(ULong) + 2*sizeof(int))
#endif /* NO_STRING_H */
-
#ifdef __GNUC__
static inline int
__lo0bits_D2A (ULong *y)
@@ -513,7 +512,6 @@ __hi0bits_D2A (ULong y)
#define decrement __decrement_D2A
#define diff __diff_D2A
#define dtoa_result __dtoa_result_D2A
-#define g__fmt __g__fmt_D2A
#define gethex __gethex_D2A
#define hexdig __hexdig_D2A
#define hexnan __hexnan_D2A
diff --git a/winsup/mingw/mingwex/gdtoa/misc.c b/winsup/mingw/mingwex/gdtoa/misc.c
index a3010d9c2..784f900c2 100755
--- a/winsup/mingw/mingwex/gdtoa/misc.c
+++ b/winsup/mingw/mingwex/gdtoa/misc.c
@@ -36,7 +36,7 @@ THIS SOFTWARE.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#define NLOCKS 1
+#define NLOCKS 2
#ifdef USE_WIN32_SL
/* Use spin locks. */
@@ -111,15 +111,12 @@ static void dtoa_unlock(int n)
#endif /* __MINGW32__ */
-
#include "gdtoaimp.h"
-
#ifndef MULTIPLE_THREADS
char *dtoa_result;
#endif
-
static Bigint *freelist[Kmax+1];
#ifndef Omit_Private_Memory
#ifndef PRIVATE_MEM
@@ -460,25 +457,6 @@ mult
return c;
}
-#if 1
-/* Returns (*b) * (5**k). b is modified. */
-/* Re-written by Per Bothner to not need a static list. */
-
-Bigint *
-pow5mult(Bigint *b, int k)
-{
- static int p05[6] = { 5, 25, 125, 625, 3125, 15625 };
-
- for (; k > 6; k -= 6)
- multadd(b, 15625, 0); /* b *= 5**6 */
- if (k != 0)
- multadd(b, p05[k-1], 0);
- return b;
-}
-
-
-#else /* Original code */
-
static Bigint *p5s;
Bigint *
@@ -537,7 +515,6 @@ pow5mult
}
return b;
}
-#endif /* Original code */
Bigint *