[kaffe] CVS kaffe (robilad): fix for #65

Kaffe CVS cvs-commits at kaffe.org
Sun Sep 24 14:44:15 PDT 2006


PatchSet 7426 
Date: 2006/09/24 21:26:19
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fix for #65

2006-09-24  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:
        Reapplied strerror patch for darwin5.

        Fix for #65.

Members: 
	ChangeLog:1.4926->1.4927 
	libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4926 kaffe/ChangeLog:1.4927
--- kaffe/ChangeLog:1.4926	Sun Sep 24 18:21:08 2006
+++ kaffe/ChangeLog	Sun Sep 24 21:26:19 2006
@@ -1,5 +1,12 @@
 2006-09-24  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:
+	Reapplied strerror patch for darwin5.
+
+	Fix for #65.
+
+2006-09-24  Dalibor Topic  <robilad at kaffe.org>
+
 	* include/jsyscall.h, kaffe/kaffeh/support.c,
 	kaffe/kaffevm/systems/beos-native/syscalls.c, 
 	kaffe/kaffevm/systems/drops-l4threads/syscalls.c,
Index: kaffe/libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c
diff -u kaffe/libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:1.1 kaffe/libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:1.2
--- kaffe/libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c:1.1	Wed Oct 19 20:38:10 2005
+++ kaffe/libraries/javalib/external/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c	Sun Sep 24 21:26:23 2006
@@ -219,7 +219,7 @@
   fd_set except_fds;
   struct timeval real_time_data;
   struct timeval *time_data = NULL;
-  char message_buf[BUF_SIZE + 1];
+  char *message;
 
   /* If a legal timeout value isn't given, use NULL.
    * This means an infinite timeout. The specification
@@ -270,7 +270,8 @@
 
   if (result < 0)
     {
-
+#if defined(HAVE_STRERROR_R)
+      char message_buf[BUF_SIZE+1];
       int errorcode = -result;
 
       if (strerror_r (errorcode, message_buf, BUF_SIZE))
@@ -283,7 +284,12 @@
 	  return 0;
 	}
 
-      JCL_ThrowException (env, "java/io/IOException", message_buf);
+      message = message_buf;
+#else
+      message = strerror(errno);
+#endif
+
+      JCL_ThrowException (env, "java/io/IOException", message);
       return 0;
     }
 




More information about the kaffe mailing list