[kaffe] CVS kaffe (robilad): Added port to i386-interix6.

Kaffe CVS cvs-commits at kaffe.org
Mon Aug 6 05:50:30 PDT 2007


PatchSet 7507 
Date: 2007/08/06 12:49:00
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
2007-08-06  Dalibor Topic  <robilad at kaffe.org>

        Added port to i386-interix6.

        * config/i386/interix6/config.frag,
        config/i386/interix6/jit-md.h,
        config/i386/interix6/md.c,
        config/i386/interix6/md.h:
        New files.

        * config/config.alias: Added interix.
        * include/system.h: Define file separators for interix.
        * kaffe/kaffevm/intrp/methodcalls.c: Only include alloca.h,
        if it is detected by configure.
        * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c (jthread_sleep):
        Interix uses usleep instead of nanosleep.
        * libraries/clib/native/java_lang_Object.c (PRIi64): Define if not
        defined before.
        * libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:
        Include sys/time.h.

Members: 
	ChangeLog:1.5005->1.5006 
	config/config.alias:1.27->1.28 
	config/i386/interix6/config.frag:INITIAL->1.1 
	config/i386/interix6/jit-md.h:INITIAL->1.1 
	config/i386/interix6/md.c:INITIAL->1.1 
	config/i386/interix6/md.h:INITIAL->1.1 
	include/system.h:1.15->1.16 
	kaffe/kaffevm/intrp/methodcalls.c:1.15->1.16 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.94->1.95 
	libraries/clib/native/java_lang_Object.c:1.1->1.2 
	libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5005 kaffe/ChangeLog:1.5006
--- kaffe/ChangeLog:1.5005	Mon Aug  6 12:13:20 2007
+++ kaffe/ChangeLog	Mon Aug  6 12:49:00 2007
@@ -1,5 +1,26 @@
 2007-08-06  Dalibor Topic  <robilad at kaffe.org>
 
+	Added port to i386-interix6.
+
+	* config/i386/interix6/config.frag,
+	config/i386/interix6/jit-md.h,
+	config/i386/interix6/md.c,
+	config/i386/interix6/md.h:
+	New files.
+
+	* config/config.alias: Added interix.
+	* include/system.h: Define file separators for interix.
+	* kaffe/kaffevm/intrp/methodcalls.c: Only include alloca.h,
+	if it is detected by configure.
+	* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c (jthread_sleep):
+	Interix uses usleep instead of nanosleep.
+	* libraries/clib/native/java_lang_Object.c (PRIi64): Define if not
+	defined before.
+	* libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:
+	Include sys/time.h.
+
+2007-08-06  Dalibor Topic  <robilad at kaffe.org>
+
 	Merged in plugin fix for automake 1.10 LDFLAGS issue from GNU Classpath,
 	and regenerated generated files.
 
Index: kaffe/config/config.alias
diff -u kaffe/config/config.alias:1.27 kaffe/config/config.alias:1.28
--- kaffe/config/config.alias:1.27	Thu Nov 16 23:26:03 2006
+++ kaffe/config/config.alias	Mon Aug  6 12:49:01 2007
@@ -47,5 +47,6 @@
 sysv*)		Khost_os=univel_svr4 ;;
 ultrix4*)	Khost_os=ultrix4 ;;
 uclinux*)	Khost_os=uclinux ;;
+interix*)	Khost_os=interix6 ;;
 
 esac
===================================================================
Checking out kaffe/config/i386/interix6/config.frag
RCS:  /home/cvs/kaffe/kaffe/config/i386/interix6/config.frag,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/i386/interix6/config.frag	Mon Aug  6 12:50:29 2007
@@ -0,0 +1,6 @@
+#
+# i386/interix6 configuration
+#
+Khost_cpu=i386
+Khost_os=interix6
+CFLAGS="$CFLAGS -g -O0"
===================================================================
Checking out kaffe/config/i386/interix6/jit-md.h
RCS:  /home/cvs/kaffe/kaffe/config/i386/interix6/jit-md.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/i386/interix6/jit-md.h	Mon Aug  6 12:50:29 2007
@@ -0,0 +1,37 @@
+/*
+ * i386/i386/interix6/jit-md.h
+ * Windows Vista Ultimate Interix 6 i386 JIT configuration information.
+ *
+ * Copyright (c) 1996, 1997
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2007
+ *	Kaffe.org contributors.  See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __i386_interix6_jit_md_h
+#define __i386_interix6_jit_md_h
+
+/**/
+/* Include common information. */
+/**/
+#include "i386/jit.h"
+
+/**/
+/* Extra exception handling information. */
+/**/
+
+/*
+ * No signal handler support yet!!
+ */
+#define	EXCEPTIONPROTO							\
+	int sig
+
+#define	EXCEPTIONFRAME(f, c)						\
+	(f).retbp = 0;							\
+	(f).retpc = 0
+
+#endif
===================================================================
Checking out kaffe/config/i386/interix6/md.c
RCS:  /home/cvs/kaffe/kaffe/config/i386/interix6/md.c,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/i386/interix6/md.c	Mon Aug  6 12:50:29 2007
@@ -0,0 +1,10 @@
+/*
+ * i386/cygwin32/md.c
+ * Windows'95 (Cygnus GNU C) i386 specific functions.
+ *
+ * Copyright (c) 1996, 1997
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
===================================================================
Checking out kaffe/config/i386/interix6/md.h
RCS:  /home/cvs/kaffe/kaffe/config/i386/interix6/md.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/i386/interix6/md.h	Mon Aug  6 12:50:29 2007
@@ -0,0 +1,43 @@
+/*
+ * i386/interix6/md.h
+ * Windows Vista Ultimate Interix i386 configuration information.
+ *
+ * Copyright (c) 1996, 1997
+ *	Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003, 2007
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __i386_interix6_md_h
+#define __i386_interix6_md_h
+
+/**/
+/* Thread handling */
+/**/
+#include "i386/common.h"
+#include "i386/threads.h"
+
+/* It looks like that cygwin/gcc is aligning uint64 on 8 bytes.
+ * Putting this here fixes kaffe behaviour.
+ */
+#undef ALIGNMENT_OF_SIZE
+#define ALIGNMENT_OF_SIZE(S)    ((S) < 8 ? (S) : 8)
+
+/* Redefine the stack pointer offset */
+#undef SP_OFFSET
+#define	SP_OFFSET	4
+
+#define SIGNAL_ARGS(sig, sc) int sig
+#define SIGNAL_CONTEXT_POINTER(scp) int scp
+#define GET_SIGNAL_CONTEXT_POINTER(sc) (NULL)
+#define SIGNAL_PC(scp) (0)
+
+#if defined(TRANSLATOR)
+#include "jit-md.h"
+#endif
+
+#endif
Index: kaffe/include/system.h
diff -u kaffe/include/system.h:1.15 kaffe/include/system.h:1.16
--- kaffe/include/system.h:1.15	Wed Apr 19 23:19:25 2006
+++ kaffe/include/system.h	Mon Aug  6 12:49:01 2007
@@ -15,7 +15,7 @@
 #ifndef __system_h
 #define __system_h
 
-#if defined(unix) || defined(__unix__) || defined(__BEOS__) || defined(_AIX) || defined(__NetBSD__) || defined(__APPLE__) || defined(__uclinux__)
+#if defined(unix) || defined(__unix__) || defined(__BEOS__) || defined(_AIX) || defined(__NetBSD__) || defined(__APPLE__) || defined(__uclinux__) || defined(__INTERIX)
 #define	file_separator		"/"
 #define	path_separator		":"
 #define	line_separator		"\n"
Index: kaffe/kaffe/kaffevm/intrp/methodcalls.c
diff -u kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.15 kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.16
--- kaffe/kaffe/kaffevm/intrp/methodcalls.c:1.15	Sat Apr 22 20:56:09 2006
+++ kaffe/kaffe/kaffevm/intrp/methodcalls.c	Mon Aug  6 12:49:01 2007
@@ -28,6 +28,10 @@
 #include "jni_i.h"
 #include "exception.h"
 
+#if defined(HAVE_ALLOCA_H)
+#include <alloca.h>
+#endif
+
 void *
 engine_buildTrampoline (Method *meth, void **where, errorInfo *einfo UNUSED)
 {
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.94 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.95
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.94	Thu Nov 16 23:26:04 2006
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Mon Aug  6 12:49:01 2007
@@ -1177,12 +1177,20 @@
 void 
 jthread_sleep (jlong timeout) 
 {
+#ifdef __INTERIX
+	unsigned int seconds = timeout / 1000;
+	useconds_t   microseconds = (timeout % 1000) * 1000;
+
+	if (0 == sleep(seconds))
+		usleep(microseconds);
+#else
 	struct timespec ts;
 
 	ts.tv_sec  = timeout / 1000;
 	ts.tv_nsec = (timeout % 1000) * 1000000;
 
 	nanosleep (&ts, NULL);
+#endif
 }
 
 /***********************************************************************
Index: kaffe/libraries/clib/native/java_lang_Object.c
diff -u kaffe/libraries/clib/native/java_lang_Object.c:1.1 kaffe/libraries/clib/native/java_lang_Object.c:1.2
--- kaffe/libraries/clib/native/java_lang_Object.c:1.1	Mon Nov 27 21:47:21 2006
+++ kaffe/libraries/clib/native/java_lang_Object.c	Mon Aug  6 12:49:01 2007
@@ -105,7 +105,16 @@
   if(KTHREAD(interrupted)(cur))
     {
       throwException(InterruptedException);
+
     }
+
+#ifndef PRIi64
+#if SIZEOF_LONG == 8
+#define PRIi64	"li"
+#elif SIZEOF_LONG_LONG == 8
+#define PRIi64  "lli"
+#endif
+#endif
 
 DBG(VMTHREAD, dprintf ("%p (%p) waiting for %p, %" PRIi64 "\n",
 			cur, KTHREAD(get_data)(cur)->jlThread,
Index: kaffe/libraries/javalib/external/classpath/native/jni/java-nio/javanio.h
diff -u kaffe/libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:1.1 kaffe/libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:1.2
--- kaffe/libraries/javalib/external/classpath/native/jni/java-nio/javanio.h:1.1	Fri Jan  5 15:03:09 2007
+++ kaffe/libraries/javalib/external/classpath/native/jni/java-nio/javanio.h	Mon Aug  6 12:49:01 2007
@@ -39,6 +39,8 @@
 #ifndef __JAVANIO_H__
 #define __JAVANIO_H__
 
+#include <sys/time.h>
+
 /**
  * This header defines functions that are called by our JNI reference
  * implementation of java.nio.*. In our reference implementation, these




More information about the kaffe mailing list