[kaffe] CVS kaffe (robilad): Reverted the ltdl.c change again, sigh.

2004-12-21 Thread Kaffe CVS
PatchSet 5698 
Date: 2004/12/21 08:57:38
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Reverted the ltdl.c change again, sigh.

Members: 
libltdl/ltdl.c:1.42-1.43 

Index: kaffe/libltdl/ltdl.c
diff -u kaffe/libltdl/ltdl.c:1.42 kaffe/libltdl/ltdl.c:1.43
--- kaffe/libltdl/ltdl.c:1.42   Tue Dec 21 08:47:10 2004
+++ kaffe/libltdl/ltdl.cTue Dec 21 08:57:38 2004
@@ -249,7 +249,7 @@
 #endif
 
 #define LT_DLMEM_REASSIGN(p, q)LT_STMT_START { \
-   if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; }   \
+   if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = NULL; }
\
} LT_STMT_END
 
 
@@ -265,7 +265,7 @@
 strdup(str)
  const char *str;
 {
-  char *tmp = 0;
+  char *tmp = NULL;
 
   if (str)
 {
@@ -820,7 +820,7 @@
 lt_dlerror_table
 #undef LT_ERROR
 
-0
+NULL
   };
 
 /* This structure is used for the list of registered loaders. */
@@ -897,11 +897,11 @@
 
 /* The mutex functions stored here are global, and are necessarily the
same for all threads that wish to share access to libltdl.  */
-static lt_dlmutex_lock *lt_dlmutex_lock_func = 0;
-static lt_dlmutex_unlock   *lt_dlmutex_unlock_func   = 0;
-static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0;
-static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0;
-static const char  *lt_dllast_error  = 0;
+static lt_dlmutex_lock *lt_dlmutex_lock_func = NULL;
+static lt_dlmutex_unlock   *lt_dlmutex_unlock_func   = NULL;
+static lt_dlmutex_seterror *lt_dlmutex_seterror_func = NULL;
+static lt_dlmutex_geterror *lt_dlmutex_geterror_func = NULL;
+static const char  *lt_dllast_error  = NULL;
 
 
 /* Either set or reset the mutex functions.  Either all the arguments must
@@ -950,7 +950,7 @@
 /* --- ERROR HANDLING --- */
 
 
-static const char**user_error_strings  = 0;
+static const char**user_error_strings  = NULL;
 static int errorcount  = LT_ERROR_MAX;
 
 int
@@ -959,7 +959,7 @@
 {
   int  errindex = 0;
   int  result   = -1;
-  const char  **temp = (const char **) 0;
+  const char  **temp = NULL;
 
   assert (diagnostic);
 
@@ -1151,9 +1151,9 @@
 #  ifdef NEED_USCORE
 _,
 #  else
-0,
+NULL,
 #  endif
-sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 };
+sys_dl_open, sys_dl_close, sys_dl_sym, NULL, NULL };
 
 
 #endif /* HAVE_LIBDL */
@@ -1940,8 +1940,8 @@
   const lt_dlsymlist  *syms;
 } lt_dlsymlists_t;
 
-static const lt_dlsymlist *default_preloaded_symbols   = 0;
-static lt_dlsymlists_t*preloaded_symbols   = 0;
+static const lt_dlsymlist *default_preloaded_symbols   = NULL;
+static lt_dlsymlists_t*preloaded_symbols   = NULL;
 
 static int
 presym_init (loader_data)
@@ -1951,7 +1951,7 @@
 
   LT_DLMUTEX_LOCK ();
 
-  preloaded_symbols = 0;
+  preloaded_symbols = NULL;
   if (default_preloaded_symbols)
 {
   errors = lt_dlpreload (default_preloaded_symbols);
@@ -1977,7 +1977,7 @@
   lists = lists-next;
   LT_DLFREE (tmp);
 }
-  preloaded_symbols = 0;
+  preloaded_symbols = NULL;
 
   LT_DLMUTEX_UNLOCK ();
 
@@ -2086,7 +2086,7 @@
  lt_module module;
 {
   /* Just to silence gcc -Wall */
-  module = 0;
+  module = NULL;
   return 0;
 }
 
@@ -2111,11 +2111,11 @@
 
   LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND));
 
-  return 0;
+  return NULL;
 }
 
 static struct lt_user_dlloader presym = {
-  0, presym_open, presym_close, presym_sym, presym_exit, 0
+  NULL, presym_open, presym_close, presym_sym, presym_exit, NULL
 };
 
 
@@ -2189,9 +2189,9 @@
 size_t *pargz_len));
 static int file_not_foundLT_PARAMS((void));
 
-static char   *user_search_path= 0;
-static lt_dlloader*loaders = 0;
-static lt_dlhandle handles = 0;
+static char   *user_search_path= NULL;
+static lt_dlloader*loaders = NULL;
+static lt_dlhandle handles = NULL;
 static int initialized = 0;
 
 /* Initialize libltdl. */
@@ -2205,20 +2205,20 @@
   /* Initialize only at first call. */
   if (++initialized == 1)
 {
-  handles = 0;
-  user_search_path = 0; /* empty search path */
+  handles = NULL;
+  user_search_path = NULL; /* empty search path */
 
 #if HAVE_LIBDL
-  errors += lt_dlloader_add (lt_dlloader_next (0), sys_dl, dlopen);
+  errors += lt_dlloader_add (lt_dlloader_next (NULL), sys_dl, dlopen);
 #endif
 #if HAVE_SHL_LOAD
-  errors += lt_dlloader_add (lt_dlloader_next (0), sys_shl, dlopen);
+  errors += lt_dlloader_add (lt_dlloader_next (NULL), sys_shl, dlopen);
 #endif
 #ifdef __WINDOWS__
-  errors += lt_dlloader_add (lt_dlloader_next (0), sys_wll, dlopen);
+  errors += lt_dlloader_add (lt_dlloader_next (NULL), sys_wll, dlopen);
 #endif
 #ifdef __BEOS__
-  

[kaffe] CVS kaffe (doogie): Added myself.

2004-12-21 Thread Kaffe CVS
PatchSet 5695 
Date: 2004/12/21 08:07:12
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
Added myself.

Members: 
AUTHORS:1.3-1.4 
ChangeLog:1.3241-1.3242 

Index: kaffe/AUTHORS
diff -u kaffe/AUTHORS:1.3 kaffe/AUTHORS:1.4
--- kaffe/AUTHORS:1.3   Thu Oct 16 17:13:57 2003
+++ kaffe/AUTHORS   Tue Dec 21 08:07:12 2004
@@ -20,5 +20,6 @@
 Patrick A Tullmann
 Mark Wielaard
 Tim Wilkinson
+Adam Heath
 
 ... and many others, listed in the ChangeLog* files
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3241 kaffe/ChangeLog:1.3242
--- kaffe/ChangeLog:1.3241  Tue Dec 21 08:06:31 2004
+++ kaffe/ChangeLog Tue Dec 21 08:07:12 2004
@@ -1,5 +1,10 @@
 2004-12-21  Adam Heath  [EMAIL PROTECTED]
 
+   * AUTHORS:
+ Added myself.
+
+2004-12-21  Adam Heath  [EMAIL PROTECTED]
+
* kaffe/kaffevm/classMethod.c, kaffe/kaffevm/findInJar.c,
  kaffe/kaffevm/gc.h, kaffe/kaffevm/gcFuncs.c,
  kaffe/kaffevm/hashtab.c, kaffe/kaffevm/jar.c, kaffe/kaffevm/jar.h,

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] CVS kaffe (doogie): Various gcc and sparse fixes all over the board.

2004-12-21 Thread Helmer Krämer
On Tue, 21 Dec 2004 00:11:20 -0800
Kaffe CVS [EMAIL PROTECTED] wrote:

Hi,

 @@ -66,7 +66,7 @@
  
  #if defined(HANDLE_MANIFEST_CLASSPATH)
  static int isEntryInClasspath(const char*);
 -static uint8* getManifestMainAttribute(jarFile*, char*);
 +static uint8* getManifestMainAttribute(jarFile*, const char*);
  static void handleManifestClassPath (classpathEntry *);
  #endif
  
 @@ -134,9 +134,8 @@
   case CP_DIR:
   case CP_ZIPFILE:
   class = newClass();
 - if (class == 0) {
 + if (class == NULL) {
   postOutOfMemory(einfo);
 - KFREE(hand.base);
   return (NULL);
   }
  
 @@ -144,14 +143,13 @@
   class-centry = centry;
   class = readClass(class, hand, NULL, einfo);
  
 - if (hand.base != 0) {
 + if (hand.base != NULL) {
  #if defined(KAFFE_STATS)
   if (hand.type == CP_ZIPFILE) {
   addToCounter(jarmem, vmmem-jar files, 1,
   -(jlong)GCSIZEOF(hand.base));
   }
  #endif
 - KFREE(hand.base);
   }
   return (class);

I think the removal of these two KFREE calls will leak memory, won't it?

Regards,
Helmer

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] CVS kaffe (stack): Checkpoint of jitter for linux/ppc.

2004-12-21 Thread Timothy Stack
 
 Hi Tim,
 
 Your patch is great but you have forgotten the code compatibility with 
 JIT for jitCodeHeader.
 I think it is simple to adapt but could you do it ? It breaks the 
 compilation on platforms which
 only supports JIT.

I don't understand the problem...  Do you have some output I can look at?  
Or, can you be more specific about what is going on?

 Guilhem Lavaux.

tim

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (stack): Fix a simple syntax error.

2004-12-21 Thread Kaffe CVS
PatchSet 5702 
Date: 2004/12/21 17:56:39
Author: stack
Branch: HEAD
Tag: (none) 
Log:
Fix a simple syntax error.

Members: 
ChangeLog:1.3247-1.3248 
kaffe/kaffevm/external.c:1.74-1.75 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3247 kaffe/ChangeLog:1.3248
--- kaffe/ChangeLog:1.3247  Tue Dec 21 17:31:24 2004
+++ kaffe/ChangeLog Tue Dec 21 17:56:39 2004
@@ -1,3 +1,8 @@
+2004-12-21  Timothy S. Stack  [EMAIL PROTECTED]
+
+   * kaffe/kaffevm/external.c:
+   Fix a typo.
+   
 2004-12-21  Guilhem Lavaux  [EMAIL PROTECTED]
 
* libraries/clib/native/Class.c
Index: kaffe/kaffe/kaffevm/external.c
diff -u kaffe/kaffe/kaffevm/external.c:1.74 kaffe/kaffe/kaffevm/external.c:1.75
--- kaffe/kaffe/kaffevm/external.c:1.74 Tue Dec 21 16:51:05 2004
+++ kaffe/kaffe/kaffevm/external.c  Tue Dec 21 17:56:42 2004
@@ -377,7 +377,7 @@
 loadNativeLibrarySym(const char* name)
 {
   int i = 0;
-  void* func = NULL;;
+  void* func = NULL;
   int iLockRoot;
 
   lockStaticMutex(libraryLock);

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] CVS kaffe (hkraemer): merged java.lang.ClassLoader from GNU Classpath

2004-12-21 Thread Kaffe CVS
PatchSet 5700 
Date: 2004/12/21 16:51:01
Author: hkraemer
Branch: HEAD
Tag: (none) 
Log:
merged java.lang.ClassLoader from GNU Classpath

Members: 
ChangeLog:1.3245-1.3246 
include/Makefile.am:1.79-1.80 
include/Makefile.in:1.197-1.198 
kaffe/kaffe/main.c:1.73-1.74 
kaffe/kaffevm/classMethod.h:1.72-1.73 
kaffe/kaffevm/classPool.c:1.31-1.32 
kaffe/kaffevm/external.c:1.73-1.74 
kaffe/kaffevm/external.h:1.9-1.10 
kaffe/kaffevm/gcFuncs.c:1.61-1.62 
kaffe/kaffevm/thread.c:1.87-1.88 
libraries/clib/native/Class.c:1.77-1.78 
libraries/clib/native/ClassLoader.c:1.39-1.40 
libraries/clib/native/Makefile.am:1.37-1.38 
libraries/clib/native/Makefile.in:1.163-1.164 
libraries/clib/native/NativeLibrary.c:1.6-1.7(DEAD) 
libraries/clib/native/Runtime.c:1.29-1.30 
libraries/javalib/Makefile.am:1.278-1.279 
libraries/javalib/Makefile.in:1.359-1.360 
libraries/javalib/all.files:1.59-1.60 
libraries/javalib/bootstrap.classlist:1.65-1.66 
libraries/javalib/gnu/java/util/DoubleEnumeration.java:INITIAL-1.1 
libraries/javalib/java/lang/Class.java:1.50-1.51 
libraries/javalib/java/lang/ClassLoader.java:1.34-1.35 
libraries/javalib/java/lang/NativeLibrary.java:1.5-1.6(DEAD) 
libraries/javalib/java/lang/Runtime.java:1.30-1.31 
libraries/javalib/java/lang/System.java:1.42-1.43 
libraries/javalib/java/lang/VMClassLoader.java:INITIAL-1.1 
libraries/javalib/kaffe/lang/PrimordialClassLoader.java:1.6-1.7 
libraries/javalib/kaffe/lang/ThreadStack.java:1.3-1.4 
test/regression/KaffeInternal.java:1.1-1.2 
test/regression/Makefile.am:1.90-1.91 
test/regression/Makefile.in:1.195-1.196 
test/regression/PrimordialLoaderTest.java:INITIAL-1.1 
test/regression/ProcessClassInst.java:1.11-1.12 
test/regression/ProcessClassStop.java:1.10-1.11 
test/regression/ProhibitedClass.java:1.5-1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3245 kaffe/ChangeLog:1.3246
--- kaffe/ChangeLog:1.3245  Tue Dec 21 11:46:51 2004
+++ kaffe/ChangeLog Tue Dec 21 16:51:01 2004
@@ -1,5 +1,52 @@
 2004-12-21  Helmer Kraemer  [EMAIL PROTECTED]
 
+   Merged java.lang.ClassLoader from GNU Classpath
+
+   * kaffe/kaffevm/external.c, kaffe/kaffevm/external.h, 
kaffe/kaffevm/classPool.c,
+   kaffe/kaffe/main.c: keep track of the associated class loader of a 
native library;
+   unload native libraries when a class loader is gced, throw an exception 
if a
+   library is loaded by more than one class loader
+   
+   * kaffe/kaffevm/gcFuncs.c, kaffe/kaffevm/classMethod.h: add 
protectionDomain field
+   to Hjava_lang_Class
+
+   * libraries/javalib/kaffe/lang/ThreadStack.java, 
kaffe/kaffevm/thread.c: use
+   ClassLoader.getSystemClassLoader instead of AppClassLoader.getSingleton 
so we
+   don't mess up the initialization order of the runtime library
+
+   * libraries/javalib/java/lang/ClassLoader.java, 
gnu/java/util/DoubleEnumeration.java:
+   new files, taken from GNU classpath
+
+   * libraries/javalib/java/lang/VMClassLoader.java: new file
+
+   * libraries/javalib/java/lang/Class.java, libraries/clib/native/Class.c,
+   libraries/clib/native/ClassLoader.c: updated to class loader changes
+
+   * libraries/javalib/kaffe/lang/PrimordialClassLoader.java: deny loading 
of classes
+   from the gnu.classpath package
+   
+   * libraries/javalib/java/lang/System.java, 
libraries/javalib/java/lang/Runtime.java:
+   moved handling of native libraries into java.lang.Runtime.
+   
+   * libraries/javalib/java/lang/NativeLibrary.java,
+   libraries/clib/native/NativeLibrary.c: removed
+
+   * libraries/javalib/bootstrap.classlist, libraries/javalib/all.files,
+   libraries/javalib/Makefile.am, libraries/javalib/Makefile.in, 
include/Makefile.am,
+   include/Makefile.in: updated
+
+   * test/regression/ProcessClassInst.java, 
test/regression/ProcessClassStop.java,
+   ProhibitedClass.java: updated expected output
+
+   * test/regression/KaffeInternal.java: check that access to gnu.classpath
+   package is denied for non-bootstrap classes
+
+   * test/regression/Makefile.am, test/regression/Makefile.in,
+   test/regression/PrimordialLoaderTest.java: new test case for the java
+   interface to the primordial class loader
+
+2004-12-21  Helmer Kraemer  [EMAIL PROTECTED]
+
* kaffe/kaffevm/threadData.h (THREAD_DATA_INITIALIZED): new macro
 
* kaffe/kaffevm/kaffe-gc/gc-refs.c (liveThreadWalker): properly handle
Index: kaffe/include/Makefile.am
diff -u kaffe/include/Makefile.am:1.79 kaffe/include/Makefile.am:1.80
--- kaffe/include/Makefile.am:1.79  Wed Dec  8 07:22:07 2004
+++ kaffe/include/Makefile.am   Tue Dec 21 16:51:11 2004
@@ -67,7 +67,6 @@

[kaffe] CVS kaffe (guilhem): Added two more missing files for KJC.

2004-12-21 Thread Kaffe CVS
PatchSet 5703 
Date: 2004/12/21 18:03:58
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Added two more missing files for KJC.

* libraries/javalib/Klasses.jar.bootstrap: Regenerated.

* libraries/javalib/bootstrap.classlist: Added two missing classes
for KJC.

Members: 
ChangeLog:1.3248-1.3249 
libraries/javalib/Klasses.jar.bootstrap:1.79-1.80 
libraries/javalib/bootstrap.classlist:1.67-1.68 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3248 kaffe/ChangeLog:1.3249
--- kaffe/ChangeLog:1.3248  Tue Dec 21 17:56:39 2004
+++ kaffe/ChangeLog Tue Dec 21 18:03:58 2004
@@ -5,6 +5,13 @@

 2004-12-21  Guilhem Lavaux  [EMAIL PROTECTED]
 
+   * libraries/javalib/Klasses.jar.bootstrap: Regenerated.
+
+   * libraries/javalib/bootstrap.classlist: Added two missing classes
+   for KJC.
+   
+2004-12-21  Guilhem Lavaux  [EMAIL PROTECTED]
+
* libraries/clib/native/Class.c
(getProtectionDomain): Fixed return type.
 
Index: kaffe/libraries/javalib/Klasses.jar.bootstrap
cvs rdiff: failed to read diff file header /tmp/cvsRvzsl8 for 
Klasses.jar.bootstrap,v: end of file
system command returned non-zero exit status: 1: aborting

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe