I'm committing the attached patch which fixes the Darwin build problem
highlighted by Chris, and adds in a number of casts missing from the
recent crypto changes.

Changelog:

2006-02-24  Andrew John Hughes  <[EMAIL PROTECTED]>

        * gnu/java/security/prng/BasePRNG.java:
        (clone()): Added cast of buffer to byte[].
        * gnu/javax/crypto/mac/TMMH16.java:
        (clone()): Fixed casting of cloned arrays.
        * native/fdlibm/fdlibm.h:
        Added missing defines from old fdlibm.h needed by Darwin.
        (GET_FLOAT_WORD(i,d)): Re-added.
        (SET_FLOAT_WORD(d,i)): Re-added.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Support OpenDocument instead. http://opendocumentfellowship.org

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

The views expressed above are representative of my own personal
opinions, and not necessarily those of the University of Sheffield.
-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint)
attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

If you use Microsoft Office, support movement towards the end of vendor
lock-in:
http://opendocumentfellowship.org/petition/

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Index: gnu/java/security/prng/BasePRNG.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/security/prng/BasePRNG.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 BasePRNG.java
--- gnu/java/security/prng/BasePRNG.java	24 Feb 2006 11:14:23 -0000	1.2
+++ gnu/java/security/prng/BasePRNG.java	24 Feb 2006 16:21:47 -0000
@@ -188,7 +188,7 @@ public abstract class BasePRNG implement
   {
     BasePRNG result = (BasePRNG) super.clone();
     if (this.buffer != null)
-      result.buffer = this.buffer.clone();
+      result.buffer = (byte[]) this.buffer.clone();
 
     return result;
   }
Index: gnu/javax/crypto/mac/TMMH16.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/javax/crypto/mac/TMMH16.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 TMMH16.java
--- gnu/javax/crypto/mac/TMMH16.java	24 Feb 2006 11:14:23 -0000	1.2
+++ gnu/javax/crypto/mac/TMMH16.java	24 Feb 2006 16:21:48 -0000
@@ -281,16 +281,16 @@ public class TMMH16 extends BaseMac impl
       result.keystream = (IRandom) this.keystream.clone();
 
     if (this.prefix != null)
-      result.prefix = this.prefix.clone();
+      result.prefix = (byte[]) this.prefix.clone();
 
     if (this.context != null)
-      result.context = this.context.clone();
+      result.context = (int[]) this.context.clone();
 
     if (this.K0 != null)
-      result.K0 = this.K0.clone();
+      result.K0 = (int[]) this.K0.clone();
 
     if (this.Ki != null)
-      result.Ki = this.Ki.clone();
+      result.Ki = (int[]) this.Ki.clone();
 
     return result;
   }
@@ -399,4 +399,4 @@ public class TMMH16 extends BaseMac impl
         context[i] = (int) t;
       }
   }
-}
\ No newline at end of file
+}
Index: native/fdlibm/fdlibm.h
===================================================================
RCS file: /sources/classpath/classpath/native/fdlibm/fdlibm.h,v
retrieving revision 1.10
diff -u -3 -p -u -r1.10 fdlibm.h
--- native/fdlibm/fdlibm.h	23 Feb 2006 16:16:20 -0000	1.10
+++ native/fdlibm/fdlibm.h	24 Feb 2006 16:21:48 -0000
@@ -248,6 +248,33 @@ extern double __kernel_cos __P((double,d
 extern double __kernel_tan __P((double,double,int));
 extern int    __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));
 
+/* A union which permits us to convert between a float and a 32 bit
+   int.  */
+
+typedef union
+{
+  float value;
+  uint32_t word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
 #ifdef __cplusplus
 }
 #endif

Reply via email to