Hi, On Wed, 2005-08-03 at 11:41 +0100, Andrew John Hughes wrote: > On Sun, 2005-07-24 at 16:41 +0100, Andrew John Hughes wrote: > > I've recently moved to a 64-bit architecture (x86_64) and yesterday I > > encountered some problems building the generics branch with ecj on kaffe > > and Debian GNU/Linux. Namely, the MIN_DOUBLE value is not recognised as > > valid. Using parseDouble on this value shows that the fdlibm > > implementation of strtod reports an underflow and 0 is returned. > > > > This lead to me finding the following post: > > > > http://lists.gnu.org/archive/html/classpath/2004-01/msg00057.html > > > > Applying this patch solves the problem and the right value is returned. > > Does anyone know what the state of this patch is, and why it wasn't > > applied? It does solve the problem in this case, but I don't know how > > it fares in general. Any comments, and testing on some other platforms > > would be much appreciated. > > > > FWIW, the conversion also works with the platform strtod, so this is > > also an option (although again I don't know how general this is, and it > > has been disabled for cases where KISSME_LINUX_USER is not defined).
The KISSME_LINUX_USER hack should be removed from our reference
implementation. If kissme needs a different VMDouble implementation then
it should provide one. I committed the following:
2005-08-24 Mark Wielaard <[EMAIL PROTECTED]>
* native/jni/java-lang/java_lang_VMDouble.c
(Java_java_lang_VMDouble_parseDouble): Remove KISSME_LINUX_USER hack.
I don't think strtod can be used in general since it isn't sure it
returns the wanted double on all platforms in all cases.
> Is there any update on this?
I believe everybody is too afraid of 64bit issues and fdlibm so nobody
feels like they can OK it. FWIW This is also the following bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22844
What would help is someone running mauve before and after this patch and
adding the results to that bug report.
Cheers,
Mark
--- native/jni/java-lang/java_lang_VMDouble.c 2 Jul 2005 20:32:55 -0000
1.10
+++ native/jni/java-lang/java_lang_VMDouble.c 24 Aug 2005 14:17:34 -0000
@@ -348,12 +348,7 @@
struct _Jv_reent reent;
memset (&reent, 0, sizeof reent);
-#ifdef KISSME_LINUX_USER
- /* FIXME: The libc strtod may not be reliable. */
- val = strtod (p, &endptr);
-#else
val = _strtod_r (&reent, p, &endptr);
-#endif
#ifdef DEBUG
fprintf (stderr, "java.lang.VMDouble.parseDouble val = %g\n", val);
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
