This is the mail archive of the java-patches@gcc.gnu.org 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]
Other format: [Raw text]

[gcjx] Patch: FYI: make gcj link


I'm checking this in on the gcjx branch.

This makes it so 'gcj' and 'jvgenmain' can be compiled and linked.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* jvgenmain.c: Include util.h, not jcf.h or java-tree.h.
	* mangle_name.c: Include util.h, not jcf.h or java-tree.h.
	* util.h: New file.

Index: jvgenmain.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jvgenmain.c,v
retrieving revision 1.35
diff -u -r1.35 jvgenmain.c
--- jvgenmain.c 10 Feb 2004 19:12:34 -0000 1.35
+++ jvgenmain.c 4 Apr 2005 00:53:17 -0000
@@ -1,5 +1,5 @@
 /* Program to generate "main" a Java(TM) class containing a main method.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -30,10 +30,9 @@
 #include "coretypes.h"
 #include "tm.h"
 #include "obstack.h"
-#include "jcf.h"
-#include "tree.h"
-#include "java-tree.h"
 #include "intl.h"
+#include "util.h"
+
 
 static char * do_mangle_classname (const char *string);
 
@@ -139,7 +138,6 @@
   return 0;
 }
 
-
 static char *
 do_mangle_classname (const char *string)
 {
Index: mangle_name.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/mangle_name.c,v
retrieving revision 1.10
diff -u -r1.10 mangle_name.c
--- mangle_name.c 12 Jan 2003 02:14:55 -0000 1.10
+++ mangle_name.c 4 Apr 2005 00:53:17 -0000
@@ -1,6 +1,6 @@
 /* Shared functions related to mangling names for the GNU compiler
    for the Java(TM) language.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -29,11 +29,9 @@
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "jcf.h"
-#include "tree.h"
-#include "java-tree.h"
 #include "obstack.h"
 #include "toplev.h"
+#include "util.h"
 
 static void append_unicode_mangled_name (const char *, int);
 #ifndef HAVE_AS_UTF8
Index: util.h
===================================================================
RCS file: util.h
diff -N util.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ util.h 4 Apr 2005 00:53:17 -0000
@@ -0,0 +1,47 @@
+/* util.h - C utilities for gcj.
+
+   Copyright (C) 2005
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  
+
+Java and all Java-based marks are trademarks or registered trademarks
+of Sun Microsystems, Inc. in the United States and other countries.
+The Free Software Foundation is independent of Sun Microsystems, Inc.  */
+
+#ifndef GCC_TREE_UTIL_H
+#define GCC_TREE_UTIL_H
+
+/* Extract a character from a Java-style Utf8 string.
+ * PTR points to the current character.
+ * LIMIT points to the end of the Utf8 string.
+ * PTR is incremented to point after the character that gets returned.
+ * On an error, -1 is returned. */
+#define UTF8_GET(PTR, LIMIT) \
+  ((PTR) >= (LIMIT) ? -1 \
+   : *(PTR) < 128 ? *(PTR)++ \
+   : (*(PTR)&0xE0) == 0xC0 && ((PTR)+=2)<=(LIMIT) && ((PTR)[-1]&0xC0) == 0x80 \
+   ? (((PTR)[-2] & 0x1F) << 6) + ((PTR)[-1] & 0x3F) \
+   : (*(PTR) & 0xF0) == 0xE0 && ((PTR) += 3) <= (LIMIT) \
+   && ((PTR)[-2] & 0xC0) == 0x80 && ((PTR)[-1] & 0xC0) == 0x80 \
+   ? (((PTR)[-3]&0x0F) << 12) + (((PTR)[-2]&0x3F) << 6) + ((PTR)[-1]&0x3F) \
+   : ((PTR)++, -1))
+
+extern void append_gpp_mangled_name (const char *name, int len);
+
+#endif /* GCC_TREE_UTIL_H */


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