[kaffe] CVS kaffe (robilad): moved ZipFile.c from native library to zip

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 23 09:02:57 PDT 2006


PatchSet 7368 
Date: 2006/07/23 15:48:20
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
moved ZipFile.c from native library to zip

2006-07-23  Dalibor Topic  <robilad at kaffe.org>

        * libraries/clib/native/ZipFile.c: Removed. Moved ...

        * libraries/clib/zip/ZipFile.c: ... over here.

        * libraries/clib/native/Makefile.am
        (LANG_SRCS) Removed ZipFile.c.

        * libraries/clib/zip/Makefile.am
        (AM_CPPFLAGS) Added includes for md.h.
        (libzip_la_SOURCES) Added ZipFile.c.

        * libraries/javalib/vmspecific/java/util/zip/ZipFile.java
        Load native zip library.

Members: 
	ChangeLog:1.4872->1.4873 
	libraries/clib/native/Makefile.am:1.58->1.59 
	libraries/clib/native/Makefile.in:1.226->1.227 
	libraries/clib/native/ZipFile.c:1.26->1.27(DEAD) 
	libraries/clib/zip/Makefile.am:1.17->1.18 
	libraries/clib/zip/Makefile.in:1.179->1.180 
	libraries/clib/zip/ZipFile.c:INITIAL->1.1 
	libraries/javalib/external/classpath/config.guess:1.28->1.29 
	libraries/javalib/external/classpath/ltmain.sh:1.28->1.29 
	libraries/javalib/vmspecific/java/util/zip/ZipFile.java:1.1->1.2 
	scripts/ltmain.sh:1.32->1.33 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4872 kaffe/ChangeLog:1.4873
--- kaffe/ChangeLog:1.4872	Sun Jul 23 03:16:10 2006
+++ kaffe/ChangeLog	Sun Jul 23 15:48:20 2006
@@ -1,5 +1,21 @@
 2006-07-23  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/clib/native/ZipFile.c: Removed. Moved ...
+
+	* libraries/clib/zip/ZipFile.c: ... over here.
+
+	* libraries/clib/native/Makefile.am
+	(LANG_SRCS) Removed ZipFile.c.
+
+	* libraries/clib/zip/Makefile.am
+	(AM_CPPFLAGS) Added includes for md.h.
+	(libzip_la_SOURCES) Added ZipFile.c.
+
+	* libraries/javalib/vmspecific/java/util/zip/ZipFile.java
+	Load native zip library.
+
+2006-07-23  Dalibor Topic  <robilad at kaffe.org>
+
 	* configure.ac:
 	Don't output tools/javalib/javalib/Makefile.
  
Index: kaffe/libraries/clib/native/Makefile.am
diff -u kaffe/libraries/clib/native/Makefile.am:1.58 kaffe/libraries/clib/native/Makefile.am:1.59
--- kaffe/libraries/clib/native/Makefile.am:1.58	Sat Jul 15 18:35:32 2006
+++ kaffe/libraries/clib/native/Makefile.am	Sun Jul 23 15:48:24 2006
@@ -40,8 +40,7 @@
 		String.c \
 		System.c \
 		Thread.c \
-		Throwable.c \
-		ZipFile.c
+		Throwable.c 
 
 REF_SRCS= \
 	  java_lang_ref_Reference.c
Index: kaffe/libraries/clib/native/Makefile.in
diff -u kaffe/libraries/clib/native/Makefile.in:1.226 kaffe/libraries/clib/native/Makefile.in:1.227
--- kaffe/libraries/clib/native/Makefile.in:1.226	Sun Jul 16 15:04:42 2006
+++ kaffe/libraries/clib/native/Makefile.in	Sun Jul 23 15:48:24 2006
@@ -97,8 +97,7 @@
 	libjavalang_la-ClassLoader.lo libjavalang_la-Object.lo \
 	libjavalang_la-Runtime.lo libjavalang_la-VMRuntime.lo \
 	libjavalang_la-String.lo libjavalang_la-System.lo \
-	libjavalang_la-Thread.lo libjavalang_la-Throwable.lo \
-	libjavalang_la-ZipFile.lo
+	libjavalang_la-Thread.lo libjavalang_la-Throwable.lo
 am__objects_2 = libjavalang_la-java_lang_reflect_VMArray.lo \
 	libjavalang_la-Constructor.lo libjavalang_la-Field.lo \
 	libjavalang_la-Method.lo
@@ -420,8 +419,7 @@
 		String.c \
 		System.c \
 		Thread.c \
-		Throwable.c \
-		ZipFile.c
+		Throwable.c 
 
 REF_SRCS = \
 	  java_lang_ref_Reference.c
@@ -555,7 +553,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-Throwable.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-TimeZone.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-VMRuntime.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-ZipFile.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-gnu_classpath_VMStackWalker.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-gnu_classpath_VMSystemProperties.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libjavalang_la-java_lang_VMDouble.Plo at am__quote@
@@ -698,13 +695,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Throwable.c' object='libjavalang_la-Throwable.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjavalang_la_CFLAGS) $(CFLAGS) -c -o libjavalang_la-Throwable.lo `test -f 'Throwable.c' || echo '$(srcdir)/'`Throwable.c
-
-libjavalang_la-ZipFile.lo: ZipFile.c
- at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjavalang_la_CFLAGS) $(CFLAGS) -MT libjavalang_la-ZipFile.lo -MD -MP -MF "$(DEPDIR)/libjavalang_la-ZipFile.Tpo" -c -o libjavalang_la-ZipFile.lo `test -f 'ZipFile.c' || echo '$(srcdir)/'`ZipFile.c; \
- at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libjavalang_la-ZipFile.Tpo" "$(DEPDIR)/libjavalang_la-ZipFile.Plo"; else rm -f "$(DEPDIR)/libjavalang_la-ZipFile.Tpo"; exit 1; fi
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ZipFile.c' object='libjavalang_la-ZipFile.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjavalang_la_CFLAGS) $(CFLAGS) -c -o libjavalang_la-ZipFile.lo `test -f 'ZipFile.c' || echo '$(srcdir)/'`ZipFile.c
 
 libjavalang_la-java_lang_reflect_VMArray.lo: java_lang_reflect_VMArray.c
 @am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjavalang_la_CFLAGS) $(CFLAGS) -MT libjavalang_la-java_lang_reflect_VMArray.lo -MD -MP -MF "$(DEPDIR)/libjavalang_la-java_lang_reflect_VMArray.Tpo" -c -o libjavalang_la-java_lang_reflect_VMArray.lo `test -f 'java_lang_reflect_VMArray.c' || echo '$(srcdir)/'`java_lang_reflect_VMArray.c; \
===================================================================
Checking out kaffe/libraries/clib/native/ZipFile.c
RCS:  /home/cvs/kaffe/kaffe/libraries/clib/native/Attic/ZipFile.c,v
VERS: 1.26
***************
--- kaffe/libraries/clib/native/ZipFile.c	Sun Jul 23 16:02:56 2006
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,154 +0,0 @@
-/*
- * java.util.zip.ZipFile.c
- *
- * Copyright (c) 1996, 1997, 1998
- *      Transvirtual Technologies, Inc.  All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- */
-
-#include "config.h"
-#include "config-std.h"
-#include "config-io.h"
-#include "config-mem.h"
-#include "errors.h"
-#include "exception.h"
-#include "gc.h"
-#include "gtypes.h"
-#include "itypes.h"
-#include "jar.h"
-
-#include "java_util_zip_ZipEntry.h"
-#include "java_util_zip_ZipFile.h"
-#include "java_util_Vector.h"
-
-static Hjava_util_zip_ZipEntry* makeZipEntry(jarEntry*);
-
-struct Horg_kaffe_util_Ptr*
-java_util_zip_ZipFile_openZipFile0(Hjava_lang_String* fname)
-{
-	jarFile* zip;
-	char* str;
-
-	str = checkPtr(stringJava2C(fname));
-	zip = openJarFile(str);
-	gc_free(str);
-	return ((struct Horg_kaffe_util_Ptr*)zip);
-}
-
-void
-java_util_zip_ZipFile_closeZipFile0(struct Horg_kaffe_util_Ptr* zip)
-{
-	closeJarFile((jarFile*)zip);
-}
-
-jint
-java_util_zip_ZipFile_getZipFileSize0(struct Horg_kaffe_util_Ptr* zip)
-{
-	return ((jarFile*)zip)->count;
-}
-
-struct Hjava_util_zip_ZipEntry*
-java_util_zip_ZipFile_getZipEntry0(struct Horg_kaffe_util_Ptr* zip, Hjava_lang_String* zname)
-{
-	jarEntry* entry;
-	char* str;
-	Hjava_util_zip_ZipEntry* zentry;
-
-	str = checkPtr(stringJava2C(zname));
-	entry = lookupJarFile((jarFile*)zip, str);
-	gc_free(str);
-	if (entry == NULL) {
-		return (NULL);
-	}
-	zentry = makeZipEntry(entry);
-	return (zentry);
-}
-
-HArrayOfByte*
-java_util_zip_ZipFile_getZipData0(struct Horg_kaffe_util_Ptr* zip, struct Hjava_util_zip_ZipEntry* zentry)
-{
-	jarEntry entry;
-	HArrayOfByte* array;
-	uint8* buf = NULL;
-	jlong size;
-
-	size = unhand(zentry)->size;
-
-	if (size < 0) {
-                throwException(NegativeArraySizeException);
-        }
-	if( size > 0 )
-	{
-		entry.fileName = NULL;
-		entry.uncompressedSize = size;
-		entry.compressionMethod = unhand(zentry)->method;
-		entry.compressedSize = unhand(zentry)->csize;
-		entry.localHeaderOffset = unhand(zentry)->offset;
-		
-		buf = getDataJarFile((jarFile*)zip, &entry);
-		if (buf == 0) {
-			return (NULL);
-		}
-	}
-	array = (HArrayOfByte*)AllocArray((jsize)size, TYPE_Byte);
-	if( buf )
-	{
-		memcpy(unhand_array(array)->body, buf, (size_t)size);
-		gc_free(buf);
-	}
-	return (array);
-}
-
-Hjava_util_Vector*
-java_util_zip_ZipFile_getZipEntries0(struct Horg_kaffe_util_Ptr* zip)
-{
-	Hjava_util_Vector* vec;
-	jarFile* zfile;
-	jarEntry* entry;
-	HObject** elems;
-	int i = 0;
-	unsigned int j;
-
-	zfile = (jarFile*)zip;
-	vec = (Hjava_util_Vector*)execute_java_constructor("java.util.Vector",
-	    NULL, NULL, "(I)V", zfile->count);
-	elems = unhand_array(unhand(vec)->elementData)->body;
-	for (j = 0; j < zfile->tableSize; j++) {
-		entry = zfile->table[j];
-		while( entry )
-		{
-			elems[i] = (HObject*)makeZipEntry(entry);
-			i++;
-			entry = entry->next;
-		}
-	}
-	unhand(vec)->elementCount = zfile->count;
-
-	return (vec);
-}
-
-static
-Hjava_util_zip_ZipEntry*
-makeZipEntry(jarEntry* entry)
-{
-	Hjava_util_zip_ZipEntry* zentry;
-
-	zentry = (Hjava_util_zip_ZipEntry*)
-	    execute_java_constructor("java.util.zip.ZipEntry", NULL, NULL, "()V");
-	unhand(zentry)->name =
-	    checkPtr(stringC2Java(entry->fileName));
-	unhand(zentry)->crc = 0;
-	unhand(zentry)->size = entry->uncompressedSize;
-	unhand(zentry)->method = entry->compressionMethod;
-	unhand(zentry)->extra = NULL;
-	unhand(zentry)->comment = NULL;
-	unhand(zentry)->flag = 0;
-	unhand(zentry)->version = 0;
-	unhand(zentry)->csize = entry->compressedSize;
-	unhand(zentry)->offset = entry->localHeaderOffset;
-	unhand(zentry)->dosTime = entry->dosTime;
-
-	return (zentry);
-}
Index: kaffe/libraries/clib/zip/Makefile.am
diff -u kaffe/libraries/clib/zip/Makefile.am:1.17 kaffe/libraries/clib/zip/Makefile.am:1.18
--- kaffe/libraries/clib/zip/Makefile.am:1.17	Sat Jul 15 18:35:34 2006
+++ kaffe/libraries/clib/zip/Makefile.am	Sun Jul 23 15:48:26 2006
@@ -17,7 +17,9 @@
 
 AM_CPPFLAGS = \
 	-I$(top_builddir)/include \
-	$(MAYBE_INTERNAL_ZIP_INCLUDES)
+	$(MAYBE_INTERNAL_ZIP_INCLUDES) \
+        -I$(top_srcdir)/config/$(Khost_cpu) \
+        -I$(top_srcdir)/config/$(Khost_cpu)/$(Khost_os)
 
 native_LTLIBRARIES = libzip.la
 
@@ -40,6 +42,7 @@
 	Adler32.c \
 	CRC32.c \
 	Deflater.c \
-	Inflater.c
+	Inflater.c \
+	ZipFile.c
 
 CLEANFILES = so_locations
Index: kaffe/libraries/clib/zip/Makefile.in
diff -u kaffe/libraries/clib/zip/Makefile.in:1.179 kaffe/libraries/clib/zip/Makefile.in:1.180
--- kaffe/libraries/clib/zip/Makefile.in:1.179	Sun Jul 16 15:04:49 2006
+++ kaffe/libraries/clib/zip/Makefile.in	Sun Jul 23 15:48:26 2006
@@ -88,7 +88,8 @@
 libzip_la_DEPENDENCIES = $(top_builddir)/kaffe/kaffevm/libkaffevm.la \
 	$(am__DEPENDENCIES_2)
 am_libzip_la_OBJECTS = libzip_la-Adler32.lo libzip_la-CRC32.lo \
-	libzip_la-Deflater.lo libzip_la-Inflater.lo
+	libzip_la-Deflater.lo libzip_la-Inflater.lo \
+	libzip_la-ZipFile.lo
 libzip_la_OBJECTS = $(am_libzip_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
 depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
@@ -378,7 +379,9 @@
 @COND_SYSTEM_ZLIB_FALSE at MAYBE_INTERNAL_ZIP_INCLUDES = -I$(srcdir)/../../../external/gcc/zlib/
 AM_CPPFLAGS = \
 	-I$(top_builddir)/include \
-	$(MAYBE_INTERNAL_ZIP_INCLUDES)
+	$(MAYBE_INTERNAL_ZIP_INCLUDES) \
+        -I$(top_srcdir)/config/$(Khost_cpu) \
+        -I$(top_srcdir)/config/$(Khost_cpu)/$(Khost_os)
 
 native_LTLIBRARIES = libzip.la
 libzip_la_CFLAGS = \
@@ -400,7 +403,8 @@
 	Adler32.c \
 	CRC32.c \
 	Deflater.c \
-	Inflater.c
+	Inflater.c \
+	ZipFile.c
 
 CLEANFILES = so_locations
 all: all-am
@@ -476,6 +480,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libzip_la-CRC32.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libzip_la-Deflater.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libzip_la-Inflater.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libzip_la-ZipFile.Plo at am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -525,6 +530,13 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='Inflater.c' object='libzip_la-Inflater.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzip_la_CFLAGS) $(CFLAGS) -c -o libzip_la-Inflater.lo `test -f 'Inflater.c' || echo '$(srcdir)/'`Inflater.c
+
+libzip_la-ZipFile.lo: ZipFile.c
+ at am__fastdepCC_TRUE@	if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzip_la_CFLAGS) $(CFLAGS) -MT libzip_la-ZipFile.lo -MD -MP -MF "$(DEPDIR)/libzip_la-ZipFile.Tpo" -c -o libzip_la-ZipFile.lo `test -f 'ZipFile.c' || echo '$(srcdir)/'`ZipFile.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/libzip_la-ZipFile.Tpo" "$(DEPDIR)/libzip_la-ZipFile.Plo"; else rm -f "$(DEPDIR)/libzip_la-ZipFile.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ZipFile.c' object='libzip_la-ZipFile.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libzip_la_CFLAGS) $(CFLAGS) -c -o libzip_la-ZipFile.lo `test -f 'ZipFile.c' || echo '$(srcdir)/'`ZipFile.c
 
 mostlyclean-libtool:
 	-rm -f *.lo
===================================================================
Checking out kaffe/libraries/clib/zip/ZipFile.c
RCS:  /home/cvs/kaffe/kaffe/libraries/clib/zip/ZipFile.c,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/libraries/clib/zip/ZipFile.c	Sun Jul 23 16:02:57 2006
@@ -0,0 +1,154 @@
+/*
+ * java.util.zip.ZipFile.c
+ *
+ * Copyright (c) 1996, 1997, 1998
+ *      Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#include "config.h"
+#include "config-std.h"
+#include "config-io.h"
+#include "config-mem.h"
+#include "errors.h"
+#include "exception.h"
+#include "gc.h"
+#include "gtypes.h"
+#include "itypes.h"
+#include "jar.h"
+
+#include "java_util_zip_ZipEntry.h"
+#include "java_util_zip_ZipFile.h"
+#include "java_util_Vector.h"
+
+static Hjava_util_zip_ZipEntry* makeZipEntry(jarEntry*);
+
+struct Horg_kaffe_util_Ptr*
+java_util_zip_ZipFile_openZipFile0(Hjava_lang_String* fname)
+{
+	jarFile* zip;
+	char* str;
+
+	str = checkPtr(stringJava2C(fname));
+	zip = openJarFile(str);
+	gc_free(str);
+	return ((struct Horg_kaffe_util_Ptr*)zip);
+}
+
+void
+java_util_zip_ZipFile_closeZipFile0(struct Horg_kaffe_util_Ptr* zip)
+{
+	closeJarFile((jarFile*)zip);
+}
+
+jint
+java_util_zip_ZipFile_getZipFileSize0(struct Horg_kaffe_util_Ptr* zip)
+{
+	return ((jarFile*)zip)->count;
+}
+
+struct Hjava_util_zip_ZipEntry*
+java_util_zip_ZipFile_getZipEntry0(struct Horg_kaffe_util_Ptr* zip, Hjava_lang_String* zname)
+{
+	jarEntry* entry;
+	char* str;
+	Hjava_util_zip_ZipEntry* zentry;
+
+	str = checkPtr(stringJava2C(zname));
+	entry = lookupJarFile((jarFile*)zip, str);
+	gc_free(str);
+	if (entry == NULL) {
+		return (NULL);
+	}
+	zentry = makeZipEntry(entry);
+	return (zentry);
+}
+
+HArrayOfByte*
+java_util_zip_ZipFile_getZipData0(struct Horg_kaffe_util_Ptr* zip, struct Hjava_util_zip_ZipEntry* zentry)
+{
+	jarEntry entry;
+	HArrayOfByte* array;
+	uint8* buf = NULL;
+	jlong size;
+
+	size = unhand(zentry)->size;
+
+	if (size < 0) {
+                throwException(NegativeArraySizeException);
+        }
+	if( size > 0 )
+	{
+		entry.fileName = NULL;
+		entry.uncompressedSize = size;
+		entry.compressionMethod = unhand(zentry)->method;
+		entry.compressedSize = unhand(zentry)->csize;
+		entry.localHeaderOffset = unhand(zentry)->offset;
+		
+		buf = getDataJarFile((jarFile*)zip, &entry);
+		if (buf == 0) {
+			return (NULL);
+		}
+	}
+	array = (HArrayOfByte*)AllocArray((jsize)size, TYPE_Byte);
+	if( buf )
+	{
+		memcpy(unhand_array(array)->body, buf, (size_t)size);
+		gc_free(buf);
+	}
+	return (array);
+}
+
+Hjava_util_Vector*
+java_util_zip_ZipFile_getZipEntries0(struct Horg_kaffe_util_Ptr* zip)
+{
+	Hjava_util_Vector* vec;
+	jarFile* zfile;
+	jarEntry* entry;
+	HObject** elems;
+	int i = 0;
+	unsigned int j;
+
+	zfile = (jarFile*)zip;
+	vec = (Hjava_util_Vector*)execute_java_constructor("java.util.Vector",
+	    NULL, NULL, "(I)V", zfile->count);
+	elems = unhand_array(unhand(vec)->elementData)->body;
+	for (j = 0; j < zfile->tableSize; j++) {
+		entry = zfile->table[j];
+		while( entry )
+		{
+			elems[i] = (HObject*)makeZipEntry(entry);
+			i++;
+			entry = entry->next;
+		}
+	}
+	unhand(vec)->elementCount = zfile->count;
+
+	return (vec);
+}
+
+static
+Hjava_util_zip_ZipEntry*
+makeZipEntry(jarEntry* entry)
+{
+	Hjava_util_zip_ZipEntry* zentry;
+
+	zentry = (Hjava_util_zip_ZipEntry*)
+	    execute_java_constructor("java.util.zip.ZipEntry", NULL, NULL, "()V");
+	unhand(zentry)->name =
+	    checkPtr(stringC2Java(entry->fileName));
+	unhand(zentry)->crc = 0;
+	unhand(zentry)->size = entry->uncompressedSize;
+	unhand(zentry)->method = entry->compressionMethod;
+	unhand(zentry)->extra = NULL;
+	unhand(zentry)->comment = NULL;
+	unhand(zentry)->flag = 0;
+	unhand(zentry)->version = 0;
+	unhand(zentry)->csize = entry->compressedSize;
+	unhand(zentry)->offset = entry->localHeaderOffset;
+	unhand(zentry)->dosTime = entry->dosTime;
+
+	return (zentry);
+}
Index: kaffe/libraries/javalib/external/classpath/config.guess
diff -u kaffe/libraries/javalib/external/classpath/config.guess:1.28 kaffe/libraries/javalib/external/classpath/config.guess:1.29
--- kaffe/libraries/javalib/external/classpath/config.guess:1.28	Sun Jul 23 03:16:35 2006
+++ kaffe/libraries/javalib/external/classpath/config.guess	Sun Jul 23 15:48:27 2006
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2005-04-22'
+timestamp='2005-08-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,13 +17,15 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Originally written by Per Bothner <per at bothner.com>.
 # Please send patches to <config-patches at gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -66,11 +68,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -123,7 +125,7 @@
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi at noc.rutgers.edu 1994-08-24)
@@ -196,55 +198,20 @@
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amd64:OpenBSD:*:*)
-	echo x86_64-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    cats:OpenBSD:*:*)
-	echo arm-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    luna88k:OpenBSD:*:*)
-    	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips64-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     macppc:MirBSD:*:*)
 	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -297,40 +264,43 @@
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
+	exit ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
     *:z/VM:*:*)
 	echo s390-ibm-zvmoe
-	exit 0 ;;
+	exit ;;
     *:OS400:*:*)
         echo powerpc-ibm-os400
-	exit 0 ;;
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -338,32 +308,32 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
+	exit ;;
     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -372,10 +342,10 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -387,10 +357,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -401,40 +371,40 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -458,32 +428,33 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -499,29 +470,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -529,7 +500,7 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -544,14 +515,18 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
+	exit ;;
     *:AIX:*:[45])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -565,28 +540,28 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -648,9 +623,19 @@
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -658,11 +643,11 @@
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;

*** Patch too long, truncated ***




More information about the kaffe mailing list