[kaffe] CVS kaffe (dalibor): Small fix for compiler warnings on Cygwin

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 19 10:57:02 PST 2003


PatchSet 4230 
Date: 2003/12/19 18:51:04
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Small fix for compiler warnings on Cygwin

2003-12-19  Dalibor Topic <robilad at kaffe.org>

        * libraries/clib/native/CharToByteIconv.c:
        Include unistd.h if available.
        (Java_kaffe_io_CharToByteIconv_convert): Fixed type mismatch
        warning.

        * libraries/clib/native/ByteToCharIconv.c:
        Include unistd.h if available.
        (Java_kaffe_io_ByteToCharIconv_convert): Fixed type mismatch
        warning.

Members: 
	ChangeLog:1.1819->1.1820 
	libraries/clib/native/ByteToCharIconv.c:1.6->1.7 
	libraries/clib/native/CharToByteIconv.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1819 kaffe/ChangeLog:1.1820
--- kaffe/ChangeLog:1.1819	Fri Dec 19 18:35:58 2003
+++ kaffe/ChangeLog	Fri Dec 19 18:51:04 2003
@@ -1,5 +1,17 @@
 2003-12-19  Dalibor Topic <robilad at kaffe.org>
 
+	* libraries/clib/native/CharToByteIconv.c:
+	Include unistd.h if available.
+	(Java_kaffe_io_CharToByteIconv_convert): Fixed type mismatch
+	warning.
+
+	* libraries/clib/native/ByteToCharIconv.c:
+        Include unistd.h if available.
+        (Java_kaffe_io_ByteToCharIconv_convert): Fixed type mismatch
+        warning.
+
+2003-12-19  Dalibor Topic <robilad at kaffe.org>
+
 	* kaffe/kaffevm/systems/unix-jthreads/jthread.c
 	(jthread_current, jthread_on_current_stack, 
 	jthread_stackcheck, jthread_relaxstack, 
Index: kaffe/libraries/clib/native/ByteToCharIconv.c
diff -u kaffe/libraries/clib/native/ByteToCharIconv.c:1.6 kaffe/libraries/clib/native/ByteToCharIconv.c:1.7
--- kaffe/libraries/clib/native/ByteToCharIconv.c:1.6	Fri Dec 12 16:14:19 2003
+++ kaffe/libraries/clib/native/ByteToCharIconv.c	Fri Dec 19 18:51:06 2003
@@ -23,6 +23,10 @@
 
 #include <errno.h>
 
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
 static jfieldID cd_id;
 static jmethodID carry_id;
 
@@ -71,7 +75,7 @@
 #if defined(HAVE_ICONV)
     jboolean	isCopy;
     jbyte	*jb = (*env)->GetByteArrayElements(env, fromBytes, &isCopy);
-    char	*icv_in = (char*) (jb + fromPos);
+    const char	*icv_in = (char*) (jb + fromPos);
     size_t	icv_inlen = fromLen;
     jchar	*jc  = (*env)->GetCharArrayElements(env, toChars, &isCopy);
     char	*icv_out = (char *) (jc + toPos);
Index: kaffe/libraries/clib/native/CharToByteIconv.c
diff -u kaffe/libraries/clib/native/CharToByteIconv.c:1.4 kaffe/libraries/clib/native/CharToByteIconv.c:1.5
--- kaffe/libraries/clib/native/CharToByteIconv.c:1.4	Fri Dec 12 16:14:19 2003
+++ kaffe/libraries/clib/native/CharToByteIconv.c	Fri Dec 19 18:51:06 2003
@@ -21,6 +21,10 @@
 #include <iconv.h>
 #endif
 
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
 static jfieldID cd_id;
 static jmethodID carry_id;
 
@@ -69,7 +73,7 @@
 #if defined(HAVE_ICONV)
     jboolean	isCopy;
     jchar	*jc  = (*env)->GetCharArrayElements(env, fromChars, &isCopy);
-    char	*icv_in = (char*) (jc + fromPos);
+    const char	*icv_in = (char*) (jc + fromPos);
     size_t	icv_inlen = fromLen * 2;
     jbyte	*jb = (*env)->GetByteArrayElements(env, toBytes, &isCopy);
     char	*icv_out = (char *) (jb + toPos);




More information about the kaffe mailing list