Index: native/fdlibm/e_pow.c =================================================================== RCS file: /cvsroot/classpath/classpath/native/fdlibm/e_pow.c,v retrieving revision 1.3 diff -u -b -B -r1.3 e_pow.c --- native/fdlibm/e_pow.c 29 Mar 2004 07:07:26 -0000 1.3 +++ native/fdlibm/e_pow.c 19 May 2004 12:02:40 -0000 @@ -179,7 +179,7 @@ } /* (x<0)**(non-int) is NaN */ - /* CYGNUS LOCAL: This used to be + /* GCJ LOCAL: This used to be if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x); but ANSI C says a right shift of a signed negative quantity is implementation defined. */ Index: native/fdlibm/fdlibm.h =================================================================== RCS file: /cvsroot/classpath/classpath/native/fdlibm/fdlibm.h,v retrieving revision 1.5 diff -u -b -B -r1.5 fdlibm.h --- native/fdlibm/fdlibm.h 29 Mar 2004 07:07:26 -0000 1.5 +++ native/fdlibm/fdlibm.h 19 May 2004 12:02:40 -0000 @@ -22,7 +22,7 @@ #include #include -/* CYGNUS LOCAL: Include files. */ +/* GCJ LOCAL: Include files. */ #include "ieeefp.h" #include "mprec.h" Index: native/fdlibm/ieeefp.h =================================================================== RCS file: /cvsroot/classpath/classpath/native/fdlibm/ieeefp.h,v retrieving revision 1.3 diff -u -b -B -r1.3 ieeefp.h --- native/fdlibm/ieeefp.h 10 Jan 2003 16:49:15 -0000 1.3 +++ native/fdlibm/ieeefp.h 19 May 2004 12:02:40 -0000 @@ -8,11 +8,23 @@ #define __IEEE_LITTLE_ENDIAN #endif -#ifdef __arm__ -/* ARM always has big-endian words. Within those words the byte ordering - appears to be big or little endian. Newlib doesn't seem to care about - the byte ordering within words. */ +#if defined(__arm__) || defined(__thumb__) +/* ARM traditionally used big-endian words; and within those words the + byte ordering was big or little endian depending upon the target. + Modern floating-point formats are naturally ordered; in this case + __VFP_FP__ will be defined, even if soft-float. */ +#ifdef __VFP_FP__ +#ifdef __ARMEL__ +#define __IEEE_LITTLE_ENDIAN +#else +#define __IEEE_BIG_ENDIAN +#endif +#else #define __IEEE_BIG_ENDIAN +#ifdef __ARMEL__ +#define __IEEE_BYTES_LITTLE_ENDIAN +#endif +#endif #endif #ifdef __hppa__ @@ -59,6 +71,10 @@ #define __IEEE_LITTLE_ENDIAN #endif +#ifdef __x86_64__ +#define __IEEE_LITTLE_ENDIAN +#endif + #ifdef __i960__ #define __IEEE_LITTLE_ENDIAN #endif @@ -71,10 +87,6 @@ #define __IEEE_BIG_ENDIAN #endif -#ifdef __s390__ -#define __IEEE_BIG_ENDIAN -#endif - #ifdef __pj__ #ifdef __pjl__ #define __IEEE_LITTLE_ENDIAN @@ -103,8 +115,9 @@ #define __IEEE_LITTLE_ENDIAN #endif -#if (defined( __PPC__ ) || defined( _POWER )) -#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) +#if defined (__PPC__) || defined (__ppc__) +#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) \ + || defined (__APPLE__) #define __IEEE_BIG_ENDIAN #else #if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(__WIN32__) && __WIN32__) @@ -128,6 +141,10 @@ #else #define __IEEE_LITTLE_ENDIAN #endif +#endif + +#ifdef __s390__ +#define __IEEE_BIG_ENDIAN #endif #ifndef __IEEE_BIG_ENDIAN Index: native/fdlibm/mprec.c =================================================================== RCS file: /cvsroot/classpath/classpath/native/fdlibm/mprec.c,v retrieving revision 1.3 diff -u -b -B -r1.3 mprec.c --- native/fdlibm/mprec.c 29 Mar 2004 07:07:26 -0000 1.3 +++ native/fdlibm/mprec.c 19 May 2004 12:02:40 -0000 @@ -296,7 +296,7 @@ { k++; x >>= 1; - if (!x & 1) + if (!(x & 1)) return 32; } *y = x; Index: native/fdlibm/w_exp.c =================================================================== RCS file: /cvsroot/classpath/classpath/native/fdlibm/w_exp.c,v retrieving revision 1.3 diff -u -b -B -r1.3 w_exp.c --- native/fdlibm/w_exp.c 29 Mar 2004 07:07:26 -0000 1.3 +++ native/fdlibm/w_exp.c 19 May 2004 12:02:40 -0000 @@ -65,6 +65,8 @@ #ifndef _DOUBLE_IS_32BITS +#ifndef _IEEE_LIBM + #ifdef __STDC__ static const double #else @@ -72,6 +74,8 @@ #endif o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ + +#endif #ifdef __STDC__ double exp(double x) /* wrapper exp */