kaffe-0.10.0 on SunOS 4

Kiyo Inaba inaba at src.ricoh.co.jp
Mon May 18 01:45:36 PDT 1998


To make kaffe-0.10.0 work on Sparc/SunOS4 with static-lib/intrp,
I have to modify external_wrappers.h additionally. Attached
diff includes mods for both static and dynamic libraries.

And also, when I checked yesterday's (1998/05/17) snap, new
sysdepCallMethod (in config/sparc/common.h) does not work
with my environment. Details will follow.

Kiyo

diff -cr kaffe-0.10.0/config/sparc/sunos4/md.h kaffe-0.10.0-test/config/sparc/sunos4/md.h
*** kaffe-0.10.0/config/sparc/sunos4/md.h	Tue Mar 31 03:59:50 1998
--- kaffe-0.10.0-test/config/sparc/sunos4/md.h	Mon May 18 12:22:12 1998
***************
*** 15,22 ****
--- 15,49 ----
  #include "sparc/common.h"
  #include "sparc/threads.h"
  
+ /*
+  * Redefine stack pointer offset.
+  */
+ #undef  SP_OFFSET
+ #define SP_OFFSET       2
+ 
  #if defined(TRANSLATOR)
  #include "jit-md.h"
  #endif
+ 
+ /*
+  * <sjg> SunOS does not have prototypes which we need...
+  */
+ #ifndef __P
+ #if defined(__STDC__) || defined(__cplusplus)
+ #define __P(p)     p
+ #else
+ #define __P(p)     ()
+ #endif
+ #endif
+ 
+ int   rename __P((char *, char *));
+ int   remove __P((char *));
+ int   sendto __P((int, char *, int, int, struct sockaddr *, int));
+ int   socket __P((int, int, int));
+ int   setsockopt __P((int, int, int, char *, int *));
+ int   getsockopt __P((int, int, int, char *, int));
+ int   getsockname __P((int, struct sockaddr *, int *));
+ int   getpeername __P((int, struct sockaddr *, int *));
+ int   select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
  
  #endif
diff -cr kaffe-0.10.0/kaffe/kaffevm/Makefile.in kaffe-0.10.0-test/kaffe/kaffevm/Makefile.in
*** kaffe-0.10.0/kaffe/kaffevm/Makefile.in	Tue Mar 31 03:59:52 1998
--- kaffe-0.10.0-test/kaffe/kaffevm/Makefile.in	Mon May 18 12:25:14 1998
***************
*** 66,72 ****
  #
  # Use internal threads
  #
! COMMON+=	internal$(OBJEXT) \
  		internalCalls$(OBJEXT)
  
  
--- 66,72 ----
  #
  # Use internal threads
  #
! THREAD=		internal$(OBJEXT) \
  		internalCalls$(OBJEXT)
  
  
***************
*** 76,82 ****
  @cpu_frag@
  @cpu_os_frag@
  
! OBJECT=		$(COMMON) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS)
  
  mkkaffevm:	$(LLIB)
  
--- 76,82 ----
  @cpu_frag@
  @cpu_os_frag@
  
! OBJECT=		$(COMMON) $(THREAD) $(ENGINE_OBJECTS) $(CPU_OBJECTS) $(CPUOS_OBJECTS)
  
  mkkaffevm:	$(LLIB)
  
diff -cr kaffe-0.10.0/kaffe/kaffevm/external.c kaffe-0.10.0-test/kaffe/kaffevm/external.c
*** kaffe-0.10.0/kaffe/kaffevm/external.c	Tue Mar 31 03:59:51 1998
--- kaffe-0.10.0-test/kaffe/kaffevm/external.c	Mon May 18 13:22:02 1998
***************
*** 29,35 ****
  #include "support.h"
  #include "md.h"
  #if defined(NO_SHARED_LIBRARIES)
! #include "../../packages/external_native.h"
  #endif
  
  #if defined(NO_SHARED_LIBRARIES)
--- 29,35 ----
  #include "support.h"
  #include "md.h"
  #if defined(NO_SHARED_LIBRARIES)
! #include "../../libraries/clib/external_native.h"
  #endif
  
  #if defined(NO_SHARED_LIBRARIES)
diff -cr kaffe-0.10.0/libraries/clib/external_native.h kaffe-0.10.0-test/libraries/clib/external_native.h
*** kaffe-0.10.0/libraries/clib/external_native.h	Tue Mar 31 03:59:48 1998
--- kaffe-0.10.0-test/libraries/clib/external_native.h	Mon May 18 15:51:25 1998
***************
*** 15,34 ****
  
  #if defined(NO_SHARED_LIBRARIES)
  
- #if defined(TRANSLATOR)
  #define	KAFFE_NATIVE_PROTOTYPE(_f)	extern void _f();
  #define	KAFFE_NATIVE_METHOD(_n)		{ #_n, _n },
- #elif defined(INTERPRETER)
- #define	KAFFE_NATIVE_PROTOTYPE(_f)	extern void Kaffe_##_f##_stub();
- #define	KAFFE_NATIVE_METHOD(_n)		{ #_n, Kaffe_##_n##_stub },
- #endif
  
! #define	KAFFE_NATIVE(_f)	KAFFE_NATIVE_PROTOTYPE(_f)
  
  #include "external_wrappers.h"
  
  #undef	KAFFE_NATIVE
! #define	KAFFE_NATIVE(_f)	KAFFE_NATIVE_METHOD(_f)
  
  nativeFunction default_natives[] = {
  
--- 15,29 ----
  
  #if defined(NO_SHARED_LIBRARIES)
  
  #define	KAFFE_NATIVE_PROTOTYPE(_f)	extern void _f();
  #define	KAFFE_NATIVE_METHOD(_n)		{ #_n, _n },
  
! #define	KAFFE_NATIVE(_f)		KAFFE_NATIVE_PROTOTYPE(_f)
  
  #include "external_wrappers.h"
  
  #undef	KAFFE_NATIVE
! #define	KAFFE_NATIVE(_f)		KAFFE_NATIVE_METHOD(_f)
  
  nativeFunction default_natives[] = {
  
diff -cr kaffe-0.10.0/libraries/clib/math/external_wrappers.h kaffe-0.10.0-test/libraries/clib/math/external_wrappers.h
*** kaffe-0.10.0/libraries/clib/math/external_wrappers.h	Tue Mar 31 03:59:48 1998
--- kaffe-0.10.0-test/libraries/clib/math/external_wrappers.h	Mon May 18 17:00:09 1998
***************
*** 1,3 ****
--- 1,4 ----
+ #if defined(HAVE_LIBGMP)
  KAFFE_NATIVE(java_math_BigInteger_plumbInit)
  KAFFE_NATIVE(java_math_BigInteger_plumbAdd)
  KAFFE_NATIVE(java_math_BigInteger_plumbSubtract)
***************
*** 10,12 ****
--- 11,14 ----
  KAFFE_NATIVE(java_math_BigInteger_plumbModInverse)
  KAFFE_NATIVE(java_math_BigInteger_plumbSquare)
  KAFFE_NATIVE(java_math_BigInteger_plumbGeneratePrime)
+ #endif
diff -cr kaffe-0.10.0/libraries/clib/zip/external_wrappers.h kaffe-0.10.0-test/libraries/clib/zip/external_wrappers.h
*** kaffe-0.10.0/libraries/clib/zip/external_wrappers.h	Tue Mar 31 03:59:48 1998
--- kaffe-0.10.0-test/libraries/clib/zip/external_wrappers.h	Mon May 18 16:56:40 1998
***************
*** 1,3 ****
--- 1,4 ----
+ #if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
  KAFFE_NATIVE(java_util_zip_Adler32_update)
  KAFFE_NATIVE(java_util_zip_Adler32_update1)
  KAFFE_NATIVE(java_util_zip_CRC32_update)
***************
*** 18,20 ****
--- 19,22 ----
  KAFFE_NATIVE(java_util_zip_Inflater_reset)
  KAFFE_NATIVE(java_util_zip_Inflater_end)
  KAFFE_NATIVE(java_util_zip_Inflater_init)
+ #endif


More information about the kaffe mailing list