org.openembedded.dev: 2408f9a34a6c104a87d3c509f505466900bccedb
oe at monotone.openmoko.org
oe at monotone.openmoko.org
Fri May 2 20:53:01 CEST 2008
revision: 2408f9a34a6c104a87d3c509f505466900bccedb
date: 2008-04-22T17:24:31
author: thebohemian at openembedded.org
branch: org.openembedded.dev
changelog:
classpath 0.97.1: Added bugfix patches.
classpath-minimal 0.97.1: Added bugfix patches.
manifest:
format_version "1"
new_manifest [a3f96501aa7b55a4609aa8546fb548ceac246df0]
old_revision [807e8b2eff777c2e8cad0acd436702c5c40e7ca5]
add_file "packages/classpath/files/SimpleName.diff"
content [cfbbed49b3be9cc1944659dde6728ec191ed9aea]
add_file "packages/classpath/files/netif_16.patch"
content [65f812866975ec98e775dd6add8c19c08ca527d3]
patch "packages/classpath/classpath-minimal_0.97.1.bb"
from [0ef04bfd389c769d1b67f97975fcdd35f68c4855]
to [ff46d0cb295bca189b6ab07f6506b2e039917ae0]
patch "packages/classpath/classpath_0.97.1.bb"
from [db8b170f0f6f53145caf1d439efa49971f8c4475]
to [924cfdaf2daafe993d70dba55a853c4eb5250f64]
-------------- next part --------------
#
#
# add_file "packages/classpath/files/SimpleName.diff"
# content [cfbbed49b3be9cc1944659dde6728ec191ed9aea]
#
# add_file "packages/classpath/files/netif_16.patch"
# content [65f812866975ec98e775dd6add8c19c08ca527d3]
#
# patch "packages/classpath/classpath-minimal_0.97.1.bb"
# from [0ef04bfd389c769d1b67f97975fcdd35f68c4855]
# to [ff46d0cb295bca189b6ab07f6506b2e039917ae0]
#
# patch "packages/classpath/classpath_0.97.1.bb"
# from [db8b170f0f6f53145caf1d439efa49971f8c4475]
# to [924cfdaf2daafe993d70dba55a853c4eb5250f64]
#
============================================================
--- packages/classpath/files/SimpleName.diff cfbbed49b3be9cc1944659dde6728ec191ed9aea
+++ packages/classpath/files/SimpleName.diff cfbbed49b3be9cc1944659dde6728ec191ed9aea
@@ -0,0 +1,66 @@
+Index: vm/reference/java/lang/VMClass.java
+===================================================================
+RCS file: /sources/classpath/classpath/vm/reference/java/lang/VMClass.java,v
+retrieving revision 1.20
+diff -u -r1.20 VMClass.java
+--- vm/reference/java/lang/VMClass.java 18 Sep 2007 21:52:38 -0000 1.20
++++ vm/reference/java/lang/VMClass.java 19 Apr 2008 15:19:00 -0000
+@@ -296,27 +296,43 @@
+ */
+ static String getSimpleName(Class klass)
+ {
++ int arrayCount = 0;
++ while (klass.isArray())
++ {
++ klass = klass.getComponentType();
++ ++arrayCount;
++ }
++ // now klass is the component type
++
++ String simpleComponentName = null;
+ if (isAnonymousClass(klass))
+- return "";
+- if (isArray(klass))
+ {
+- return getComponentType(klass).getSimpleName() + "[]";
++ simpleComponentName = "";
+ }
+- String fullName = getName(klass);
+- int pos = fullName.lastIndexOf("$");
+- if (pos == -1)
+- pos = 0;
+ else
+ {
+- ++pos;
+- while (Character.isDigit(fullName.charAt(pos)))
+- ++pos;
++ String fullName = getName(klass);
++ int pos = fullName.lastIndexOf("$");
++ if (pos != -1)
++ { //inner class or local class
++ // skip digits of local classes
++ while (Character.isDigit(fullName.charAt(pos+1)))
++ pos++;
++ }
++ else
++ {
++ pos = fullName.lastIndexOf(".");
++ }
++ simpleComponentName = fullName.substring(pos+1);
+ }
+- int packagePos = fullName.lastIndexOf(".", pos);
+- if (packagePos == -1)
+- return fullName.substring(pos);
+- else
+- return fullName.substring(packagePos + 1);
++
++ if (arrayCount == 0)
++ return simpleComponentName;
++
++ StringBuffer sb = new StringBuffer(simpleComponentName);
++ while (arrayCount-- > 0)
++ sb.append("[]");
++ return sb.toString();
+ }
+
+ /**
============================================================
--- packages/classpath/files/netif_16.patch 65f812866975ec98e775dd6add8c19c08ca527d3
+++ packages/classpath/files/netif_16.patch 65f812866975ec98e775dd6add8c19c08ca527d3
@@ -0,0 +1,263 @@
+Index: java/net/NetworkInterface.java
+===================================================================
+RCS file: /sources/classpath/classpath/java/net/NetworkInterface.java,v
+retrieving revision 1.23
+diff -u -r1.23 NetworkInterface.java
+--- java/net/NetworkInterface.java 18 Dec 2006 21:37:39 -0000 1.23
++++ java/net/NetworkInterface.java 21 Apr 2008 10:38:25 -0000
+@@ -1,5 +1,5 @@
+ /* NetworkInterface.java --
+- Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+@@ -265,4 +265,50 @@
+
+ return result.toString();
+ }
++
++ /**
++ * Determines whether this interface is ready to transfer data.
++ *
++ * @return whether the interface is up
++ */
++ public boolean isUp()
++ throws SocketException
++ {
++ return VMNetworkInterface.isUp(netif.name);
++ }
++
++ /**
++ * Determines whether this interface does point to point
++ * transmission.
++ *
++ * @return whether the interface does point to point transmission
++ */
++ public boolean isPointToPoint()
++ throws SocketException
++ {
++ return VMNetworkInterface.isPointToPoint(netif.name);
++ }
++
++ /**
++ * Determines whether this interface is the loopback interface.
++ *
++ * @return whether the interface is the loopback interface
++ */
++ public boolean isLoopback()
++ throws SocketException
++ {
++ return VMNetworkInterface.isLoopback(netif.name);
++ }
++
++ /**
++ * Determines whether this interface supports multicast transmission.
++ *
++ * @return whether the interface supports multicast transmission.
++ */
++ public boolean supportsMulticast()
++ throws SocketException
++ {
++ return VMNetworkInterface.supportsMulticast(netif.name);
++ }
++
+ }
+Index: vm/reference/java/net/VMNetworkInterface.java
+===================================================================
+RCS file: /sources/classpath/classpath/vm/reference/java/net/VMNetworkInterface.java,v
+retrieving revision 1.7
+diff -u -r1.7 VMNetworkInterface.java
+--- vm/reference/java/net/VMNetworkInterface.java 18 Dec 2006 21:37:39 -0000 1.7
++++ vm/reference/java/net/VMNetworkInterface.java 21 Apr 2008 10:38:25 -0000
+@@ -1,5 +1,5 @@
+ /* VMNetworkInterface.java --
+- Copyright (C) 2005 Free Software Foundation, Inc.
++ Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+@@ -119,4 +119,13 @@
+ else
+ throw new SocketException("invalid interface address");
+ }
++
++ static native boolean isUp(String name) throws SocketException;
++
++ static native boolean isLoopback(String name) throws SocketException;
++
++ static native boolean isPointToPoint(String name) throws SocketException;
++
++ static native boolean supportsMulticast(String name) throws SocketException;
++
+ }
+Index: native/jni/java-net/java_net_VMNetworkInterface.c
+===================================================================
+RCS file: /sources/classpath/classpath/native/jni/java-net/java_net_VMNetworkInterface.c,v
+retrieving revision 1.6
+diff -u -r1.6 java_net_VMNetworkInterface.c
+--- native/jni/java-net/java_net_VMNetworkInterface.c 5 Apr 2007 12:34:19 -0000 1.6
++++ native/jni/java-net/java_net_VMNetworkInterface.c 21 Apr 2008 10:38:25 -0000
+@@ -1,5 +1,5 @@
+ /* VMNetworkInterface.c - Native methods for NetworkInterface class
+- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
++ Copyright (C) 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+@@ -50,11 +50,18 @@
+ #include <stdio.h>
+ #include <string.h>
+
++#include <net/if.h>
++#include <sys/ioctl.h>
++
+ #include <jni.h>
+ #include <jcl.h>
+
++#include <cpnative.h>
++#include <cpnet.h>
++
+ #include "java_net_VMNetworkInterface.h"
+
++int iff_flags(JNIEnv *, jstring, jint *);
+
+ static jmethodID java_net_VMNetworkInterface_init;
+ static jmethodID java_net_VMNetworkInterface_addAddress;
+@@ -251,4 +258,136 @@
+ #endif /* HAVE_IFADDRS_H && HAVE_GETIFADDRS */
+ }
+
++int iff_flags(JNIEnv *env, jstring name, jint *flags)
++{
++ struct ifreq iff;
++ const char *iff_name;
++ jint socket;
++ int error, retval;
++
++ if ((error = cpnet_openSocketDatagram(env, &socket, AF_INET)))
++ {
++ return error;
++ }
++
++ iff_name = JCL_jstring_to_cstring(env, name);
++ memset(&iff, 0, sizeof(iff));
++ strcpy(iff.ifr_name, iff_name);
++
++ if (ioctl(socket, SIOCGIFFLAGS, &iff) >= 0)
++ {
++ *flags = (jint) iff.ifr_flags;
++
++ retval = 0;
++ }
++ else
++ {
++ retval = errno;
++ }
++
++ cpnet_close(env, socket);
++
++ JCL_free_cstring(env, name, iff_name);
++
++ return retval;
++}
++
++JNIEXPORT jboolean JNICALL
++Java_java_net_VMNetworkInterface_isUp (JNIEnv *env, jclass class UNUSED,
++ jstring name)
++{
++ jint flags;
++ int error;
++ jboolean retval;
++
++ if ((error = iff_flags(env, name, &flags)))
++ {
++ JCL_ThrowException(env, "java/net/SocketException",
++ cpnative_getErrorString(error));
++
++ retval = JNI_FALSE;
++ }
++ else
++ {
++ retval = (flags & (IFF_UP | IFF_RUNNING))
++ ? JNI_TRUE
++ : JNI_FALSE;
++ }
++
++ return retval;
++}
++
++JNIEXPORT jboolean JNICALL
++Java_java_net_VMNetworkInterface_isPointToPoint (JNIEnv *env,
++ jclass class UNUSED,
++ jstring name)
++{
++ jint flags;
++ int error;
++ jboolean retval;
++
++ if ((error = iff_flags(env, name, &flags)))
++ {
++ JCL_ThrowException(env, "java/net/SocketException",
++ cpnative_getErrorString(error));
++
++ retval = JNI_FALSE;
++ }
++ else
++ {
++ retval = (flags & IFF_POINTOPOINT) ? JNI_TRUE
++ : JNI_FALSE;
++ }
++
++ return retval;
++}
++
++JNIEXPORT jboolean JNICALL
++Java_java_net_VMNetworkInterface_isLoopback (JNIEnv *env,
++ jclass class UNUSED,
++ jstring name)
++{
++ jint flags;
++ int error;
++ jboolean retval;
++
++ if ((error = iff_flags(env, name, &flags)))
++ {
++ JCL_ThrowException(env, "java/net/SocketException",
++ cpnative_getErrorString(error));
++
++ retval = JNI_FALSE;
++ }
++ else
++ {
++ retval = (flags & IFF_LOOPBACK) ? JNI_TRUE : JNI_FALSE;
++ }
++
++ return retval;
++}
++
++JNIEXPORT jboolean JNICALL
++Java_java_net_VMNetworkInterface_supportsMulticast (JNIEnv *env,
++ jclass class UNUSED,
++ jstring name)
++{
++ jint flags;
++ int error;
++ jboolean retval;
++
++ if ((error = iff_flags(env, name, &flags)))
++ {
++ JCL_ThrowException(env, "java/net/SocketException",
++ cpnative_getErrorString(error));
++
++ retval = JNI_FALSE;
++ }
++ else
++ {
++ retval = (flags & IFF_MULTICAST) ? JNI_TRUE : JNI_FALSE;
++ }
++
++ return retval;
++}
++
+ /* end of file */
============================================================
--- packages/classpath/classpath-minimal_0.97.1.bb 0ef04bfd389c769d1b67f97975fcdd35f68c4855
+++ packages/classpath/classpath-minimal_0.97.1.bb ff46d0cb295bca189b6ab07f6506b2e039917ae0
@@ -1,7 +1,12 @@ require classpath.inc
require classpath.inc
-PR = "r0"
+SRC_URI += "\
+ file://netif_16.patch;patch=1;pnum=0 \
+ file://SimpleName.diff;patch=1;pnum=0 \
+ "
+PR = "r1"
+
PROVIDES = "${PN} classpath"
EXTRA_OECONF += "\
============================================================
--- packages/classpath/classpath_0.97.1.bb db8b170f0f6f53145caf1d439efa49971f8c4475
+++ packages/classpath/classpath_0.97.1.bb 924cfdaf2daafe993d70dba55a853c4eb5250f64
@@ -1,7 +1,12 @@ require classpath.inc
require classpath.inc
-PR = "r0"
+SRC_URI += "\
+ file://netif_16.patch;patch=1;pnum=0 \
+ file://SimpleName.diff;patch=1;pnum=0 \
+ "
+PR = "r1"
+
DEPENDS += "gtk+ gconf libxtst"
EXTRA_OECONF += "\
@@ -15,4 +20,3 @@ EXTRA_OECONF += "\
--with-vm=java \
"
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/commitlog/attachments/20080502/affd13f5/attachment.htm
More information about the commitlog
mailing list