* 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.
This commit is contained in:
Danny Smith 2006-09-06 22:03:16 +00:00
parent d39002f9ca
commit ab1d66234a
4 changed files with 14 additions and 31 deletions

View File

@ -1,3 +1,9 @@
2006-09-06 Danny Smith <dannysmith@users.sourceforge.net>
* 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.
2006-09-01 Danny Smith <dannysmith@users.sourceforge.net>
* mingwex/gdtoa/(arithchk.c, dmisc.c, dtoa.c, g__fmt.c, g_dfmt.c,

View File

@ -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 **));

View File

@ -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

View File

@ -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 *