This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: fdlibm build fixes & warnings fix


These math lib changes are required to build libgcj with the latest
compiler. I'm checking this in.

regards

  [ bryce ]


2000-12-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natMath.cc: Declare fabsf() function.
	* java/lang/mprec.h: Don't include math.h.
	* java/lang/dtoa.c: Include string.h.
	* java/lang/natString.cc (toLowerCase): Initialize ch to prevent
	compiler warning.

Index: java/lang/natMath.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natMath.cc,v
retrieving revision 1.5
diff -u -r1.5 natMath.cc
--- natMath.cc	2000/03/07 19:55:26	1.5
+++ natMath.cc	2000/12/02 00:21:57
@@ -27,6 +27,8 @@
 
 #include "fdlibm.h"
 
+extern "C" float fabsf (float);
+
 jdouble java::lang::Math::cos(jdouble x)
 {
   return (jdouble)::cos((double)x);
Index: java/lang/mprec.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/mprec.h,v
retrieving revision 1.5
diff -u -r1.5 mprec.h
--- mprec.h	2000/03/26 20:33:04	1.5
+++ mprec.h	2000/12/02 00:21:57
@@ -29,7 +29,7 @@
 #include <config.h>
 #include "ieeefp.h"
 
-#include <math.h>
+// #include <math.h>
 // #include <float.h>
 // #include <errno.h>
 
Index: java/lang/dtoa.c
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/dtoa.c,v
retrieving revision 1.2
diff -u -r1.2 dtoa.c
--- dtoa.c	1999/06/24 20:05:43	1.2
+++ dtoa.c	2000/12/02 00:21:58
@@ -27,6 +27,7 @@
  */
 
 #include "mprec.h"
+#include <string.h>
 
 static int
 _DEFUN (quorem,
Index: java/lang/natString.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natString.cc,v
retrieving revision 1.15
diff -u -r1.15 natString.cc
--- natString.cc	2000/11/18 02:29:13	1.15
+++ natString.cc	2000/12/02 00:21:58
@@ -768,7 +768,7 @@
 {
   jint i;
   jchar* chrs = JvGetStringChars(this);
-  jchar ch;
+  jchar ch = 0;
 
   bool handle_tr = false;
   if (locale != NULL)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]