mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
501a6f3423
968 changed files with 30359 additions and 14876 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -109,7 +109,9 @@ enum {
|
|||
JVM_CONSTANT_MethodType = 16, // JSR 292
|
||||
JVM_CONSTANT_Dynamic = 17,
|
||||
JVM_CONSTANT_InvokeDynamic = 18,
|
||||
JVM_CONSTANT_ExternalMax = 18
|
||||
JVM_CONSTANT_Module = 19,
|
||||
JVM_CONSTANT_Package = 20,
|
||||
JVM_CONSTANT_ExternalMax = 20
|
||||
};
|
||||
|
||||
/* JVM_CONSTANT_MethodHandle subtypes */
|
||||
|
|
|
@ -27,12 +27,19 @@
|
|||
|
||||
#include "java_net_InetAddress.h"
|
||||
|
||||
int IPv4_supported();
|
||||
int IPv6_supported();
|
||||
int reuseport_supported();
|
||||
|
||||
static int IPv4_available;
|
||||
static int IPv6_available;
|
||||
static int REUSEPORT_available;
|
||||
|
||||
JNIEXPORT jint JNICALL ipv4_available()
|
||||
{
|
||||
return IPv4_available;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL ipv6_available()
|
||||
{
|
||||
return IPv6_available;
|
||||
|
@ -68,6 +75,7 @@ DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
|
|||
* check now whether we have IPv6 on this platform and if the
|
||||
* supporting socket APIs are available
|
||||
*/
|
||||
IPv4_available = IPv4_supported();
|
||||
IPv6_available = IPv6_supported() & (!preferIPv4Stack);
|
||||
|
||||
/* check if SO_REUSEPORT is supported on this platform */
|
||||
|
|
|
@ -126,6 +126,7 @@ void NET_ThrowCurrent(JNIEnv *env, char *msg);
|
|||
|
||||
jfieldID NET_GetFileDescriptorID(JNIEnv *env);
|
||||
|
||||
JNIEXPORT jint JNICALL ipv4_available();
|
||||
JNIEXPORT jint JNICALL ipv6_available();
|
||||
|
||||
JNIEXPORT jint JNICALL reuseport_available();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue