[kaffe] CVS kaffe (dalibor): Fixes for getting Cygwin to build again

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Sat Mar 20 10:42:02 2004


PatchSet 4541 
Date: 2004/03/20 18:26:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixes for getting Cygwin to build again

2004-03-19  Dalibor Topic <robilad@kaffe.org>

        * include/jsyscall.h:
        Added missing includes.

        * kaffe/kaffevm/Makefile.am
        (libkaffevm_la_SOURCES): Added ksem.c.

        * kaffe/kaffevm/ksem.h
        (ksemInit, ksemPut, ksemGet, ksemDestroy): Moved
        inline functions to ksem.c.

        * kaffe/kaffevm/ksem.c:
        New file.

        * kaffe/kaffevm/Makefile.in,
        libraries/javalib/Makefile.am,
        libraries/javalib/Makefile.in:
        Regenerated.

Members: 
	ChangeLog:1.2119->1.2120 
	include/jsyscall.h:1.13->1.14 
	kaffe/kaffevm/Makefile.am:1.54->1.55 
	kaffe/kaffevm/Makefile.in:1.139->1.140 
	kaffe/kaffevm/ksem.c:INITIAL->1.1 
	kaffe/kaffevm/ksem.h:1.6->1.7 
	libraries/javalib/Makefile.am:1.174->1.175 
	libraries/javalib/Makefile.in:1.233->1.234 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2119 kaffe/ChangeLog:1.2120
--- kaffe/ChangeLog:1.2119	Fri Mar 19 18:03:02 2004
+++ kaffe/ChangeLog	Sat Mar 20 18:26:02 2004
@@ -1,5 +1,25 @@
 2004-03-19  Dalibor Topic <robilad@kaffe.org>
 
+	* include/jsyscall.h:
+	Added missing includes.
+
+	* kaffe/kaffevm/Makefile.am
+	(libkaffevm_la_SOURCES): Added ksem.c.
+
+	* kaffe/kaffevm/ksem.h
+	(ksemInit, ksemPut, ksemGet, ksemDestroy): Moved 
+	inline functions to ksem.c.
+
+	* kaffe/kaffevm/ksem.c:
+	New file.
+
+	* kaffe/kaffevm/Makefile.in,
+	libraries/javalib/Makefile.am,
+	libraries/javalib/Makefile.in:
+	Regenerated.
+
+2004-03-19  Dalibor Topic <robilad@kaffe.org>
+
 	* kaffe/kaffevm/gcFuncs.c,
 	kaffe/kaffevm/mem/gc-incremental.c,
 	kaffe/kaffevm/mem/gc-mem.c:
Index: kaffe/include/jsyscall.h
diff -u kaffe/include/jsyscall.h:1.13 kaffe/include/jsyscall.h:1.14
--- kaffe/include/jsyscall.h:1.13	Sat Aug 30 14:18:23 2003
+++ kaffe/include/jsyscall.h	Sat Mar 20 18:26:04 2004
@@ -12,6 +12,16 @@
 #ifndef __jsyscall_h
 #define __jsyscall_h
 
+#include "config.h"
+
+#if defined(HAVE_STDLIB_H)
+#include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
 struct sockaddr;
 struct timeval;
 struct fd_set;
Index: kaffe/kaffe/kaffevm/Makefile.am
diff -u kaffe/kaffe/kaffevm/Makefile.am:1.54 kaffe/kaffe/kaffevm/Makefile.am:1.55
--- kaffe/kaffe/kaffevm/Makefile.am:1.54	Fri Mar  5 13:45:31 2004
+++ kaffe/kaffe/kaffevm/Makefile.am	Sat Mar 20 18:26:05 2004
@@ -77,6 +77,7 @@
 	itypes.c \
 	jar.c \
 	jni.c \
+	ksem.c \
 	locks.c \
 	lookup.c \
 	object.c \
Index: kaffe/kaffe/kaffevm/Makefile.in
diff -u kaffe/kaffe/kaffevm/Makefile.in:1.139 kaffe/kaffe/kaffevm/Makefile.in:1.140
--- kaffe/kaffe/kaffevm/Makefile.in:1.139	Tue Mar 16 14:10:53 2004
+++ kaffe/kaffe/kaffevm/Makefile.in	Sat Mar 20 18:26:05 2004
@@ -77,11 +77,11 @@
 	classPool.lo methodCache.lo code-analyse.lo code.lo \
 	constants.lo debug.lo exception.lo external.lo findInJar.lo \
 	fp.lo gc.lo hashtab.lo inflate.lo itypes.lo jar.lo jni.lo \
-	locks.lo lookup.lo object.lo readClass.lo sha-1.lo soft.lo \
-	stackTrace.lo stats.lo string.lo stringParsing.lo support.lo \
-	thread.lo utf8const.lo gcFuncs.lo gcRefs.lo verify.lo \
-	verify2.lo verify-block.lo verify-debug.lo verify-sigstack.lo \
-	verify-type.lo verify-uninit.lo
+	ksem.lo locks.lo lookup.lo object.lo readClass.lo sha-1.lo \
+	soft.lo stackTrace.lo stats.lo string.lo stringParsing.lo \
+	support.lo thread.lo utf8const.lo gcFuncs.lo gcRefs.lo \
+	verify.lo verify2.lo verify-block.lo verify-debug.lo \
+	verify-sigstack.lo verify-type.lo verify-uninit.lo
 am__objects_1 = gc-mem.lo md.lo
 nodist_libkaffevm_la_OBJECTS = $(am__objects_1)
 libkaffevm_la_OBJECTS = $(am_libkaffevm_la_OBJECTS) \
@@ -101,12 +101,13 @@
 @AMDEP_TRUE@	./$(DEPDIR)/gcFuncs.Plo ./$(DEPDIR)/gcRefs.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/hashtab.Plo ./$(DEPDIR)/inflate.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/itypes.Plo ./$(DEPDIR)/jar.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/jni.Plo ./$(DEPDIR)/locks.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/lookup.Plo ./$(DEPDIR)/md.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/methodCache.Plo ./$(DEPDIR)/object.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/readClass.Plo ./$(DEPDIR)/sha-1.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/soft.Plo ./$(DEPDIR)/stackTrace.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/stats.Plo ./$(DEPDIR)/string.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/jni.Plo ./$(DEPDIR)/ksem.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/locks.Plo ./$(DEPDIR)/lookup.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/md.Plo ./$(DEPDIR)/methodCache.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/object.Plo ./$(DEPDIR)/readClass.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/sha-1.Plo ./$(DEPDIR)/soft.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/stackTrace.Plo ./$(DEPDIR)/stats.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/string.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/stringParsing.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/support.Plo ./$(DEPDIR)/thread.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/utf8const.Plo \
@@ -425,6 +426,7 @@
 	itypes.c \
 	jar.c \
 	jni.c \
+	ksem.c \
 	locks.c \
 	lookup.c \
 	object.c \
@@ -587,6 +589,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itypes.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jar.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jni.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksem.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locks.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md.Plo@am__quote@
===================================================================
Checking out kaffe/kaffe/kaffevm/ksem.c
RCS:  /home/cvs/kaffe/kaffe/kaffe/kaffevm/ksem.c,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/kaffe/kaffevm/ksem.c	Sat Mar 20 18:29:16 2004
@@ -0,0 +1,89 @@
+/*
+ * ksem.h
+ *
+ * Copyright (c) 200
+ *	University of Utah.  All Rights Reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#include "ksem.h"
+
+/*
+ * Initialize the just-allocated Ksem.  This function is only invoked
+ * by the threading system when a new thread is allocated.
+ */
+void
+ksemInit(Ksem* sem)
+{
+	assert(sem != NULL);
+	
+	jmutex_initialise(&(sem->mux));
+	jcondvar_initialise(&(sem->cv));
+	sem->count = 0;
+}
+
+/*
+ * Use a stored wakeup from the semaphore.  Block if none
+ * are available.  Can wait with a timeout.  (If timeout is 0, then
+ * do not timeout in wait.)
+ * Returns true if the semaphore was acquired, returns false if
+ * we timed-out in wait and semaphore still wasn't available.
+ *
+ * Spurious wakeups are not handled here.
+ */
+jboolean
+ksemGet(Ksem* sem, jlong timeout)
+{
+	jboolean r;
+
+	assert(sem != NULL);
+	
+	r = true;
+
+	if (timeout == 0)
+		timeout = NOTIMEOUT;
+
+	jmutex_lock(&sem->mux);
+	/* If no stored wakeups, then sleep. */
+	if (sem->count == 0) {
+		(void)jcondvar_wait(&sem->cv, &sem->mux, timeout);
+	}
+
+	/* Use a stored wakeup if available. */
+	if (sem->count == 1) {
+		sem->count = 0;
+		r = true;
+	}
+	else {
+		/* Still no stored wakeup means we waited and timedout. */
+		r = false;
+	}
+	assert(sem->count == 0);
+	jmutex_unlock(&sem->mux);
+	return (r);
+}
+
+/*
+ * Store a wakeup in the semaphore.  Wakeup one thread blocked
+ * on the cv (if any).
+ */
+void
+ksemPut(Ksem* sem)
+{
+	jmutex_lock(&sem->mux);
+	/*assert((sem->count == 0) || (sem->count == 1));*/
+	assert(sem->count == 0);
+        sem->count = 1;
+	jcondvar_signal(&sem->cv, &sem->mux);
+	jmutex_unlock(&sem->mux);
+}
+
+void
+ksemDestroy(Ksem* sem)
+{
+	assert(sem != NULL);
+	jmutex_destroy(&(sem->mux));
+	jcondvar_destroy(&(sem->cv));
+}
Index: kaffe/kaffe/kaffevm/ksem.h
diff -u kaffe/kaffe/kaffevm/ksem.h:1.6 kaffe/kaffe/kaffevm/ksem.h:1.7
--- kaffe/kaffe/kaffevm/ksem.h:1.6	Tue Aug  5 06:44:39 2003
+++ kaffe/kaffe/kaffevm/ksem.h	Sat Mar 20 18:26:05 2004
@@ -11,6 +11,8 @@
 #ifndef kaffevm_ksem_h
 #define kaffevm_ksem_h
 
+#include "config-std.h"
+#include "gtypes.h"
 #include "jsyscall.h"
 
 /*
@@ -18,10 +20,10 @@
  */
 struct Ksem;
 
-static inline void ksemInit(struct Ksem* sem) __UNUSED__;
-static inline void ksemPut(struct Ksem* sem) __UNUSED__;
-static inline jboolean ksemGet(struct Ksem* sem, jlong timeout) __UNUSED__;
-static inline void ksemDestroy(struct Ksem* sem) __UNUSED__;
+extern void ksemInit(struct Ksem* sem) __UNUSED__;
+extern void ksemPut(struct Ksem* sem) __UNUSED__;
+extern jboolean ksemGet(struct Ksem* sem, jlong timeout) __UNUSED__;
+extern void ksemDestroy(struct Ksem* sem) __UNUSED__;
 
 /*
  * Include the system locking layer interface.  See if it gives us
@@ -50,86 +52,6 @@
 	jcondvar	cv;
 	int		count;
 } Ksem;
-
-/*
- * Initialize the just-allocated Ksem.  This function is only invoked
- * by the threading system when a new thread is allocated.
- */
-static inline void
-ksemInit(Ksem* sem)
-{
-	assert(sem != NULL);
-	
-	jmutex_initialise(&(sem->mux));
-	jcondvar_initialise(&(sem->cv));
-	sem->count = 0;
-}
-
-/*
- * Use a stored wakeup from the semaphore.  Block if none
- * are available.  Can wait with a timeout.  (If timeout is 0, then
- * do not timeout in wait.)
- * Returns true if the semaphore was acquired, returns false if
- * we timed-out in wait and semaphore still wasn't available.
- *
- * Spurious wakeups are not handled here.
- */
-static inline jboolean
-ksemGet(Ksem* sem, jlong timeout)
-{
-	jboolean r;
-
-	assert(sem != NULL);
-	
-	r = true;
-
-	if (timeout == 0)
-		timeout = NOTIMEOUT;
-
-	jmutex_lock(&sem->mux);
-	/* If no stored wakeups, then sleep. */
-	if (sem->count == 0) {
-		(void)jcondvar_wait(&sem->cv, &sem->mux, timeout);
-	}
-
-	/* Use a stored wakeup if available. */
-	if (sem->count == 1) {
-		sem->count = 0;
-		r = true;
-	}
-	else {
-		/* Still no stored wakeup means we waited and timedout. */
-		r = false;
-	}
-	assert(sem->count == 0);
-	jmutex_unlock(&sem->mux);
-	return (r);
-}
-
-/*
- * Store a wakeup in the semaphore.  Wakeup one thread blocked
- * on the cv (if any).
- */
-static inline void
-ksemPut(Ksem* sem)
-{
-	jmutex_lock(&sem->mux);
-	/*assert((sem->count == 0) || (sem->count == 1));*/
-	assert(sem->count == 0);
-        sem->count = 1;
-	jcondvar_signal(&sem->cv, &sem->mux);
-	jmutex_unlock(&sem->mux);
-}
-
-static inline void
-ksemDestroy(Ksem* sem)
-{
-	assert(sem != NULL);
-	jmutex_destroy(&(sem->mux));
-	jcondvar_destroy(&(sem->cv));
-}
-
-
 
 #endif /* !defined(JTHREAD_HAS_KSEM) */
 #endif /* kaffevm_ksem_h */
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.174 kaffe/libraries/javalib/Makefile.am:1.175
--- kaffe/libraries/javalib/Makefile.am:1.174	Thu Mar 18 07:05:16 2004
+++ kaffe/libraries/javalib/Makefile.am	Sat Mar 20 18:26:05 2004
@@ -1586,10 +1586,16 @@
 	java/text/ParsePosition.java \
 	java/text/RuleBasedCollator.java \
 	java/text/SimpleDateFormat.java \
+	java/text/SimpleLineIterator.java \
+	java/text/SimpleSentenceIterator.java \
+	java/text/SimpleWordIterator.java \
 	java/text/StringCharacterIterator.java
 java_util_SRCS = \
 	java/util/AbstractCollection.java \
+	java/util/AbstractListIterator.java \
 	java/util/AbstractList.java \
+	java/util/AbstractMapEntry.java \
+	java/util/AbstractMapEntrySet.java \
 	java/util/AbstractMap.java \
 	java/util/AbstractSequentialList.java \
 	java/util/AbstractSet.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.233 kaffe/libraries/javalib/Makefile.in:1.234
--- kaffe/libraries/javalib/Makefile.in:1.233	Thu Mar 18 07:05:17 2004
+++ kaffe/libraries/javalib/Makefile.in	Sat Mar 20 18:26:05 2004
@@ -1945,11 +1945,17 @@
 	java/text/ParsePosition.java \
 	java/text/RuleBasedCollator.java \
 	java/text/SimpleDateFormat.java \
+	java/text/SimpleLineIterator.java \
+	java/text/SimpleSentenceIterator.java \
+	java/text/SimpleWordIterator.java \
 	java/text/StringCharacterIterator.java
 
 java_util_SRCS = \
 	java/util/AbstractCollection.java \
+	java/util/AbstractListIterator.java \
 	java/util/AbstractList.java \
+	java/util/AbstractMapEntry.java \
+	java/util/AbstractMapEntrySet.java \
 	java/util/AbstractMap.java \
 	java/util/AbstractSequentialList.java \
 	java/util/AbstractSet.java \