[kaffe] CVS kaffe (alex): adapted to DROPS/TUDOS default libc (uclibc) and added missing jthread_get_statu

Kaffe CVS cvs-commits at kaffe.org
Sun Nov 12 05:45:53 PST 2006


PatchSet 7442 
Date: 2006/11/12 13:45:04
Author: alex
Branch: HEAD
Tag: (none) 
Log:
adapted to DROPS/TUDOS default libc (uclibc) and added missing jthread_get_status

Members: 
	ChangeLog:1.4942->1.4943 
	config/i386/drops/config.frag:1.1->1.2 
	config/i386/drops/md.c:1.1->1.2 
	config/i386/drops/md.h:1.1->1.2 
	kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4942 kaffe/ChangeLog:1.4943
--- kaffe/ChangeLog:1.4942	Fri Nov 10 17:20:05 2006
+++ kaffe/ChangeLog	Sun Nov 12 13:45:04 2006
@@ -1,3 +1,14 @@
+2006-11-12  Alexander Boettcher <alex at kaffe.org>
+
+	* config/i386/drops/config.frag,
+	  config/i386/drops/md.c,
+	  config/i386/drops/md.h:
+	dummy adaptation to uclibc which is default for DROPS/TUDOS
+	uncertain dietlibc support in future
+	
+	* kaffe/kaffevm/systems/drops-l4threads/l4thread.c:
+	add dummy jthread_get_status
+	
 2006-11-10  Riccardo Mottola <riccardo at kaffe.org>
 
 	* libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:
Index: kaffe/config/i386/drops/config.frag
diff -u kaffe/config/i386/drops/config.frag:1.1 kaffe/config/i386/drops/config.frag:1.2
--- kaffe/config/i386/drops/config.frag:1.1	Fri Nov 25 13:41:27 2005
+++ kaffe/config/i386/drops/config.frag	Sun Nov 12 13:45:04 2006
@@ -9,6 +9,7 @@
 ac_cv_func_getaddrinfo='yes'
 ac_cv_func_getnameinfo='yes'
 ac_cv_header_time_h='no'  # global variable 'tzname'  not available
+ac_cv_var_tzname='no'
 ac_cv_func_localtime='no'     # no full support 
 ac_cv_func_shl_load='no'      # no support
 ac_cv_func_kill='no'          # we have no signals at all
@@ -17,6 +18,3 @@
 ac_cv_func_MD5Init='no'       # no support 
 am_cv_val_LC_MESSAGES='no'    # no support
 ac_cv_member_struct_tm_tm_zone='no'
-
-
-
Index: kaffe/config/i386/drops/md.c
diff -u kaffe/config/i386/drops/md.c:1.1 kaffe/config/i386/drops/md.c:1.2
--- kaffe/config/i386/drops/md.c:1.1	Fri Nov 25 13:41:27 2005
+++ kaffe/config/i386/drops/md.c	Sun Nov 12 13:45:04 2006
@@ -2,21 +2,29 @@
  * Getenv hack
  * Mockup implementations of unimplemented/unsupported functions in DROPS
  * 
- * Copyright (c) 2004, 2005
+ * Copyright (c) 2004 - 2006
  *	TU Dresden, Operating System Group.  All rights reserved.
  *
  * See the file "license.terms" for information on usage and redistribution
  * of this file.
  *
- * written by Alexander Boettcher <ab764283 at os.inf.tu-dresden.de>
+ * written by Alexander Boettcher <boettcher at os.inf.tu-dresden.de>
  */
 
 #include <stdio.h>      /* printf */
+#include <string.h>     /* memcpy, str* */
 #include <stdlib.h>     /* malloc, free */
 #include <fcntl.h>      /* O_RDONLY */
 #include <netdb.h>      /* gethostname, getservbyname, ... */
-#include <arpa/inet.h>  /* inet_addr */
-#include <sys/socket.h> /* getnameinfo */
+#include <signal.h>	/* kill */
+#ifdef USE_UCLIBC
+#include <unistd.h>     /* environ */
+#endif
+#include <sys/socket.h> /* getnameinfo, getaddrinfo, freeaddrinfo */
+#include <sys/types.h>  /* utime */
+#include <utime.h>      /* utime */
+#include <sys/wait.h>	/* waitpid */
+#include <sys/stat.h>	/* chmod */
 
 #include <l4/l4vfs/basic_name_server.h>
 #include <l4/log/l4log.h> /* LOG */
@@ -36,9 +44,15 @@
 const int l4thread_max_threads = 128;
 
 /**
- * following functions and variables not implemented by dietlibc
+ * functions and variables not implemented by dietlibc or by uclibc
  */
-int h_errno;  
+#ifdef USE_UCLIBC
+char **environ = NULL;
+#endif
+#ifdef USE_DIETLIBC
+int h_errno = 0;
+#endif
+
 int gethostname(char *name, size_t len)
 {
   LOG("to do : len=%d name=%s ", len, name);
@@ -58,7 +72,11 @@
   return 0;
 }
 
+#ifdef USE_UCLIBC
+int utime(const char* filename UNUSED, const struct utimbuf* buf UNUSED) {
+#else
 int utime(const char* filename UNUSED, struct utimbuf* buf UNUSED) {
+#endif
   LOG("to do");
   return 0;
 }
@@ -95,7 +113,7 @@
   return 0;
 }
 
-long sysconf(int name) {
+long sysconf(int name UNUSED) {
   LOG("to do");
   return 0;
 }
@@ -114,24 +132,28 @@
   return 0;
 }
 
-unsigned long int inet_addr(UNUSED const char* cp)
-{
-  LOG("to do");
-  return 0;
-}
-
 int fsync(int fd UNUSED) {
   LOG("to do");
   return 0;
 }
 
+#ifdef USE_UCLIBC
+int getnameinfo (const struct sockaddr *sa,
+		 socklen_t salen,
+		 char *host,
+		 socklen_t hostlen,
+		 UNUSED char *serv,
+	 	 UNUSED socklen_t servlen,
+		 UNUSED unsigned int flags)
+#else
 int getnameinfo(const struct sockaddr *sa,
-                socklen_t salen,
-                char *host,
-                size_t hostlen,
-                UNUSED char *serv,
-                UNUSED size_t servlen,
-                UNUSED int flags)
+		socklen_t salen,
+	       	char *host,
+		size_t hostlen,
+	       	UNUSED char *serv,
+	       	UNUSED size_t servlen,
+	       	UNUSED int flags)
+#endif
 {
   unsigned long iaddr = *(const unsigned long *)&sa->sa_data[2];
 
@@ -236,14 +258,6 @@
    area_immortal_init();
  #endif
 
-}
-
-void *CORBA_alloc(unsigned long size){
-  return malloc(size);
-}
-
-void CORBA_free(void * prt){
-  free(prt);
 }
 
 char * getenv(const char*env){
Index: kaffe/config/i386/drops/md.h
diff -u kaffe/config/i386/drops/md.h:1.1 kaffe/config/i386/drops/md.h:1.2
--- kaffe/config/i386/drops/md.h:1.1	Fri Nov 25 13:41:27 2005
+++ kaffe/config/i386/drops/md.h	Sun Nov 12 13:45:04 2006
@@ -1,20 +1,15 @@
 #ifndef __i386_drops_md_h
  #define __i386_drops_md_h
- /**
-  * defined in sys/resource.h
-  * at the moment the dietlibc does not provide this file
-  */
-// typedef unsigned long rlim_t;
- /**
-  * at the moment the dietlibc does not provide this
-  */
- typedef unsigned int  u_int;
+ #ifdef USE_DIETLIBC
+  /**
+   * dietlibc does not provide u_int
+   */
+  typedef unsigned int  u_int;
+ #endif
 
  #include "i386/common.h"
  #include "i386/sysdepCallMethod.h"
  #include "i386/threads.h"
  void drops_kaffe_main(int argc, char *argv[]);
  #define MAIN_MD drops_kaffe_main(argc, argv)
-
-
 #endif
Index: kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c
diff -u kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.2 kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.3
--- kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.2	Sat Mar 25 15:00:28 2006
+++ kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c	Sun Nov 12 13:45:05 2006
@@ -684,6 +684,11 @@
   return 0;
 }
 
+int jthread_get_status(jthread_t jt)
+{
+  printf("jthread_get_status todo\n");
+  return 0;
+}
 /*
  * Stop a thread
  */




More information about the kaffe mailing list