From 5e25b6c0051d1080d65f763ab41fdd3ccf4c0266 Mon Sep 17 00:00:00 2001 From: tromey Date: Fri, 10 Sep 1999 22:03:10 +0000 Subject: * configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29278 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 36 +++ libjava/Makefile.am | 21 +- libjava/Makefile.in | 97 ++++---- libjava/boehm.cc | 6 +- libjava/classes.pl | 4 +- libjava/configure | 4 +- libjava/configure.in | 2 +- libjava/defineclass.cc | 4 +- libjava/exception.cc | 2 +- libjava/gcj/Makefile.am | 6 + libjava/gcj/Makefile.in | 269 ++++++++++++++++++++++ libjava/gcj/array.h | 77 +++++++ libjava/gcj/cni.h | 132 +++++++++++ libjava/gcj/field.h | 169 ++++++++++++++ libjava/gcj/javaprims.h | 306 +++++++++++++++++++++++++ libjava/gcj/method.h | 21 ++ libjava/gij.cc | 2 +- libjava/gnu/gcj/convert/natInput_EUCJIS.cc | 2 +- libjava/gnu/gcj/convert/natInput_SJIS.cc | 2 +- libjava/gnu/gcj/convert/natOutput_EUCJIS.cc | 2 +- libjava/gnu/gcj/convert/natOutput_SJIS.cc | 2 +- libjava/include/Makefile.am | 7 + libjava/include/Makefile.in | 253 ++++++++++++++++++++ libjava/include/cni.h | 133 ----------- libjava/include/java-array.h | 77 ------- libjava/include/java-cpool.h | 2 +- libjava/include/java-field.h | 169 -------------- libjava/include/java-interp.h | 2 - libjava/include/java-method.h | 16 -- libjava/include/javaprims.h | 306 ------------------------- libjava/include/jni.h | 8 +- libjava/include/jvm.h | 12 +- libjava/interpret.cc | 2 - libjava/java/awt/natToolkit.cc | 2 +- libjava/java/io/natFile.cc | 2 +- libjava/java/io/natFileDescriptorEcos.cc | 2 +- libjava/java/io/natFileDescriptorPosix.cc | 2 +- libjava/java/lang/Class.h | 2 +- libjava/java/lang/Object.h | 5 +- libjava/java/lang/natCharacter.cc | 2 +- libjava/java/lang/natClass.cc | 2 +- libjava/java/lang/natClassLoader.cc | 8 +- libjava/java/lang/natDouble.cc | 2 +- libjava/java/lang/natEcosProcess.cc | 2 +- libjava/java/lang/natFirstThread.cc | 2 +- libjava/java/lang/natMath.cc | 2 +- libjava/java/lang/natObject.cc | 2 +- libjava/java/lang/natPosixProcess.cc | 2 +- libjava/java/lang/natRuntime.cc | 2 +- libjava/java/lang/natString.cc | 2 +- libjava/java/lang/natSystem.cc | 2 +- libjava/java/lang/natThread.cc | 4 +- libjava/java/lang/reflect/natArray.cc | 2 +- libjava/java/lang/reflect/natField.cc | 2 - libjava/java/lang/reflect/natMethod.cc | 5 +- libjava/java/net/natInetAddress.cc | 2 +- libjava/java/net/natPlainDatagramSocketImpl.cc | 2 +- libjava/java/net/natPlainSocketImpl.cc | 4 +- libjava/java/text/natCollator.cc | 2 +- libjava/java/util/natDate.cc | 2 +- libjava/java/util/natGregorianCalendar.cc | 2 +- libjava/java/util/zip/natDeflater.cc | 2 +- libjava/java/util/zip/natInflater.cc | 2 +- libjava/jni.cc | 2 +- libjava/no-threads.cc | 2 +- libjava/nogc.cc | 2 +- libjava/posix-threads.cc | 2 +- libjava/prims.cc | 5 +- libjava/quick-threads.cc | 2 +- libjava/resolve.cc | 4 +- 70 files changed, 1416 insertions(+), 832 deletions(-) create mode 100644 libjava/gcj/Makefile.am create mode 100644 libjava/gcj/Makefile.in create mode 100644 libjava/gcj/array.h create mode 100644 libjava/gcj/cni.h create mode 100644 libjava/gcj/field.h create mode 100644 libjava/gcj/javaprims.h create mode 100644 libjava/gcj/method.h create mode 100644 libjava/include/Makefile.am create mode 100644 libjava/include/Makefile.in delete mode 100644 libjava/include/cni.h delete mode 100644 libjava/include/java-array.h delete mode 100644 libjava/include/java-field.h delete mode 100644 libjava/include/java-method.h delete mode 100644 libjava/include/javaprims.h diff --git a/libjava/ChangeLog b/libjava/ChangeLog index edb4d0cfa11..aae7e2841e6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,39 @@ +1999-09-10 Tom Tromey + + * configure: Rebuilt. + * configure.in: Build include/Makefile. + * Makefile.in: Rebuilt. + * Makefile.am (SUBDIRS): Added gcj and include. + (install-data-local): New target. + (extra_headers): New macro. + * include/Makefile.in: New file. + * include/Makefile.am: New file. + + * interpret.cc: Don't include gcj/field.h or gcj/cni.h. + * java/lang/reflect/natField.cc: Don't include gcj/field.h or + gcj/cni.h. + * boehm.cc: Don't include java-threads.h or gcj/field.h. + * resolve.cc: Include config.h. + * defineclass.cc: Include config.h. + * include/java-interp.h: Don't include config.h. + * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, + cni.h. + + * gcj/javaprims.h: Regenerated namespace decls. + * classes.pl (scan): Don't put `;' after closing brace. + + * Makefile.in: Rebuilt. + * Makefile.am (INCLUDES): Added -I for top_srcdir. + * configure.in: Create gcj/Makefile. + * gcj/Makefile.in: New file. + * gcj/Makefile.am: New file. + * java/lang/Object.h: Don't include any other headers. + * gcj/array.h: Renamed from include/java-array.h. + * gcj/field.h: Renamed from include/java-field.h. + * gcj/method.h: Renamed from include/java-method.h. + * gcj/cni.h, gcj/javaprims.h: Moved from include/. + Updated all files to reflect new include structure. + 1999-09-09 Tom Tromey * configure: Rebuilt. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index e61f6a3b6f8..bb267eff92b 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -3,7 +3,9 @@ AUTOMAKE_OPTIONS = foreign no-installinfo if TESTSUBDIR -SUBDIRS = testsuite +SUBDIRS = testsuite gcj include +else +SUBDIRS = gcj include endif ## ################################################################ @@ -79,7 +81,8 @@ JC1FLAGS = -g @LIBGCJ_JAVAFLAGS@ LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I../libffi/include -INCLUDES = -Iinclude -I$(top_srcdir)/include $(GCINCS) $(THREADINCS) \ +INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \ + $(GCINCS) $(THREADINCS) \ $(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS) DIVIDESPEC = @DIVIDESPEC@ @@ -248,6 +251,20 @@ gnu/gcj/runtime/MethodInvocation.h: gnu/gcj/runtime/MethodInvocation.class libgc -friend 'class _Jv_InterpMethod;' \ $(basename $<) +## Headers we maintain by hand and which we want to install. +extra_headers = java/lang/Object.h java/lang/Class.h + +## Install the headers. It is fairly ugly that we have to do this by +## hand. +install-data-local: + $(PRE_INSTALL) + @for f in $(nat_headers) $(extra_headers); do \ + d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ + $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ + if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$$f"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$$f; \ + done ## ################################################################ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 0921214dc1f..5d71b3d00a2 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -105,9 +105,10 @@ here = @here@ libgcj_basedir = @libgcj_basedir@ AUTOMAKE_OPTIONS = foreign no-installinfo - @TESTSUBDIR_TRUE@SUBDIRS = \ -@TESTSUBDIR_TRUE@testsuite +@TESTSUBDIR_TRUE@testsuite gcj include +@TESTSUBDIR_FALSE@SUBDIRS = \ +@TESTSUBDIR_FALSE@gcj include @USE_LIBDIR_TRUE@toolexeclibdir = \ @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR) @USE_LIBDIR_FALSE@toolexeclibdir = \ @@ -158,7 +159,8 @@ JC1FLAGS = -g @LIBGCJ_JAVAFLAGS@ LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I../libffi/include -INCLUDES = -Iinclude -I$(top_srcdir)/include $(GCINCS) $(THREADINCS) \ +INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \ + $(GCINCS) $(THREADINCS) \ $(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS) @@ -197,6 +199,8 @@ nat_headers = $(ordinary_java_source_files:.java=.h) \ $(built_java_source_files:.java=.h) +extra_headers = java/lang/Object.h java/lang/Class.h + NM = nm @NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = \ @@ -705,15 +709,14 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DATA = $(data_DATA) $(toolexeclib_DATA) DIST_COMMON = COPYING.LIB ChangeLog Makefile.am Makefile.in NEWS THANKS \ -acconfig.h acinclude.m4 aclocal.m4 configure configure.in \ -include/config.h.in include/stamp-h.in libgcj.spec.in +acinclude.m4 aclocal.m4 configure configure.in libgcj.spec.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best -DIST_SUBDIRS = testsuite +DIST_SUBDIRS = testsuite gcj include gcj include DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ .deps/$(srcdir)/$(CONVERT_DIR)/make-trie.P .deps/boehm.P \ .deps/defineclass.P .deps/exception.P .deps/gij.P \ @@ -928,34 +931,6 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) - -include/config.h: include/stamp-h - @if test ! -f $@; then \ - rm -f include/stamp-h; \ - $(MAKE) include/stamp-h; \ - else :; fi -include/stamp-h: $(srcdir)/include/config.h.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES= CONFIG_HEADERS=include/config.h \ - $(SHELL) ./config.status - @echo timestamp > include/stamp-h 2> /dev/null -$(srcdir)/include/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/include/stamp-h.in - @if test ! -f $@; then \ - rm -f $(srcdir)/include/stamp-h.in; \ - $(MAKE) $(srcdir)/include/stamp-h.in; \ - else :; fi -$(srcdir)/include/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h - cd $(top_srcdir) && $(AUTOHEADER) - @echo timestamp > $(srcdir)/include/stamp-h.in 2> /dev/null - -mostlyclean-hdr: - -clean-hdr: - -distclean-hdr: - -rm -f include/config.h - -maintainer-clean-hdr: libgcj.spec: $(top_builddir)/config.status libgcj.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -1324,7 +1299,7 @@ install-exec-am: install-toolexeclibLTLIBRARIES install-binPROGRAMS \ install-toolexeclibDATA install-exec: install-exec-recursive -install-data-am: install-dataDATA +install-data-am: install-dataDATA install-data-local install-data: install-data-recursive install-am: all-am @@ -1354,32 +1329,29 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-hdr mostlyclean-toolexeclibLTLIBRARIES \ - mostlyclean-compile mostlyclean-libtool \ - mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \ - mostlyclean-tags mostlyclean-depend mostlyclean-generic +mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \ + mostlyclean-libtool mostlyclean-binPROGRAMS \ + mostlyclean-noinstPROGRAMS mostlyclean-tags \ + mostlyclean-depend mostlyclean-generic mostlyclean: mostlyclean-recursive -clean-am: clean-hdr clean-toolexeclibLTLIBRARIES clean-compile \ - clean-libtool clean-binPROGRAMS clean-noinstPROGRAMS \ - clean-tags clean-depend clean-generic mostlyclean-am \ - clean-local +clean-am: clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \ + clean-binPROGRAMS clean-noinstPROGRAMS clean-tags \ + clean-depend clean-generic mostlyclean-am clean-local clean: clean-recursive -distclean-am: distclean-hdr distclean-toolexeclibLTLIBRARIES \ - distclean-compile distclean-libtool \ - distclean-binPROGRAMS distclean-noinstPROGRAMS \ - distclean-tags distclean-depend distclean-generic \ - clean-am +distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \ + distclean-libtool distclean-binPROGRAMS \ + distclean-noinstPROGRAMS distclean-tags \ + distclean-depend distclean-generic clean-am -rm -f libtool distclean: distclean-recursive -rm -f config.status -maintainer-clean-am: maintainer-clean-hdr \ - maintainer-clean-toolexeclibLTLIBRARIES \ +maintainer-clean-am: maintainer-clean-toolexeclibLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-binPROGRAMS \ maintainer-clean-noinstPROGRAMS maintainer-clean-tags \ @@ -1391,9 +1363,9 @@ maintainer-clean-am: maintainer-clean-hdr \ maintainer-clean: maintainer-clean-recursive -rm -f config.status -.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ -mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \ -clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \ +.PHONY: mostlyclean-toolexeclibLTLIBRARIES \ +distclean-toolexeclibLTLIBRARIES clean-toolexeclibLTLIBRARIES \ +maintainer-clean-toolexeclibLTLIBRARIES \ uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ @@ -1412,10 +1384,11 @@ distclean-tags clean-tags maintainer-clean-tags distdir \ mostlyclean-depend distclean-depend clean-depend \ maintainer-clean-depend info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-info-am install-info \ -install-exec-am install-exec install-data-am install-data install-am \ -install uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +install-exec-am install-exec install-data-local install-data-am \ +install-data install-am install uninstall-am uninstall all-redirect \ +all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean $(java_source_files:.java=.class): libgcj.zip @@ -1506,6 +1479,16 @@ gnu/gcj/runtime/MethodInvocation.h: gnu/gcj/runtime/MethodInvocation.class libgc -friend 'class _Jv_InterpMethod;' \ $(basename $<) +install-data-local: + $(PRE_INSTALL) + @for f in $(nat_headers) $(extra_headers); do \ + d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \ + $(mkinstalldirs) $(DESTDIR)$(includedir)/$$d; \ + if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$$f"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$$f; \ + done + maintainer-check: libgcj.la $(NM) .libs/libgcj.a | grep ' T ' \ | grep -v '4java' \ diff --git a/libjava/boehm.cc b/libjava/boehm.cc index 8d1e97442e9..b300c37c860 100644 --- a/libjava/boehm.cc +++ b/libjava/boehm.cc @@ -12,10 +12,10 @@ details. */ #include -#include -#include #include -#include +#include + +#include #include // More nastiness: the GC wants to define TRUE and FALSE. We don't diff --git a/libjava/classes.pl b/libjava/classes.pl index 35da03ef1a0..5a19a5e009f 100644 --- a/libjava/classes.pl +++ b/libjava/classes.pl @@ -10,7 +10,7 @@ # details. # Usage: cd ; perl classes.pl. -# Can also be run from the `include' directory; this lets us +# Can also be run from the `gcj' directory; this lets us # more easily insert the output into javaprims.h (which is where it goes). use DirHandle; @@ -100,5 +100,5 @@ sub scan &scan ("$dir/$_", $indent + 2); } - print $spaces, "};\n"; + print $spaces, "}\n"; } diff --git a/libjava/configure b/libjava/configure index 58f884e32b8..5eeecafa379 100755 --- a/libjava/configure +++ b/libjava/configure @@ -5411,7 +5411,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile libgcj.spec testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/libjava/configure.in b/libjava/configure.in index 30456e11ab4..7932d8ca464 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -624,7 +624,7 @@ fi here=`pwd` AC_SUBST(here) -AC_OUTPUT(Makefile libgcj.spec testsuite/Makefile, +AC_OUTPUT(Makefile libgcj.spec gcj/Makefile include/Makefile testsuite/Makefile, [if test -n "$CONFIG_FILES"; then ac_file=Makefile . ${libgcj_basedir}/../config-ml.in fi], diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index d1b2be046d7..d096bfa159c 100644 --- a/libjava/defineclass.cc +++ b/libjava/defineclass.cc @@ -18,12 +18,14 @@ details. */ currently being ignored ("InnerClasses", "LineNumber", etc...). */ +#include + #include #ifdef INTERPRETER #include -#include +#include #include #include diff --git a/libjava/exception.cc b/libjava/exception.cc index 9a0c79628fc..b1eb690d388 100644 --- a/libjava/exception.cc +++ b/libjava/exception.cc @@ -15,7 +15,7 @@ details. */ #include #include -#include +#include #include // eh-common.h needs gansidecl.h. diff --git a/libjava/gcj/Makefile.am b/libjava/gcj/Makefile.am new file mode 100644 index 00000000000..35fc7eec67e --- /dev/null +++ b/libjava/gcj/Makefile.am @@ -0,0 +1,6 @@ +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = foreign no-installinfo + +gcjdir = $(includedir)/gcj +gcj_HEADERS = array.h cni.h field.h javaprims.h method.h diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in new file mode 100644 index 00000000000..b74bff6b8b5 --- /dev/null +++ b/libjava/gcj/Makefile.in @@ -0,0 +1,269 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ +AR = @AR@ +AS = @AS@ +CC = @CC@ +COMPPATH = @COMPPATH@ +CPP = @CPP@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DIVIDESPEC = @DIVIDESPEC@ +DLLTOOL = @DLLTOOL@ +EH_COMMON_INCLUDE = @EH_COMMON_INCLUDE@ +EXEEXT = @EXEEXT@ +GCDEPS = @GCDEPS@ +GCINCS = @GCINCS@ +GCLIBS = @GCLIBS@ +GCOBJS = @GCOBJS@ +GCSPEC = @GCSPEC@ +LD = @LD@ +LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@ +LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@ +LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NM = @NM@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SYSTEMSPEC = @SYSTEMSPEC@ +THREADDEPS = @THREADDEPS@ +THREADINCS = @THREADINCS@ +THREADLIBS = @THREADLIBS@ +THREADOBJS = @THREADOBJS@ +THREADSPEC = @THREADSPEC@ +USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ +VERSION = @VERSION@ +ZDEPS = @ZDEPS@ +ZINCS = @ZINCS@ +ZLIBS = @ZLIBS@ +ZLIBSPEC = @ZLIBSPEC@ +here = @here@ +libgcj_basedir = @libgcj_basedir@ + +AUTOMAKE_OPTIONS = foreign no-installinfo + +gcjdir = $(includedir)/gcj +gcj_HEADERS = array.h cni.h field.h javaprims.h method.h +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = ../include/config.h +CONFIG_CLEAN_FILES = +HEADERS = $(gcj_HEADERS) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign gcj/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-gcjHEADERS: $(gcj_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(gcjdir) + @list='$(gcj_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(gcjdir)/$$p"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(gcjdir)/$$p; \ + done + +uninstall-gcjHEADERS: + @$(NORMAL_UNINSTALL) + list='$(gcj_HEADERS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(gcjdir)/$$p; \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = gcj + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign gcj/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-info-am: +install-info: install-info-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: install-gcjHEADERS +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-gcjHEADERS +uninstall: uninstall-am +all-am: Makefile $(HEADERS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(gcjdir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-tags distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: uninstall-gcjHEADERS install-gcjHEADERS tags mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-info-am \ +install-info install-exec-am install-exec install-data-am install-data \ +install-am install uninstall-am uninstall all-redirect all-am all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libjava/gcj/array.h b/libjava/gcj/array.h new file mode 100644 index 00000000000..cd419d708f0 --- /dev/null +++ b/libjava/gcj/array.h @@ -0,0 +1,77 @@ +// array.h - Header file for CNI arrays. -*- c++ -*- + +/* Copyright (C) 1998, 1999 Cygnus Solutions + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#ifndef __GCJ_ARRAY_H__ +#define __GCJ_ARRAY_H__ + +#pragma interface + +#include + +extern "Java" { + +class __JArray : public java::lang::Object +{ +public: + int length; + friend jsize JvGetArrayLength (__JArray*); +}; + +template +class JArray : public __JArray +{ + T data[0]; +public: + friend T* elements<>(JArray& x); + friend T* elements<>(JArray* x); + // T* getData() { return data; } + // T& operator[](jint i) { return data[i]; } +}; + +template +T* elements(JArray& x) { return x.data; } +template +T* elements(JArray* x) { return x->data; } + +}; // end extern "Java" + +/* These typesdefs match those in JNI. */ +typedef __JArray *jarray; +typedef JArray *jobjectArray; +typedef JArray *jbooleanArray; +typedef JArray *jbyteArray; +typedef JArray *jcharArray; +typedef JArray *jshortArray; +typedef JArray *jintArray; +typedef JArray *jlongArray; +typedef JArray *jfloatArray; +typedef JArray *jdoubleArray; +typedef JArray *jstringArray; + +extern "C" jbooleanArray JvNewBooleanArray (jint length); +extern "C" jbyteArray JvNewByteArray (jint length); +extern "C" jcharArray JvNewCharArray (jint length); +extern "C" jshortArray JvNewShortArray (jint length); +extern "C" jintArray JvNewIntArray (jint length); +extern "C" jlongArray JvNewLongArray (jint length); +extern "C" jfloatArray JvNewFloatArray (jint length); +extern "C" jdoubleArray JvNewDoubleArray (jint length); +extern "C" jobjectArray _Jv_NewObjectArray(jsize length, jclass, jobject init); + +inline jobjectArray JvNewObjectArray (jsize length, jclass cls, jobject init) +{ return _Jv_NewObjectArray (length, cls, init); } + +extern "C" jstringArray JvConvertArgv(int argc, const char **argv); +extern "C" void JvRunMain (jclass klass, int argc, const char **argv); +void _Jv_RunMain (const char* name, int argc, const char **argv); + +inline jsize JvGetArrayLength (jarray array) { return array->length; } + +#endif /* __GCJ_ARRAY_H__ */ diff --git a/libjava/gcj/cni.h b/libjava/gcj/cni.h new file mode 100644 index 00000000000..2cdd5454551 --- /dev/null +++ b/libjava/gcj/cni.h @@ -0,0 +1,132 @@ +// gcj/cni.h -*- c++ -*- +// This file describes the Cygnus Native Interface, CNI. +// It provides a nicer interface to many of the things in gcj/javaprims.h. + +/* Copyright (C) 1998, 1999 Cygnus Solutions + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#ifndef __GCJ_CNI_H__ +#define __GCJ_CNI_H__ + +#include +#include + +#include + +extern inline jobject +JvAllocObject (jclass cls) +{ + return _Jv_AllocObject (cls, cls->size()); +} + +extern inline jobject +JvAllocObject (jclass cls, jsize sz) +{ + return _Jv_AllocObject (cls, sz); +} + +extern "C" jstring _Jv_NewStringUTF (const char *bytes); +extern "C" void _Jv_InitClass (jclass); + +extern inline void +JvInitClass (jclass cls) +{ + return _Jv_InitClass (cls); +} + +extern inline jstring +JvAllocString (jsize sz) +{ + return _Jv_AllocString (sz); +} + +extern inline jstring +JvNewString (const jchar *chars, jsize len) +{ + return _Jv_NewString (chars, len); +} + +extern inline jstring +JvNewStringLatin1 (const char *bytes, jsize len) +{ + return _Jv_NewStringLatin1 (bytes, len); +} + +extern inline jstring +JvNewStringLatin1 (const char *bytes) +{ + return _Jv_NewStringLatin1 (bytes, strlen (bytes)); +} + +extern inline jchar * +_Jv_GetStringChars (jstring str) +{ + return (jchar*)((char*) str->data + str->boffset); +} + +extern inline jchar* +JvGetStringChars (jstring str) +{ + return _Jv_GetStringChars (str); +} + +extern inline jsize +JvGetStringUTFLength (jstring string) +{ + return _Jv_GetStringUTFLength (string); +} + +extern inline jsize +JvGetStringUTFRegion (jstring str, jsize start, jsize len, char *buf) +{ + return _Jv_GetStringUTFRegion (str, start, len, buf); +} + +extern inline jstring +JvNewStringUTF (const char *bytes) +{ + return _Jv_NewStringUTF (bytes); +} + +extern class _Jv_PrimClass _Jv_byteClass, _Jv_shortClass, _Jv_intClass, + _Jv_longClass, _Jv_booleanClass, _Jv_charClass, _Jv_floatClass, + _Jv_doubleClass, _Jv_voidClass; +#define JvPrimClass(TYPE) ((jclass) & _Jv_##TYPE##Class) + +class JvSynchronize +{ +private: + jobject obj; +public: + JvSynchronize (const jobject &o) : obj (o) + { _Jv_MonitorEnter (obj); } + ~JvSynchronize () + { _Jv_MonitorExit (obj); } +}; + +// Throw some exception. +extern void JvThrow (jobject obj) __attribute__ ((__noreturn__)); +extern inline void +JvThrow (jobject obj) +{ + _Jv_Throw ((void *) obj); +} + +/* Call malloc, but throw exception if insufficient memory. */ +extern inline void * +JvMalloc (jsize size) +{ + return _Jv_Malloc (size); +} + +extern inline void +JvFree (void *ptr) +{ + return _Jv_Free (ptr); +} +#endif /* __GCJ_CNI_H__ */ diff --git a/libjava/gcj/field.h b/libjava/gcj/field.h new file mode 100644 index 00000000000..07cb4f89e15 --- /dev/null +++ b/libjava/gcj/field.h @@ -0,0 +1,169 @@ +// field.h - Header file for fieldID instances. -*- c++ -*- + +/* Copyright (C) 1998, 1999 Cygnus Solutions + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#ifndef __GCJ_FIELD_H__ +#define __GCJ_FIELD_H__ + +#include +#include + +#define _Jv_FIELD_UNRESOLVED_FLAG 0x8000 +#define _Jv_FIELD_CONSTANT_VALUE 0x4000 + +struct _Jv_Field +{ +#ifndef COMPACT_FIELDS + struct _Jv_Utf8Const* name; +#endif + + /* The type of the field, if isResolved(). + If !isResolved(): The fields's signature as a (Utf8Const*). */ + jclass type; + + _Jv_ushort flags; + +#ifdef COMPACT_FIELDS + short nameIndex; /* ofsfet in class's name table */ +#else + _Jv_ushort bsize; /* not really needed ... */ +#endif + + union { + int boffset; /* offset in bytes for instance field */ + void* addr; /* address of static field */ + } u; + +#ifdef __cplusplus + jboolean isResolved () + { return ! (flags & _Jv_FIELD_UNRESOLVED_FLAG); } + + public: + + int getOffset () { return u.boffset; } + + jobject getObjectField (jobject obj) + { return *(jobject *)((char *)obj + getOffset ()); } + + jfieldID getNextInstanceField () { return this + 1; } + + jboolean isRef () + { + if (!isResolved ()) + { + char first = ((_Jv_Utf8Const*)type)->data[0]; + return first == '[' || first == 'L'; + } + else + { + return ! type->isPrimitive (); + } + } + + // FIXME - may need to mask off internal flags. + int getModifiers() { return flags; } + +#ifdef COMPACT_FIELDS + _Jv_Utf8Const * getNameUtf8Const (jclass cls) + { return clas->fieldNames + nameIndex; } +#else + _Jv_Utf8Const * getNameUtf8Const (jclass) { return name; } +#endif +#endif +}; + +#ifdef __cplusplus +inline jbyte +_Jv_GetStaticByteField (jclass, _Jv_Field* field) +{ + return * (jbyte *) field->u.addr; +} + +inline jshort +_Jv_GetStaticShortField (jclass, _Jv_Field* field) +{ + return * (jshort *) field->u.addr; +} + +inline jint +_Jv_GetStaticIntField (jclass, _Jv_Field* field) +{ + return * (jint *) field->u.addr; +} + +inline jlong +_Jv_GetStaticLongField (jclass, _Jv_Field* field) +{ + return * (jlong *) field->u.addr; +} + +inline jobject +_Jv_GetObjectField (jobject obj, _Jv_Field* field) +{ + return field->getObjectField (obj); +} + +inline jbyte +_Jv_GetByteField (jobject obj, _Jv_Field* field) +{ + return * (jbyte *) ((char*) obj + field->getOffset ()); +} + +inline jshort +_Jv_GetShortField (jobject obj, _Jv_Field* field) +{ + return * (jshort *) ((char*) obj + field->getOffset ()); +} +inline jint +_Jv_GetIntField (jobject obj, _Jv_Field* field) +{ + return * (jint *) ((char*) obj + field->getOffset ()); +} +inline jlong +_Jv_GetLongField (jobject obj, _Jv_Field* field) +{ + return * (jlong *) ((char*) obj + field->getOffset ()); +} + +extern inline jfieldID +_Jv_FromReflectedField (java::lang::reflect::Field *field) +{ + return (jfieldID) ((char *) field->declaringClass->fields + field->offset); +} + + +#ifdef __GCJ_CNI_H__ +extern inline jfieldID +JvGetFirstInstanceField (jclass klass) +{ + return &(klass->fields[klass->static_field_count]); +} + +extern inline jint +JvNumInstanceFields (jclass klass) +{ + return klass->field_count - klass->static_field_count; +} + +extern inline jboolean +JvFieldIsRef (jfieldID field) +{ + return field->isRef (); +} + +extern inline jobject +JvGetObjectField (jobject obj, _Jv_Field* field) +{ + return _Jv_GetObjectField (obj, field); +} +#endif /* defined (__GCJ_CNI_H__) */ + +#endif + +#endif /* __GCJ_FIELD_H */ diff --git a/libjava/gcj/javaprims.h b/libjava/gcj/javaprims.h new file mode 100644 index 00000000000..ee085379a58 --- /dev/null +++ b/libjava/gcj/javaprims.h @@ -0,0 +1,306 @@ +// javaprims.h - Main external header file for libgcj. -*- c++ -*- + +/* Copyright (C) 1998, 1999 Cygnus Solutions + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#ifndef __JAVAPRIMS_H__ +#define __JAVAPRIMS_H__ + +// FIXME: this is a hack until we get a proper gcjh. +// It is needed to work around system header files that define TRUE +// and FALSE. +#undef TRUE +#define TRUE TRUE +#undef FALSE +#define FALSE FALSE + +// To force selection of correct types that will mangle consistently +// across platforms. +extern "Java" +{ + typedef __java_byte jbyte; + typedef __java_short jshort; + typedef __java_int jint; + typedef __java_long jlong; + typedef __java_float jfloat; + typedef __java_double jdouble; + typedef __java_char jchar; + typedef __java_boolean jboolean; + typedef jint jsize; + + // The following class declarations are automatically generated by + // the `classes.pl' script. + namespace java + { + namespace io + { + class BufferedInputStream; + class BufferedOutputStream; + class BufferedReader; + class BufferedWriter; + class ByteArrayInputStream; + class ByteArrayOutputStream; + class CharArrayReader; + class CharArrayWriter; + class CharConversionException; + class DataInput; + class DataInputStream; + class DataOutput; + class DataOutputStream; + class EOFException; + class File; + class FileDescriptor; + class FileInputStream; + class FileNotFoundException; + class FileOutputStream; + class FileReader; + class FileWriter; + class FilenameFilter; + class FilterInputStream; + class FilterOutputStream; + class FilterReader; + class FilterWriter; + class IOException; + class InputStream; + class InputStreamReader; + class InterruptedIOException; + class LineNumberInputStream; + class LineNumberReader; + class OutputStream; + class OutputStreamWriter; + class PipedInputStream; + class PipedOutputStream; + class PipedReader; + class PipedWriter; + class PrintStream; + class PrintWriter; + class PushbackInputStream; + class PushbackReader; + class RandomAccessFile; + class Reader; + class SequenceInputStream; + class Serializable; + class StreamTokenizer; + class StringBufferInputStream; + class StringReader; + class StringWriter; + class SyncFailedException; + class UTFDataFormatException; + class UnsupportedEncodingException; + class Writer; + } + + namespace lang + { + class AbstractMethodError; + class ArithmeticException; + class ArrayIndexOutOfBoundsException; + class ArrayStoreException; + class Boolean; + class Byte; + class Character; + class Class; + class ClassCastException; + class ClassCircularityError; + class ClassFormatError; + class ClassLoader; + class ClassNotFoundException; + class CloneNotSupportedException; + class Cloneable; + class Comparable; + class Compiler; + class ConcreteProcess; + class Double; + class Error; + class Exception; + class ExceptionInInitializerError; + class FirstThread; + class Float; + class IllegalAccessError; + class IllegalAccessException; + class IllegalArgumentException; + class IllegalMonitorStateException; + class IllegalStateException; + class IllegalThreadStateException; + class IncompatibleClassChangeError; + class IndexOutOfBoundsException; + class InstantiationError; + class InstantiationException; + class Integer; + class InternalError; + class InterruptedException; + class LinkageError; + class Long; + class Math; + class NegativeArraySizeException; + class NoClassDefFoundError; + class NoSuchFieldError; + class NoSuchFieldException; + class NoSuchMethodError; + class NoSuchMethodException; + class NullPointerException; + class Number; + class NumberFormatException; + class Object; + class OutOfMemoryError; + class Process; + class Runnable; + class Runtime; + class RuntimeException; + class SecurityException; + class SecurityManager; + class Short; + class StackOverflowError; + class String; + class StringBuffer; + class StringIndexOutOfBoundsException; + class System; + class Thread; + class ThreadDeath; + class ThreadGroup; + class Throwable; + class UnknownError; + class UnsatisfiedLinkError; + class UnsupportedOperationException; + class VerifyError; + class VirtualMachineError; + class Void; + namespace reflect + { + class AccessibleObject; + class Array; + class Constructor; + class Field; + class InvocationTargetException; + class Member; + class Method; + class Modifier; + } + } + + namespace util + { + class BitSet; + class Calendar; + class ConcurrentModificationException; + class Date; + class Dictionary; + class EmptyStackException; + class Enumeration; + class EventListener; + class EventObject; + class GregorianCalendar; + class Hashtable; + class HashtableEntry; + class HashtableEnumeration; + class ListResourceBundle; + class Locale; + class MissingResourceException; + class NoSuchElementException; + class Observable; + class Observer; + class Properties; + class PropertyResourceBundle; + class Random; + class ResourceBundle; + class SimpleTimeZone; + class Stack; + class StringTokenizer; + class TimeZone; + class TooManyListenersException; + class Vector; + class VectorEnumeration; + namespace jar + { + class JarEntry; + class JarFile; + class JarInputStream; + } + + namespace zip + { + class Adler32; + class CRC32; + class CheckedInputStream; + class CheckedOutputStream; + class Checksum; + class DataFormatException; + class Deflater; + class DeflaterOutputStream; + class GZIPInputStream; + class GZIPOutputStream; + class Inflater; + class InflaterInputStream; + class ZipConstants; + class ZipEntry; + class ZipEnumeration; + class ZipException; + class ZipFile; + class ZipInputStream; + class ZipOutputStream; + } + } + } +}; + +typedef struct java::lang::Object* jobject; +typedef class java::lang::Class* jclass; +typedef class java::lang::Throwable* jthrowable; +typedef class java::lang::String* jstring; +struct _Jv_JNIEnv; + +typedef struct _Jv_Field *jfieldID; +typedef struct _Jv_Method *jmethodID; + +extern "C" jobject _Jv_AllocObject (jclass, jint); +extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass); +extern "C" jstring _Jv_AllocString(jsize); +extern "C" jstring _Jv_NewString (const jchar*, jsize); +extern "C" jchar* _Jv_GetStringChars (jstring str); +extern "C" jint _Jv_MonitorEnter (jobject); +extern "C" jint _Jv_MonitorExit (jobject); +extern "C" jstring _Jv_NewStringLatin1(const char*, jsize); +extern "C" jsize _Jv_GetStringUTFLength (jstring); +extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *); + +extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__)); +extern "C" void* _Jv_Malloc (jsize); +extern "C" void _Jv_Free (void*); + +typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__))); +typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__))); + +typedef union { + jobject o; + jint i; // Also stores smaller integral types. + jfloat f; + jint ia[1]; // Half of _Jv_word2. + void* p; + + // these are things we will store in the constant + jclass clazz; + jstring string; + struct _Jv_Field *field; + struct _Jv_Utf8Const *utf8; + struct _Jv_ResolvedMethod *rmethod; +} _Jv_word; + +typedef union { + jint ia[2]; + jlong l; + jdouble d; +} _Jv_word2; + +struct _Jv_Utf8Const +{ + _Jv_ushort hash; + _Jv_ushort length; /* In bytes, of data portion, without final '\0'. */ + char data[1]; /* In Utf8 format, with final '\0'. */ +}; + +#endif /* __JAVAPRIMS_H__ */ diff --git a/libjava/gcj/method.h b/libjava/gcj/method.h new file mode 100644 index 00000000000..a97ba4a682f --- /dev/null +++ b/libjava/gcj/method.h @@ -0,0 +1,21 @@ +// java-method.h - Header file for methodID instances. -*- c++ -*- + +/* Copyright (C) 1999 Cygnus Solutions + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +#ifndef __GCJ_METHOD_H__ +#define __GCJ_METHOD_H__ + +extern inline jmethodID +_Jv_FromReflectedMethod(java::lang::reflect::Method *method) +{ + return (jmethodID) + ((char *) method->declaringClass->methods + method->offset); +} + +#endif /* __GCJ_METHOD_H__ */ diff --git a/libjava/gij.cc b/libjava/gij.cc index 5bd2451275e..ffe1515037d 100644 --- a/libjava/gij.cc +++ b/libjava/gij.cc @@ -9,7 +9,7 @@ details. */ /* Author: Kresten Krab Thorup */ #include -#include +#include #include #include diff --git a/libjava/gnu/gcj/convert/natInput_EUCJIS.cc b/libjava/gnu/gcj/convert/natInput_EUCJIS.cc index 8f3b272b7bd..fb99d5a2e13 100644 --- a/libjava/gnu/gcj/convert/natInput_EUCJIS.cc +++ b/libjava/gnu/gcj/convert/natInput_EUCJIS.cc @@ -7,7 +7,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include -#include +#include #include #define ERROR_CHAR 0xFFFD diff --git a/libjava/gnu/gcj/convert/natInput_SJIS.cc b/libjava/gnu/gcj/convert/natInput_SJIS.cc index 5a040b17972..d02b57c229a 100644 --- a/libjava/gnu/gcj/convert/natInput_SJIS.cc +++ b/libjava/gnu/gcj/convert/natInput_SJIS.cc @@ -7,7 +7,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include -#include +#include #include #define ERROR_CHAR 0xFFFD diff --git a/libjava/gnu/gcj/convert/natOutput_EUCJIS.cc b/libjava/gnu/gcj/convert/natOutput_EUCJIS.cc index 585e56b25c5..fe8fd982442 100644 --- a/libjava/gnu/gcj/convert/natOutput_EUCJIS.cc +++ b/libjava/gnu/gcj/convert/natOutput_EUCJIS.cc @@ -7,7 +7,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include -#include +#include #include /* A trie structure to map unicode values to JIS codes. diff --git a/libjava/gnu/gcj/convert/natOutput_SJIS.cc b/libjava/gnu/gcj/convert/natOutput_SJIS.cc index 66be27b4635..d028f11fe10 100644 --- a/libjava/gnu/gcj/convert/natOutput_SJIS.cc +++ b/libjava/gnu/gcj/convert/natOutput_SJIS.cc @@ -7,7 +7,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include -#include +#include #include extern unsigned short Unicode_to_JIS[]; diff --git a/libjava/include/Makefile.am b/libjava/include/Makefile.am new file mode 100644 index 00000000000..37b3f4feb9d --- /dev/null +++ b/libjava/include/Makefile.am @@ -0,0 +1,7 @@ +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = foreign no-installinfo + +## FIXME: for now we don't install jni.h because we aren't really sure +## where to install it. +## include_HEADERS = jni.h diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in new file mode 100644 index 00000000000..e1736be96e6 --- /dev/null +++ b/libjava/include/Makefile.in @@ -0,0 +1,253 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ +AR = @AR@ +AS = @AS@ +CC = @CC@ +COMPPATH = @COMPPATH@ +CPP = @CPP@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DIVIDESPEC = @DIVIDESPEC@ +DLLTOOL = @DLLTOOL@ +EH_COMMON_INCLUDE = @EH_COMMON_INCLUDE@ +EXEEXT = @EXEEXT@ +GCDEPS = @GCDEPS@ +GCINCS = @GCINCS@ +GCLIBS = @GCLIBS@ +GCOBJS = @GCOBJS@ +GCSPEC = @GCSPEC@ +LD = @LD@ +LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@ +LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@ +LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NM = @NM@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +RANLIB = @RANLIB@ +SYSTEMSPEC = @SYSTEMSPEC@ +THREADDEPS = @THREADDEPS@ +THREADINCS = @THREADINCS@ +THREADLIBS = @THREADLIBS@ +THREADOBJS = @THREADOBJS@ +THREADSPEC = @THREADSPEC@ +USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ +VERSION = @VERSION@ +ZDEPS = @ZDEPS@ +ZINCS = @ZINCS@ +ZLIBS = @ZLIBS@ +ZLIBSPEC = @ZLIBSPEC@ +here = @here@ +libgcj_basedir = @libgcj_basedir@ + +AUTOMAKE_OPTIONS = foreign no-installinfo +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in config.h.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=include/config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = include + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign include/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-info-am: +install-info: install-info-am +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile config.h +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-hdr clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-hdr distclean-generic clean-am + -rm -f libtool + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +tags distdir info-am info dvi-am dvi check check-am installcheck-am \ +installcheck install-info-am install-info all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libjava/include/cni.h b/libjava/include/cni.h deleted file mode 100644 index b9b202d41dd..00000000000 --- a/libjava/include/cni.h +++ /dev/null @@ -1,133 +0,0 @@ -// cni.h -*- c++ -*- -// This file describes the Cygnus Native Interface, CNI. -// It provides a nicer interface to many of the things in javaprims.h. - -/* Copyright (C) 1998, 1999 Cygnus Solutions - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#ifndef __JAVA_CNI_H__ -#define __JAVA_CNI_H__ - -#include -#include - -#include -#include - -extern inline jobject -JvAllocObject (jclass cls) -{ - return _Jv_AllocObject (cls, cls->size()); -} - -extern inline jobject -JvAllocObject (jclass cls, jsize sz) -{ - return _Jv_AllocObject (cls, sz); -} - -extern "C" jstring _Jv_NewStringUTF (const char *bytes); -extern "C" void _Jv_InitClass (jclass); - -extern inline void -JvInitClass (jclass cls) -{ - return _Jv_InitClass (cls); -} - -extern inline jstring -JvAllocString (jsize sz) -{ - return _Jv_AllocString (sz); -} - -extern inline jstring -JvNewString (const jchar *chars, jsize len) -{ - return _Jv_NewString (chars, len); -} - -extern inline jstring -JvNewStringLatin1 (const char *bytes, jsize len) -{ - return _Jv_NewStringLatin1 (bytes, len); -} - -extern inline jstring -JvNewStringLatin1 (const char *bytes) -{ - return _Jv_NewStringLatin1 (bytes, strlen (bytes)); -} - -extern inline jchar * -_Jv_GetStringChars (jstring str) -{ - return (jchar*)((char*) str->data + str->boffset); -} - -extern inline jchar* -JvGetStringChars (jstring str) -{ - return _Jv_GetStringChars (str); -} - -extern inline jsize -JvGetStringUTFLength (jstring string) -{ - return _Jv_GetStringUTFLength (string); -} - -extern inline jsize -JvGetStringUTFRegion (jstring str, jsize start, jsize len, char *buf) -{ - return _Jv_GetStringUTFRegion (str, start, len, buf); -} - -extern inline jstring -JvNewStringUTF (const char *bytes) -{ - return _Jv_NewStringUTF (bytes); -} - -extern class _Jv_PrimClass _Jv_byteClass, _Jv_shortClass, _Jv_intClass, - _Jv_longClass, _Jv_booleanClass, _Jv_charClass, _Jv_floatClass, - _Jv_doubleClass, _Jv_voidClass; -#define JvPrimClass(TYPE) ((jclass) & _Jv_##TYPE##Class) - -class JvSynchronize -{ -private: - jobject obj; -public: - JvSynchronize (const jobject &o) : obj (o) - { _Jv_MonitorEnter (obj); } - ~JvSynchronize () - { _Jv_MonitorExit (obj); } -}; - -// Throw some exception. -extern void JvThrow (jobject obj) __attribute__ ((__noreturn__)); -extern inline void -JvThrow (jobject obj) -{ - _Jv_Throw ((void *) obj); -} - -/* Call malloc, but throw exception if insufficient memory. */ -extern inline void * -JvMalloc (jsize size) -{ - return _Jv_Malloc (size); -} - -extern inline void -JvFree (void *ptr) -{ - return _Jv_Free (ptr); -} -#endif /* __JAVA_CNI_H__ */ diff --git a/libjava/include/java-array.h b/libjava/include/java-array.h deleted file mode 100644 index a5cb2a4f4a8..00000000000 --- a/libjava/include/java-array.h +++ /dev/null @@ -1,77 +0,0 @@ -// java-array.h - Header file for CNI arrays. -*- c++ -*- - -/* Copyright (C) 1998, 1999 Cygnus Solutions - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#ifndef __JAVA_ARRAY_H__ -#define __JAVA_ARRAY_H__ - -#pragma interface - -#include - -extern "Java" { - -class __JArray : public java::lang::Object -{ -public: - int length; - friend jsize JvGetArrayLength (__JArray*); -}; - -template -class JArray : public __JArray -{ - T data[0]; -public: - friend T* elements<>(JArray& x); - friend T* elements<>(JArray* x); - // T* getData() { return data; } - // T& operator[](jint i) { return data[i]; } -}; - -template -T* elements(JArray& x) { return x.data; } -template -T* elements(JArray* x) { return x->data; } - -}; // end extern "Java" - -/* These typesdefs match those in JNI. */ -typedef __JArray *jarray; -typedef JArray *jobjectArray; -typedef JArray *jbooleanArray; -typedef JArray *jbyteArray; -typedef JArray *jcharArray; -typedef JArray *jshortArray; -typedef JArray *jintArray; -typedef JArray *jlongArray; -typedef JArray *jfloatArray; -typedef JArray *jdoubleArray; -typedef JArray *jstringArray; - -extern "C" jbooleanArray JvNewBooleanArray (jint length); -extern "C" jbyteArray JvNewByteArray (jint length); -extern "C" jcharArray JvNewCharArray (jint length); -extern "C" jshortArray JvNewShortArray (jint length); -extern "C" jintArray JvNewIntArray (jint length); -extern "C" jlongArray JvNewLongArray (jint length); -extern "C" jfloatArray JvNewFloatArray (jint length); -extern "C" jdoubleArray JvNewDoubleArray (jint length); -extern "C" jobjectArray _Jv_NewObjectArray(jsize length, jclass, jobject init); - -inline jobjectArray JvNewObjectArray (jsize length, jclass cls, jobject init) -{ return _Jv_NewObjectArray (length, cls, init); } - -extern "C" jstringArray JvConvertArgv(int argc, const char **argv); -extern "C" void JvRunMain (jclass klass, int argc, const char **argv); -void _Jv_RunMain (const char* name, int argc, const char **argv); - -inline jsize JvGetArrayLength (jarray array) { return array->length; } - -#endif /* __JAVA_ARRAY_H__ */ diff --git a/libjava/include/java-cpool.h b/libjava/include/java-cpool.h index b5e3ab36db7..c6b9432dd8a 100644 --- a/libjava/include/java-cpool.h +++ b/libjava/include/java-cpool.h @@ -11,7 +11,7 @@ details. */ #ifndef __JAVA_CPOOL_H__ #define __JAVA_CPOOL_H__ -#include +#include // we rename these, to avoid polluting the name space #define JV_CONSTANT_Undefined (0L) diff --git a/libjava/include/java-field.h b/libjava/include/java-field.h deleted file mode 100644 index d00d9ce7726..00000000000 --- a/libjava/include/java-field.h +++ /dev/null @@ -1,169 +0,0 @@ -// java-field.h - Header file for fieldID instances. -*- c++ -*- - -/* Copyright (C) 1998, 1999 Cygnus Solutions - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#ifndef __JAVA_FIELD_H__ -#define __JAVA_FIELD_H__ - -#include -#include - -#define _Jv_FIELD_UNRESOLVED_FLAG 0x8000 -#define _Jv_FIELD_CONSTANT_VALUE 0x4000 - -struct _Jv_Field -{ -#ifndef COMPACT_FIELDS - struct _Jv_Utf8Const* name; -#endif - - /* The type of the field, if isResolved(). - If !isResolved(): The fields's signature as a (Utf8Const*). */ - jclass type; - - _Jv_ushort flags; - -#ifdef COMPACT_FIELDS - short nameIndex; /* ofsfet in class's name table */ -#else - _Jv_ushort bsize; /* not really needed ... */ -#endif - - union { - int boffset; /* offset in bytes for instance field */ - void* addr; /* address of static field */ - } u; - -#ifdef __cplusplus - jboolean isResolved () - { return ! (flags & _Jv_FIELD_UNRESOLVED_FLAG); } - - public: - - int getOffset () { return u.boffset; } - - jobject getObjectField (jobject obj) - { return *(jobject *)((char *)obj + getOffset ()); } - - jfieldID getNextInstanceField () { return this + 1; } - - jboolean isRef () - { - if (!isResolved ()) - { - char first = ((_Jv_Utf8Const*)type)->data[0]; - return first == '[' || first == 'L'; - } - else - { - return ! type->isPrimitive (); - } - } - - // FIXME - may need to mask off internal flags. - int getModifiers() { return flags; } - -#ifdef COMPACT_FIELDS - _Jv_Utf8Const * getNameUtf8Const (jclass cls) - { return clas->fieldNames + nameIndex; } -#else - _Jv_Utf8Const * getNameUtf8Const (jclass) { return name; } -#endif -#endif -}; - -#ifdef __cplusplus -inline jbyte -_Jv_GetStaticByteField (jclass, _Jv_Field* field) -{ - return * (jbyte *) field->u.addr; -} - -inline jshort -_Jv_GetStaticShortField (jclass, _Jv_Field* field) -{ - return * (jshort *) field->u.addr; -} - -inline jint -_Jv_GetStaticIntField (jclass, _Jv_Field* field) -{ - return * (jint *) field->u.addr; -} - -inline jlong -_Jv_GetStaticLongField (jclass, _Jv_Field* field) -{ - return * (jlong *) field->u.addr; -} - -inline jobject -_Jv_GetObjectField (jobject obj, _Jv_Field* field) -{ - return field->getObjectField (obj); -} - -inline jbyte -_Jv_GetByteField (jobject obj, _Jv_Field* field) -{ - return * (jbyte *) ((char*) obj + field->getOffset ()); -} - -inline jshort -_Jv_GetShortField (jobject obj, _Jv_Field* field) -{ - return * (jshort *) ((char*) obj + field->getOffset ()); -} -inline jint -_Jv_GetIntField (jobject obj, _Jv_Field* field) -{ - return * (jint *) ((char*) obj + field->getOffset ()); -} -inline jlong -_Jv_GetLongField (jobject obj, _Jv_Field* field) -{ - return * (jlong *) ((char*) obj + field->getOffset ()); -} - -extern inline jfieldID -_Jv_FromReflectedField (java::lang::reflect::Field *field) -{ - return (jfieldID) ((char *) field->declaringClass->fields + field->offset); -} - - -#ifdef __JAVA_CNI_H__ -extern inline jfieldID -JvGetFirstInstanceField (jclass klass) -{ - return &(klass->fields[klass->static_field_count]); -} - -extern inline jint -JvNumInstanceFields (jclass klass) -{ - return klass->field_count - klass->static_field_count; -} - -extern inline jboolean -JvFieldIsRef (jfieldID field) -{ - return field->isRef (); -} - -extern inline jobject -JvGetObjectField (jobject obj, _Jv_Field* field) -{ - return _Jv_GetObjectField (obj, field); -} -#endif /* defined (__JAVA_CNI_H__) */ - -#endif - -#endif /* __JAVA_FIELD_H */ diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index ffd53a868ab..f29d3ddb95a 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -11,8 +11,6 @@ details. */ #ifndef __JAVA_INTERP_H__ #define __JAVA_INTERP_H__ -#include - #include #include diff --git a/libjava/include/java-method.h b/libjava/include/java-method.h deleted file mode 100644 index 1bda4719c2b..00000000000 --- a/libjava/include/java-method.h +++ /dev/null @@ -1,16 +0,0 @@ -// java-method.h - Header file for methodID instances. -*- c++ -*- - -/* Copyright (C) 1999 Cygnus Solutions - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -extern inline jmethodID -_Jv_FromReflectedMethod(java::lang::reflect::Method *method) -{ - return (jmethodID) - ((char *) method->declaringClass->methods + method->offset); -} diff --git a/libjava/include/javaprims.h b/libjava/include/javaprims.h deleted file mode 100644 index 943ce160571..00000000000 --- a/libjava/include/javaprims.h +++ /dev/null @@ -1,306 +0,0 @@ -// javaprims.h - Main external header file for libgcj. -*- c++ -*- - -/* Copyright (C) 1998, 1999 Cygnus Solutions - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#ifndef __JAVAPRIMS_H__ -#define __JAVAPRIMS_H__ - -// FIXME: this is a hack until we get a proper gcjh. -// It is needed to work around system header files that define TRUE -// and FALSE. -#undef TRUE -#define TRUE TRUE -#undef FALSE -#define FALSE FALSE - -// To force selection of correct types that will mangle consistently -// across platforms. -extern "Java" -{ - typedef __java_byte jbyte; - typedef __java_short jshort; - typedef __java_int jint; - typedef __java_long jlong; - typedef __java_float jfloat; - typedef __java_double jdouble; - typedef __java_char jchar; - typedef __java_boolean jboolean; - typedef jint jsize; - - // The following class declarations are automatically generated by - // the `classes.pl' script. - namespace java - { - namespace io - { - class BufferedInputStream; - class BufferedOutputStream; - class BufferedReader; - class BufferedWriter; - class ByteArrayInputStream; - class ByteArrayOutputStream; - class CharArrayReader; - class CharArrayWriter; - class CharConversionException; - class DataInput; - class DataInputStream; - class DataOutput; - class DataOutputStream; - class EOFException; - class File; - class FileDescriptor; - class FileInputStream; - class FileNotFoundException; - class FileOutputStream; - class FileReader; - class FileWriter; - class FilenameFilter; - class FilterInputStream; - class FilterOutputStream; - class FilterReader; - class FilterWriter; - class IOException; - class InputStream; - class InputStreamReader; - class InterruptedIOException; - class LineNumberInputStream; - class LineNumberReader; - class OutputStream; - class OutputStreamWriter; - class PipedInputStream; - class PipedOutputStream; - class PipedReader; - class PipedWriter; - class PrintStream; - class PrintWriter; - class PushbackInputStream; - class PushbackReader; - class RandomAccessFile; - class Reader; - class SequenceInputStream; - class Serializable; - class StreamTokenizer; - class StringBufferInputStream; - class StringReader; - class StringWriter; - class SyncFailedException; - class UTFDataFormatException; - class UnsupportedEncodingException; - class Writer; - }; - - namespace lang - { - class AbstractMethodError; - class ArithmeticException; - class ArrayIndexOutOfBoundsException; - class ArrayStoreException; - class Boolean; - class Byte; - class Character; - class Class; - class ClassCastException; - class ClassCircularityError; - class ClassFormatError; - class ClassLoader; - class ClassNotFoundException; - class CloneNotSupportedException; - class Cloneable; - class Comparable; - class Compiler; - class ConcreteProcess; - class Double; - class Error; - class Exception; - class ExceptionInInitializerError; - class FirstThread; - class Float; - class IllegalAccessError; - class IllegalAccessException; - class IllegalArgumentException; - class IllegalMonitorStateException; - class IllegalStateException; - class IllegalThreadStateException; - class IncompatibleClassChangeError; - class IndexOutOfBoundsException; - class InstantiationError; - class InstantiationException; - class Integer; - class InternalError; - class InterruptedException; - class LinkageError; - class Long; - class Math; - class NegativeArraySizeException; - class NoClassDefFoundError; - class NoSuchFieldError; - class NoSuchFieldException; - class NoSuchMethodError; - class NoSuchMethodException; - class NullPointerException; - class Number; - class NumberFormatException; - class Object; - class OutOfMemoryError; - class Process; - class Runnable; - class Runtime; - class RuntimeException; - class SecurityException; - class SecurityManager; - class Short; - class StackOverflowError; - class String; - class StringBuffer; - class StringIndexOutOfBoundsException; - class System; - class Thread; - class ThreadDeath; - class ThreadGroup; - class Throwable; - class UnknownError; - class UnsatisfiedLinkError; - class UnsupportedOperationException; - class VerifyError; - class VirtualMachineError; - class Void; - namespace reflect - { - class AccessibleObject; - class Array; - class Constructor; - class Field; - class InvocationTargetException; - class Member; - class Method; - class Modifier; - }; - }; - - namespace util - { - class BitSet; - class Calendar; - class ConcurrentModificationException; - class Date; - class Dictionary; - class EmptyStackException; - class Enumeration; - class EventListener; - class EventObject; - class GregorianCalendar; - class Hashtable; - class HashtableEntry; - class HashtableEnumeration; - class ListResourceBundle; - class Locale; - class MissingResourceException; - class NoSuchElementException; - class Observable; - class Observer; - class Properties; - class PropertyResourceBundle; - class Random; - class ResourceBundle; - class SimpleTimeZone; - class Stack; - class StringTokenizer; - class TimeZone; - class TooManyListenersException; - class Vector; - class VectorEnumeration; - namespace jar - { - class JarEntry; - class JarFile; - class JarInputStream; - }; - - namespace zip - { - class Adler32; - class CRC32; - class CheckedInputStream; - class CheckedOutputStream; - class Checksum; - class DataFormatException; - class Deflater; - class DeflaterOutputStream; - class GZIPInputStream; - class GZIPOutputStream; - class Inflater; - class InflaterInputStream; - class ZipConstants; - class ZipEntry; - class ZipEnumeration; - class ZipException; - class ZipFile; - class ZipInputStream; - class ZipOutputStream; - }; - }; - }; -}; - -typedef struct java::lang::Object* jobject; -typedef class java::lang::Class* jclass; -typedef class java::lang::Throwable* jthrowable; -typedef class java::lang::String* jstring; -struct _Jv_JNIEnv; - -typedef struct _Jv_Field *jfieldID; -typedef struct _Jv_Method *jmethodID; - -extern "C" jobject _Jv_AllocObject (jclass, jint); -extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass); -extern "C" jstring _Jv_AllocString(jsize); -extern "C" jstring _Jv_NewString (const jchar*, jsize); -extern "C" jchar* _Jv_GetStringChars (jstring str); -extern "C" jint _Jv_MonitorEnter (jobject); -extern "C" jint _Jv_MonitorExit (jobject); -extern "C" jstring _Jv_NewStringLatin1(const char*, jsize); -extern "C" jsize _Jv_GetStringUTFLength (jstring); -extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *); - -extern "C" void _Jv_Throw (void *) __attribute__ ((__noreturn__)); -extern "C" void* _Jv_Malloc (jsize); -extern "C" void _Jv_Free (void*); - -typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__))); -typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__))); - -typedef union { - jobject o; - jint i; // Also stores smaller integral types. - jfloat f; - jint ia[1]; // Half of _Jv_word2. - void* p; - - // these are things we will store in the constant - jclass clazz; - jstring string; - struct _Jv_Field *field; - struct _Jv_Utf8Const *utf8; - struct _Jv_ResolvedMethod *rmethod; -} _Jv_word; - -typedef union { - jint ia[2]; - jlong l; - jdouble d; -} _Jv_word2; - -struct _Jv_Utf8Const -{ - _Jv_ushort hash; - _Jv_ushort length; /* In bytes, of data portion, without final '\0'. */ - char data[1]; /* In Utf8 format, with final '\0'. */ -}; - -#endif /* __JAVAPRIMS_H__ */ diff --git a/libjava/include/jni.h b/libjava/include/jni.h index d589b022309..e3ae6b355c2 100644 --- a/libjava/include/jni.h +++ b/libjava/include/jni.h @@ -6,8 +6,8 @@ This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ -#ifndef __JAVA_JNI_H__ -#define __JAVA_JNI_H__ +#ifndef __GCJ_JNI_H__ +#define __GCJ_JNI_H__ #include #define _Jv_va_list va_list @@ -15,7 +15,7 @@ details. */ #ifdef __cplusplus // This is wrong, because it pollutes the name-space too much! -#include +#include typedef struct _Jv_JNIEnv JNIEnv; #else @@ -293,4 +293,4 @@ _Jv_JNIEnv::GetStringLength (jstring str) #endif -#endif /* __JAVA_JNI_H__ */ +#endif /* __GCJ_JNI_H__ */ diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 94cd3d2def5..7b0b476a2ed 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -11,8 +11,18 @@ details. */ #ifndef __JAVA_JVM_H__ #define __JAVA_JVM_H__ +#include + #include -#include +#include +// Must include java-gc.h before Object.h for the implementation. +#include + +#include + +// Include cni.h before field.h to enable all definitions. FIXME. +#include +#include /* Structure of the virtual table. */ struct _Jv_VTable diff --git a/libjava/interpret.cc b/libjava/interpret.cc index ca38d3ba0af..581606e4047 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -14,9 +14,7 @@ details. */ #pragma implementation "java-interp.h" -#include #include -#include #include #include #include diff --git a/libjava/java/awt/natToolkit.cc b/libjava/java/awt/natToolkit.cc index 2d644a6b783..9a29b87197c 100644 --- a/libjava/java/awt/natToolkit.cc +++ b/libjava/java/awt/natToolkit.cc @@ -10,7 +10,7 @@ details. */ /*#define ENABLE_GTK*/ -#include +#include #include #ifdef ENABLE_GTK #include diff --git a/libjava/java/io/natFile.cc b/libjava/java/io/natFile.cc index 968bd6d37b0..168d7e1d612 100644 --- a/libjava/java/io/natFile.cc +++ b/libjava/java/io/natFile.cc @@ -29,7 +29,7 @@ details. */ #endif #include -#include +#include #include #include #include diff --git a/libjava/java/io/natFileDescriptorEcos.cc b/libjava/java/io/natFileDescriptorEcos.cc index f2c3fb0db79..54c1bdbaa70 100644 --- a/libjava/java/io/natFileDescriptorEcos.cc +++ b/libjava/java/io/natFileDescriptorEcos.cc @@ -16,7 +16,7 @@ details. */ #include #include -#include +#include #include #include #include diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc index 90a02876f10..9da0eae4eeb 100644 --- a/libjava/java/io/natFileDescriptorPosix.cc +++ b/libjava/java/io/natFileDescriptorPosix.cc @@ -34,7 +34,7 @@ details. */ #include #endif -#include +#include #include #include #include diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index b3a86664e69..c88c86e2e84 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -18,7 +18,7 @@ details. */ #include #include -// We declare these here to avoid including cni.h. +// We declare these here to avoid including gcj/cni.h. extern "C" void _Jv_InitClass (jclass klass); extern "C" void _Jv_RegisterClasses (jclass *classes); diff --git a/libjava/java/lang/Object.h b/libjava/java/lang/Object.h index c5d55f17833..971ba686d4d 100644 --- a/libjava/java/lang/Object.h +++ b/libjava/java/lang/Object.h @@ -13,10 +13,7 @@ details. */ #pragma interface -#include -#include -#include -#include +#include // This class is mainly here as a kludge to get G++ to allocate // vtable pointer as the *first* word of each Object, instead of diff --git a/libjava/java/lang/natCharacter.cc b/libjava/java/lang/natCharacter.cc index fa312d1d9a4..4eca4a4f185 100644 --- a/libjava/java/lang/natCharacter.cc +++ b/libjava/java/lang/natCharacter.cc @@ -10,7 +10,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 2a8bb3b3f9a..f7c598dac5e 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -15,7 +15,7 @@ details. */ #pragma implementation "Class.h" -#include +#include #include #include #include diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc index c0d06d47caf..9ad81a81a37 100644 --- a/libjava/java/lang/natClassLoader.cc +++ b/libjava/java/lang/natClassLoader.cc @@ -15,8 +15,12 @@ details. */ #include #include -#include +#include #include + +#include +#include + #include #include #include @@ -31,8 +35,6 @@ details. */ #include #include -#include - #define CloneableClass _CL_Q34java4lang9Cloneable extern java::lang::Class CloneableClass; #define ObjectClass _CL_Q34java4lang6Object diff --git a/libjava/java/lang/natDouble.cc b/libjava/java/lang/natDouble.cc index 8d8c7883ba4..87466a8e37f 100644 --- a/libjava/java/lang/natDouble.cc +++ b/libjava/java/lang/natDouble.cc @@ -25,7 +25,7 @@ char *alloca (); #include -#include +#include #include #include #include diff --git a/libjava/java/lang/natEcosProcess.cc b/libjava/java/lang/natEcosProcess.cc index 774a6977aac..c9d4dbde30f 100644 --- a/libjava/java/lang/natEcosProcess.cc +++ b/libjava/java/lang/natEcosProcess.cc @@ -14,7 +14,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/java/lang/natFirstThread.cc b/libjava/java/lang/natFirstThread.cc index 319e487b8ab..031779eb5ac 100644 --- a/libjava/java/lang/natFirstThread.cc +++ b/libjava/java/lang/natFirstThread.cc @@ -12,7 +12,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/java/lang/natMath.cc b/libjava/java/lang/natMath.cc index 66382473eed..bdfc9f9cd9e 100644 --- a/libjava/java/lang/natMath.cc +++ b/libjava/java/lang/natMath.cc @@ -23,7 +23,7 @@ details. */ #include #include #include -#include +#include #include "fdlibm.h" diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc index 1d9a4901467..22632c5015c 100644 --- a/libjava/java/lang/natObject.cc +++ b/libjava/java/lang/natObject.cc @@ -14,7 +14,7 @@ details. */ #pragma implementation "Object.h" -#include +#include #include #include #include diff --git a/libjava/java/lang/natPosixProcess.cc b/libjava/java/lang/natPosixProcess.cc index 5c6d9a7644d..9fa7d3378fe 100644 --- a/libjava/java/lang/natPosixProcess.cc +++ b/libjava/java/lang/natPosixProcess.cc @@ -22,7 +22,7 @@ details. */ #include #include -#include +#include #include #include diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index f8b050c4d58..ec1d402097a 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -12,7 +12,7 @@ details. */ #include -#include +#include #include #include #include diff --git a/libjava/java/lang/natString.cc b/libjava/java/lang/natString.cc index bfdc50fb7db..53bda1f4c33 100644 --- a/libjava/java/lang/natString.cc +++ b/libjava/java/lang/natString.cc @@ -13,7 +13,7 @@ details. */ #include #include -#include +#include #include #include #include diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index 5c2a80ea93a..f453de0cb6c 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -38,7 +38,7 @@ details. */ #include #endif -#include +#include #include #include #include diff --git a/libjava/java/lang/natThread.cc b/libjava/java/lang/natThread.cc index 50db5642bef..c9d115cee39 100644 --- a/libjava/java/lang/natThread.cc +++ b/libjava/java/lang/natThread.cc @@ -12,8 +12,10 @@ details. */ #include -#include +#include #include +#include + #include #include #include diff --git a/libjava/java/lang/reflect/natArray.cc b/libjava/java/lang/reflect/natArray.cc index 2c951db0046..88e809134bb 100644 --- a/libjava/java/lang/reflect/natArray.cc +++ b/libjava/java/lang/reflect/natArray.cc @@ -13,7 +13,7 @@ details. */ #include #include -#include +#include #include #include #include diff --git a/libjava/java/lang/reflect/natField.cc b/libjava/java/lang/reflect/natField.cc index 2449b42545c..04945328ad5 100644 --- a/libjava/java/lang/reflect/natField.cc +++ b/libjava/java/lang/reflect/natField.cc @@ -12,7 +12,6 @@ details. */ #include -#include #include #include #include @@ -26,7 +25,6 @@ details. */ #include #include #include -#include jint java::lang::reflect::Field::getModifiers () diff --git a/libjava/java/lang/reflect/natMethod.cc b/libjava/java/lang/reflect/natMethod.cc index a62d1ffeac2..0130ac4243f 100644 --- a/libjava/java/lang/reflect/natMethod.cc +++ b/libjava/java/lang/reflect/natMethod.cc @@ -12,9 +12,8 @@ details. */ #include -#include +#include #include -#include #include #include @@ -32,7 +31,7 @@ details. */ #include #include #include -#include +#include #define ClassClass _CL_Q34java4lang5Class extern java::lang::Class ClassClass; diff --git a/libjava/java/net/natInetAddress.cc b/libjava/java/net/natInetAddress.cc index 6e014ab6f86..bc69ac2d2ac 100644 --- a/libjava/java/net/natInetAddress.cc +++ b/libjava/java/net/natInetAddress.cc @@ -35,7 +35,7 @@ details. */ #include #endif -#include +#include #include #include #include diff --git a/libjava/java/net/natPlainDatagramSocketImpl.cc b/libjava/java/net/natPlainDatagramSocketImpl.cc index 66e5dc221bf..2906ad50472 100644 --- a/libjava/java/net/natPlainDatagramSocketImpl.cc +++ b/libjava/java/net/natPlainDatagramSocketImpl.cc @@ -33,7 +33,7 @@ details. */ #include #endif -#include +#include #include #include #include diff --git a/libjava/java/net/natPlainSocketImpl.cc b/libjava/java/net/natPlainSocketImpl.cc index fc8d814471f..d30908ce7fc 100644 --- a/libjava/java/net/natPlainSocketImpl.cc +++ b/libjava/java/net/natPlainSocketImpl.cc @@ -25,8 +25,8 @@ details. */ #include #endif -#include -#include +#include +#include #include #include #include diff --git a/libjava/java/text/natCollator.cc b/libjava/java/text/natCollator.cc index 378ac5c448c..b29158d429d 100644 --- a/libjava/java/text/natCollator.cc +++ b/libjava/java/text/natCollator.cc @@ -12,7 +12,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/java/util/natDate.cc b/libjava/java/util/natDate.cc index fe0b2429062..8fd4ef185b0 100644 --- a/libjava/java/util/natDate.cc +++ b/libjava/java/util/natDate.cc @@ -14,7 +14,7 @@ details. */ #define _POSIX_PTHREAD_SEMANTICS #endif -#include +#include #include #include diff --git a/libjava/java/util/natGregorianCalendar.cc b/libjava/java/util/natGregorianCalendar.cc index 5f1374e79ce..4933b295a9a 100644 --- a/libjava/java/util/natGregorianCalendar.cc +++ b/libjava/java/util/natGregorianCalendar.cc @@ -22,7 +22,7 @@ details. */ #include #endif -#include +#include #include #include #include diff --git a/libjava/java/util/zip/natDeflater.cc b/libjava/java/util/zip/natDeflater.cc index 566f918a77a..d957e332677 100644 --- a/libjava/java/util/zip/natDeflater.cc +++ b/libjava/java/util/zip/natDeflater.cc @@ -15,7 +15,7 @@ details. */ #include #include -#include +#include #include #include diff --git a/libjava/java/util/zip/natInflater.cc b/libjava/java/util/zip/natInflater.cc index 6fc9e3deaab..da147b3c592 100644 --- a/libjava/java/util/zip/natInflater.cc +++ b/libjava/java/util/zip/natInflater.cc @@ -15,7 +15,7 @@ details. */ #include #include -#include +#include #include #include diff --git a/libjava/jni.cc b/libjava/jni.cc index e227c03662b..013fe1fd106 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -13,7 +13,7 @@ details. */ #include #include -#include +#include static jclass _Jv_JNI_GetSuperclass (JNIEnv *, jclass clazz) diff --git a/libjava/no-threads.cc b/libjava/no-threads.cc index d6e0298d219..22c30f637e2 100644 --- a/libjava/no-threads.cc +++ b/libjava/no-threads.cc @@ -10,7 +10,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/nogc.cc b/libjava/nogc.cc index 2d3676bdcca..3a31092ab66 100644 --- a/libjava/nogc.cc +++ b/libjava/nogc.cc @@ -13,7 +13,7 @@ details. */ #include #include -#include +#include #include // Total amount of memory allocated. diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index e2f3b1bab1a..2ddc9bff672 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -28,7 +28,7 @@ extern "C" #include #include -#include +#include #include #include #include diff --git a/libjava/prims.cc b/libjava/prims.cc index 3b0863c2d77..39d8d763d76 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -15,11 +15,12 @@ details. */ #include #include -#pragma implementation "java-array.h" +#pragma implementation "gcj/array.h" -#include +#include #include #include +#include #include #include diff --git a/libjava/quick-threads.cc b/libjava/quick-threads.cc index ed7ac5eac7b..1c031f0a9dd 100644 --- a/libjava/quick-threads.cc +++ b/libjava/quick-threads.cc @@ -10,7 +10,7 @@ details. */ #include -#include +#include #include #include diff --git a/libjava/resolve.cc b/libjava/resolve.cc index f13dff68d2c..00a340d7454 100644 --- a/libjava/resolve.cc +++ b/libjava/resolve.cc @@ -10,10 +10,12 @@ details. */ /* Author: Kresten Krab Thorup */ +#include + #include -#include #include +#include #include #include #include -- cgit v1.2.1