* replaced broken bsd-inherited implementation of strtod() with the glibc

version that lives in our repo, too, and actually works as intended
* removed the broken strtod() implementation from the repo
This fixes all floating-point test regressions reported in #3308.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31919 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2009-07-29 16:03:14 +00:00
parent 9d72a129c6
commit 4f86db4973
4 changed files with 26 additions and 2372 deletions
@@ -4,8 +4,11 @@ SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdlib ;
SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;
SubDirCcFlags -D_GNU_SOURCE -DUSE_IN_LIBIO ;
MergeObject posix_gnu_stdlib.o :
drand48.c
drand48_r.c
@@ -32,6 +35,8 @@ MergeObject posix_gnu_stdlib.o :
seed48_r.c
srand48.c
srand48_r.c
strtod.c
strtof.c
wcstombs.c
wctomb.c
;
+20 -5
View File
@@ -50,7 +50,7 @@
} while (0)
#endif
/* End of configuration part. */
#include <ctype.h>
#include <errno.h>
#include <float.h>
@@ -129,7 +129,7 @@
# define ISDIGIT(Ch) isdigit (Ch)
# define ISXDIGIT(Ch) isxdigit (Ch)
# define TOLOWER(Ch) tolower (Ch)
# define STRNCASECMP(S1, S2, N) __strncasecmp ((S1), (S2), (N))
# define STRNCASECMP(S1, S2, N) strncasecmp ((S1), (S2), (N))
# define STRTOULL(S, E, B) __strtoull_internal ((S), (E), 0, (B))
# endif
#endif
@@ -150,7 +150,7 @@
/* Function to construct a floating point number from an MP integer
containing the fraction bits, a base 2 exponent, and a sign flag. */
extern FLOAT MPN2FLOAT (mp_srcptr mpn, int exponent, int negative);
/* Definitions according to limb size used. */
#if BITS_PER_MP_LIMB == 32
# define MAX_DIG_PER_LIMB 9
@@ -179,7 +179,7 @@ static const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1] =
#error "Need to expand tens_in_limb table to" MAX_DIG_PER_LIMB
#endif
};
#ifndef howmany
#define howmany(x,y) (((x)+((y)-1))/(y))
#endif
@@ -1560,7 +1560,7 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM)
/* NOTREACHED */
}
/* External user entry point. */
FLOAT
@@ -1574,3 +1574,18 @@ STRTOF (nptr, endptr LOCALE_PARAM)
{
return INTERNAL (STRTOF) (nptr, endptr, 0 LOCALE_PARAM);
}
// XXX this is not correct
long double __strtold_internal(const char *number, char **_end, int group);
long double
#ifdef weak_function
weak_function
#endif
__strtold_internal(const char *number, char **_end, int group)
{
return __strtod_internal(number, _end, group);
}
+1 -1
View File
@@ -21,7 +21,7 @@ MergeObject posix_stdlib.o :
rand.c
random.c
realpath.cpp
strtod.c
# strtod.c
strtol.c
strtoll.c
strtoul.c
File diff suppressed because it is too large Load Diff