This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Error building libgcj on HP 10.20
- To: "'David Scott Urban" <urban at ast dot lmco dot com>
- Subject: Re: Error building libgcj on HP 10.20
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Fri, 07 Jan 2000 17:47:27 -0500
- CC: java-discuss at sourceware dot cygnus dot com
- Organization: AppNet
- References: <200001072135.OAA15456@spica.ast.lmco.com>
David Scott Urban wrote:
> The patch did not work. I am still getting the same error.
OK. I don't have a HP/UX machine here to test with, so I was guessing a
little. This time I put the "inline pow(double, int)" into my math.h so
I can duplicate the error.
I discovered that fdlibm.h does the same thing, wrapping the includes
into a extern "C" block. Both files are patched below. This should
work on a fresh libgcj tree:
Index: fdlibm.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/fdlibm.h,v
retrieving revision 1.2
diff -u -r1.2 fdlibm.h
--- fdlibm.h 1999/06/24 20:41:47 1.2
+++ fdlibm.h 2000/01/07 22:02:10
@@ -12,10 +12,6 @@
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <config.h>
#include <stdlib.h>
Index: mprec.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/mprec.h,v
retrieving revision 1.3
diff -u -r1.3 mprec.h
--- mprec.h 1999/07/12 09:40:07 1.3
+++ mprec.h 2000/01/07 22:04:26
@@ -26,9 +26,6 @@
dmg@research.att.com or research!dmg
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
#include <config.h>
#include "ieeefp.h"
@@ -51,6 +48,9 @@
#include <sys/config.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
/* ISO C9X int type declarations */
@@ -47,6 +43,10 @@
/* These typedefs are true for the targets running Java. */
#define _IEEE_LIBM
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
* ANSI/POSIX
--
Jeff Sturm
jsturm@sigma6.com