PatchSet 4020
Date: 2003/09/05 17:56:52
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Network fixes + bootstrap extra files removed.
See ChangeLog.
Members:
ChangeLog:1.1616-1.1617
libraries/clib/net/InetAddressImpl.c:1.17-1.18
libraries/clib/net/NetworkInterface.c:1.4-1.5
libraries/javalib/Klasses.jar.bootstrap:1.36-1.37
libraries/javalib/bootstrap.classlist:1.29-1.30
libraries/javalib/java/net/InetAddress.java:1.15-1.16
libraries/javalib/java/net/InetSocketAddress.java:1.5-1.6
libraries/javalib/java/net/NetworkInterface.java:1.3-1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1616 kaffe/ChangeLog:1.1617
--- kaffe/ChangeLog:1.1616 Fri Sep 5 17:35:28 2003
+++ kaffe/ChangeLog Fri Sep 5 17:56:52 2003
@@ -1,3 +1,28 @@
+2003-09-05 Guilhem Lavaux [EMAIL PROTECTED]
+
+ * libraries/javalib/java/net/InetSocketAddress.java:
+ Imported from classpath + fix.
+ (toString, equals) use hostname instead of addr if addr is null
+
+ * libraries/javalib/java/net/InetAddress.java:
+ (clinit) initialize ANY_IF with if it can't retrieve it from
+ the system.
+ (getInaddrAny) same thing for the returned any address.
+
+ * libraries/clib/net/NetworkInterfaceImpl.c:
+ (java_net_NetworkInterface_getRealNetworkInterfaces) builds a
+ hashtable as was previously done in kaffe.
+
+ * libraries/javalib/java/net/NetworkInterface.java:
+ (getRealNetworkInterface) return a Hashtable instead of a Vector
+ (getByName, getByInetAddress, getNetworkInterfaces) Use a hashtable
+ instead of a vector for the return value of getRealNetworkInterface.
+
+ * libraries/javalib/bootstrap.classlist: Deleted File$DeleteExitHook
+ and NetworkInterfaceImpl.
+
+ * libraries/javalib/Klasses.jar.bootstrap: regenerated.
+
2003-09-05 Dalibor Topic [EMAIL PROTECTED]
* libraries/clib/math/BigInteger.c:
Index: kaffe/libraries/clib/net/InetAddressImpl.c
diff -u kaffe/libraries/clib/net/InetAddressImpl.c:1.17
kaffe/libraries/clib/net/InetAddressImpl.c:1.18
--- kaffe/libraries/clib/net/InetAddressImpl.c:1.17 Sat Aug 30 14:18:25 2003
+++ kaffe/libraries/clib/net/InetAddressImpl.c Fri Sep 5 17:56:53 2003
@@ -130,8 +130,9 @@
int iLockRoot;
errorInfo einfo;
char *name;
-
+
name = checkPtr(stringJava2C(jStr));
+
memset(hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
Index: kaffe/libraries/clib/net/NetworkInterface.c
diff -u kaffe/libraries/clib/net/NetworkInterface.c:1.4
kaffe/libraries/clib/net/NetworkInterface.c:1.5
--- kaffe/libraries/clib/net/NetworkInterface.c:1.4 Tue Sep 2 00:54:00 2003
+++ kaffe/libraries/clib/net/NetworkInterface.c Fri Sep 5 17:56:53 2003
@@ -21,7 +21,6 @@
#include config-hacks.h
#include native.h
#include java_net_NetworkInterface.h
-#include java_util_Vector.h
#include nets.h
#include arpa/inet.h
#include jsyscall.h
@@ -120,15 +119,15 @@
return( retval );
}
-struct Hjava_util_Vector*
+struct Hjava_util_Hashtable*
java_net_NetworkInterface_getRealNetworkInterfaces(void)
{
- struct Hjava_util_Vector* vector;
+ struct Hjava_util_Hashtable* hashtable;
struct ifaddrs* addrs;
struct ifaddrs* ifa;
- vector =
-(struct Hjava_util_Vector*)execute_java_constructor(java/util/Vector, 0, 0,
()V);
+ hashtable =
+(struct Hjava_util_Hashtable*)execute_java_constructor(java/util/Hashtable, 0,
0, ()V);
ifa = addrs = detectInterfaces();
while (ifa != NULL)
@@ -140,15 +139,21 @@
addr = getInetAddress(ifa);
if (addr != NULL)
- do_execute_java_method
- (vector, add, (Ljava/lang/Object;)Z, 0, 0,
- execute_java_constructor(java/net/NetworkInterface, 0, 0,
+ {
+ if (do_execute_java_method(hashtable, get,
(Ljava/lang/Object;)Ljava/lang/Object;,
+0, 0, iface_name).l == NULL)
+ {
+ do_execute_java_method
+ (hashtable, put,
(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;, 0, 0,
+iface_name,
+execute_java_constructor(java/net/NetworkInterface, 0, 0,
(Ljava/lang/String;Ljava/net/InetAddress;)V,
iface_name, addr));
-
+ }
+ }
ifa = ifa-ifa_next;
}
freeInterfaces(addrs);
- return vector;
+ return hashtable;
}
Index: kaffe/libraries/javalib/Klasses.jar.bootstrap
cvs rdiff: failed to read diff file header /tmp/cvsVJHlRz for Klasses.jar.bootstrap,v:
end of file
system command returned non-zero exit status: 1: aborting
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe