From fcbe85cdfe2b7f3a674e7f2d4e76e63f52e80241 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Fri, 8 Aug 2003 16:26:00 +0000 Subject: [PATCH] [multiple changes] 2003-08-08 Andrew Haley * Makefile.am (AM_CXXFLAGS): Define BOOT_CLASS_PATH. * Makefile.in: Rebuild. * java/lang/natRuntime.cc (insertSystemProperties): Add "sun.boot.class.path". 2003-08-07 Andrew Haley * java/io/PrintStream.java: Don't crash on a null string. From-SVN: r70250 --- libjava/ChangeLog | 11 +++++++++++ libjava/Makefile.am | 3 ++- libjava/Makefile.in | 3 ++- libjava/java/io/PrintStream.java | 2 +- libjava/java/lang/natRuntime.cc | 5 ++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8484ce7b52eb..1ada88c0a362 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,14 @@ +2003-08-08 Andrew Haley + + * Makefile.am (AM_CXXFLAGS): Define BOOT_CLASS_PATH. + * Makefile.in: Rebuild. + * java/lang/natRuntime.cc (insertSystemProperties): Add + "sun.boot.class.path". + +2003-08-07 Andrew Haley + + * java/io/PrintStream.java: Don't crash on a null string. + 2003-08-07 Rainer Orth * configure.in: Don't initialize GCINCS to boehm-gc/include. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index b9baa8322c78..cfbdbd80783a 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -101,7 +101,8 @@ AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions $(THREADCXXFLAGS) \ ## Detect bugs in the verifier implementation, and maybe other places. -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ - -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" + -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" \ + -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" if USING_GCC AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS) else diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 13912d010e9b..6ba2a9796058 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -198,7 +198,8 @@ AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions $(THREADCXXFLAGS) \ -fdollars-in-identifiers \ -Wswitch-enum \ @LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \ - -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" + -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" \ + -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" @USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS) @USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@ diff --git a/libjava/java/io/PrintStream.java b/libjava/java/io/PrintStream.java index 94800150870e..83668523ab86 100644 --- a/libjava/java/io/PrintStream.java +++ b/libjava/java/io/PrintStream.java @@ -256,7 +256,7 @@ public class PrintStream extends FilterOutputStream { pw.print (str); - if (auto_flush) + if (str != null && auto_flush) if ((str.indexOf ('\r') != -1) || (str.indexOf ('\n') != -1)) flush (); diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index 878fccba4aa4..b86da32f8f36 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -564,7 +564,7 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) if (_Jv_Jar_Class_Path) newprops->put(JvNewStringLatin1 ("java.class.path"), - JvNewStringLatin1 (_Jv_Jar_Class_Path)); + JvNewStringLatin1 (_Jv_Jar_Class_Path)); else { // FIXME: find libgcj.zip and append its path? @@ -586,6 +586,9 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) sb->toString ()); } + // The path to libgcj's boot classes + SET ("sun.boot.class.path", BOOT_CLASS_PATH); + // The name used to invoke this process (argv[0] in C). SET ("gnu.gcj.progname", _Jv_GetSafeArg (0));