Import GNU Classpath (libgcj-import-20070727).
libjava/ 2007-08-04 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (libgcj-import-20070727). * Regenerate class and header files. * Regenerate auto* files. * include/jvm.h: * jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type. * jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise. * jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA, _Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA, _Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA, _Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify jvalue parameter. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise. * java/lang/VMFloat.java (toString, parseFloat): New. * gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported, isModalExclusionTypeSupported): New (stub only). * gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise. * gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages, updateFocusableWindowState, setModalBlocked, getBoundsPrivate, setAlwaysOnTop): Likewise. * gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature. * scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer, ignore javax.sound.sampled.spi.MixerProvider, ignore .in files. * HACKING: Mention --enable-gstreamer-peer, removal of generated files. libjava/classpath/ 2007-08-04 Matthias Klose <doko@ubuntu.com> * java/util/EnumMap.java (clone): Add cast. From-SVN: r127204
This commit is contained in:
parent
2c3de459b6
commit
f06a83c0b2
522 changed files with 13385 additions and 4867 deletions
|
@ -163,10 +163,12 @@ Java_java_net_VMInetAddress_getHostByAddr (JNIEnv * env,
|
|||
addr = cpnet_newIPV4Address(env);
|
||||
cpnet_bytesToIPV4Address (addr, octets);
|
||||
break;
|
||||
#ifdef HAVE_INET6
|
||||
case 16:
|
||||
addr = cpnet_newIPV6Address(env);
|
||||
cpnet_bytesToIPV6Address (addr, octets);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Bad IP Address");
|
||||
return (jstring) NULL;
|
||||
|
@ -245,26 +247,7 @@ Java_java_net_VMInetAddress_getHostByName (JNIEnv * env,
|
|||
/* Now loop and copy in each address */
|
||||
for (i = 0; i < addresses_count; i++)
|
||||
{
|
||||
if (cpnet_isIPV6Address (addresses[i]))
|
||||
{
|
||||
ret_octets = (*env)->NewByteArray (env, 16);
|
||||
|
||||
if (!ret_octets)
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
cpnet_freeAddresses (env, addresses, addresses_count);
|
||||
return (jobjectArray) NULL;
|
||||
}
|
||||
|
||||
octets = (*env)->GetByteArrayElements (env, ret_octets, 0);
|
||||
|
||||
cpnet_IPV6AddressToBytes (addresses[i], octets);
|
||||
|
||||
(*env)->ReleaseByteArrayElements (env, ret_octets, octets, 0);
|
||||
|
||||
(*env)->SetObjectArrayElement (env, addrs, i, ret_octets);
|
||||
}
|
||||
else if (cpnet_isIPV4Address (addresses[i]))
|
||||
if (cpnet_isIPV4Address (addresses[i]))
|
||||
{
|
||||
ret_octets = (*env)->NewByteArray (env, 4);
|
||||
|
||||
|
@ -283,6 +266,27 @@ Java_java_net_VMInetAddress_getHostByName (JNIEnv * env,
|
|||
|
||||
(*env)->SetObjectArrayElement (env, addrs, i, ret_octets);
|
||||
}
|
||||
#ifdef HAVE_INET6
|
||||
else if (cpnet_isIPV6Address (addresses[i]))
|
||||
{
|
||||
ret_octets = (*env)->NewByteArray (env, 16);
|
||||
|
||||
if (!ret_octets)
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
cpnet_freeAddresses (env, addresses, addresses_count);
|
||||
return (jobjectArray) NULL;
|
||||
}
|
||||
|
||||
octets = (*env)->GetByteArrayElements (env, ret_octets, 0);
|
||||
|
||||
cpnet_IPV6AddressToBytes (addresses[i], octets);
|
||||
|
||||
(*env)->ReleaseByteArrayElements (env, ret_octets, octets, 0);
|
||||
|
||||
(*env)->SetObjectArrayElement (env, addrs, i, ret_octets);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
|
@ -336,24 +340,7 @@ Java_java_net_VMInetAddress_aton (JNIEnv *env,
|
|||
if (!address)
|
||||
return (jbyteArray) NULL;
|
||||
|
||||
if (cpnet_isIPV6Address (address))
|
||||
{
|
||||
ret_octets = (jbyteArray) (*env)->NewByteArray (env, 16);
|
||||
|
||||
if (!ret_octets)
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
cpnet_freeAddress (env, address);
|
||||
return (jbyteArray) NULL;
|
||||
}
|
||||
|
||||
octets = (*env)->GetByteArrayElements (env, ret_octets, 0);
|
||||
|
||||
cpnet_IPV6AddressToBytes (address, octets);
|
||||
|
||||
(*env)->ReleaseByteArrayElements (env, ret_octets, octets, 0);
|
||||
}
|
||||
else if (cpnet_isIPV4Address (address))
|
||||
if (cpnet_isIPV4Address (address))
|
||||
{
|
||||
ret_octets = (jbyteArray) (*env)->NewByteArray (env, 4);
|
||||
|
||||
|
@ -370,6 +357,25 @@ Java_java_net_VMInetAddress_aton (JNIEnv *env,
|
|||
|
||||
(*env)->ReleaseByteArrayElements (env, ret_octets, octets, 0);
|
||||
}
|
||||
#ifdef HAVE_INET6
|
||||
else if (cpnet_isIPV6Address (address))
|
||||
{
|
||||
ret_octets = (jbyteArray) (*env)->NewByteArray (env, 16);
|
||||
|
||||
if (!ret_octets)
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
cpnet_freeAddress (env, address);
|
||||
return (jbyteArray) NULL;
|
||||
}
|
||||
|
||||
octets = (*env)->GetByteArrayElements (env, ret_octets, 0);
|
||||
|
||||
cpnet_IPV6AddressToBytes (address, octets);
|
||||
|
||||
(*env)->ReleaseByteArrayElements (env, ret_octets, octets, 0);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, "Internal Error");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue