aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libjava/ChangeLog12
-rw-r--r--libjava/gnu/gcj/convert/natIconv.cc4
-rw-r--r--libjava/gnu/gcj/runtime/FileDeleter.java11
-rw-r--r--libjava/java/lang/fdlibm.h4
-rw-r--r--libjava/java/lang/natSystem.cc2
-rw-r--r--libjava/java/net/natPlainDatagramSocketImpl.cc6
6 files changed, 20 insertions, 19 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index ddde20e..9a14014 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,15 @@
+2000-09-05 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * gnu/gcj/convert/natIconv.cc (read): Remove unused local.
+ (write): Ditto.
+ * gnu/gcj/runtime/FileDeleter.java (deleteOnExitNow): Check for null
+ stack. Synchronize.
+ * java/lang/fdlibm.h: #undef __P if previously defined.
+ * java/lang/natSystem.cc (currentTimeMillis): Remove unused local.
+ * java/net/natPlainDatagramSocketImpl.cc (send): Remove unreachable
+ block.
+ (mcastGrp): Ditto.
+
2000-09-04 Tom Tromey <tromey@cygnus.com>
* java/util/zip/ZipFile.java (ZipFile): Delete file when opened in
diff --git a/libjava/gnu/gcj/convert/natIconv.cc b/libjava/gnu/gcj/convert/natIconv.cc
index 7875e9b..fe79dc1 100644
--- a/libjava/gnu/gcj/convert/natIconv.cc
+++ b/libjava/gnu/gcj/convert/natIconv.cc
@@ -70,8 +70,6 @@ gnu::gcj::convert::Input_iconv::read (jcharArray outbuffer,
jint outpos, jint count)
{
#ifdef HAVE_ICONV
- jint origpos = outpos;
-
jbyte *bytes = elements (inbuffer);
jchar *out = elements (outbuffer);
size_t inavail = inlength - inpos;
@@ -131,8 +129,6 @@ gnu::gcj::convert::Output_iconv::write (jcharArray inbuffer,
jint inpos, jint count)
{
#ifdef HAVE_ICONV
- jint origpos = inpos;
-
jchar *chars = elements (inbuffer);
jbyte *out = elements (buf);
diff --git a/libjava/gnu/gcj/runtime/FileDeleter.java b/libjava/gnu/gcj/runtime/FileDeleter.java
index cc7aa9d..d5f99d0 100644
--- a/libjava/gnu/gcj/runtime/FileDeleter.java
+++ b/libjava/gnu/gcj/runtime/FileDeleter.java
@@ -23,16 +23,13 @@ public final class FileDeleter
// Helper method called by java.lang.Runtime.exit() to perform
// pending deletions.
- public static void deleteOnExitNow ()
+ public synchronized static void deleteOnExitNow ()
{
- while (!deleteOnExitStack.empty ())
- ((File)(deleteOnExitStack.pop ())).delete ();
+ if (deleteOnExitStack != null)
+ while (!deleteOnExitStack.empty ())
+ ((File)(deleteOnExitStack.pop ())).delete ();
}
// A stack of files to delete upon normal termination.
private static Stack deleteOnExitStack;
}
-
-
-
-
diff --git a/libjava/java/lang/fdlibm.h b/libjava/java/lang/fdlibm.h
index 228208f..1544c0a 100644
--- a/libjava/java/lang/fdlibm.h
+++ b/libjava/java/lang/fdlibm.h
@@ -23,6 +23,10 @@
/* CYGNUS LOCAL: Default to XOPEN_MODE. */
#define _XOPEN_MODE
+#ifdef __P
+#undef __P
+#endif
+
#ifdef __STDC__
#define __P(p) p
#else
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc
index 39deab2..1ea29b3 100644
--- a/libjava/java/lang/natSystem.cc
+++ b/libjava/java/lang/natSystem.cc
@@ -140,8 +140,6 @@ java::lang::System::arraycopy (jobject src, jint src_offset,
jlong
java::lang::System::currentTimeMillis (void)
{
- jlong r;
-
struct timeval tv;
_Jv_gettimeofday (&tv);
return (jlong) tv.tv_sec * 1000 + tv.tv_usec / 1000;
diff --git a/libjava/java/net/natPlainDatagramSocketImpl.cc b/libjava/java/net/natPlainDatagramSocketImpl.cc
index 2fac17e..78c2c2a 100644
--- a/libjava/java/net/natPlainDatagramSocketImpl.cc
+++ b/libjava/java/net/natPlainDatagramSocketImpl.cc
@@ -287,9 +287,6 @@ java::net::PlainDatagramSocketImpl::send (java::net::DatagramPacket *p)
if (::sendto (fnum, (char *) dbytes, p->getLength(), 0, ptr, len) >= 0)
return;
- error:
- char* strerr = strerror (errno);
- JvThrow (new java::io::IOException (JvNewStringUTF (strerr)));
}
void
@@ -420,9 +417,6 @@ java::net::PlainDatagramSocketImpl::mcastGrp (java::net::InetAddress *inetaddr,
if (::setsockopt (fnum, level, opname, ptr, len) == 0)
return;
- error:
- char* strerr = strerror (errno);
- JvThrow (new java::io::IOException (JvNewStringUTF (strerr)));
}
void