Merge
This commit is contained in:
commit
0279b2d49a
29
make/autoconf/configure
vendored
29
make/autoconf/configure
vendored
@ -129,25 +129,18 @@ generate_configure_script() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_generated_up_to_date() {
|
test_generated_up_to_date() {
|
||||||
if test "x`which hg 2> /dev/null | grep -v '^no hg in'`" != x; then
|
conf_source_files="$conf_script_dir/configure.ac $conf_script_dir/*.m4"
|
||||||
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard . 2> /dev/null`
|
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||||
conf_source_files="$conf_script_dir/configure.ac $conf_script_dir/*.m4"
|
conf_custom_source_files="$CUSTOM_CONFIG_DIR/*.m4"
|
||||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
else
|
||||||
conf_custom_updated_autoconf_files=`cd $CUSTOM_CONFIG_DIR && hg status -mard . 2> /dev/null`
|
conf_custom_source_files=""
|
||||||
conf_custom_source_files="$CUSTOM_CONFIG_DIR/*.m4"
|
|
||||||
else
|
|
||||||
conf_custom_updated_autoconf_files=""
|
|
||||||
conf_custom_source_files=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x${conf_updated_autoconf_files}${conf_custom_updated_autoconf_files}" != x; then
|
|
||||||
for file in $conf_source_files $conf_custom_source_files ; do
|
|
||||||
if test $file -nt $generated_script; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for file in $conf_source_files $conf_custom_source_files ; do
|
||||||
|
if test $file -nt $generated_script; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -918,7 +918,6 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
|
|||||||
-MD -Zc:wchar_t- -W3 -wd4800 \
|
-MD -Zc:wchar_t- -W3 -wd4800 \
|
||||||
-DWIN32_LEAN_AND_MEAN \
|
-DWIN32_LEAN_AND_MEAN \
|
||||||
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||||
-D_WINSOCK_DEPRECATED_NO_WARNINGS \
|
|
||||||
-DWIN32 -DIAL"
|
-DWIN32 -DIAL"
|
||||||
if test "x$OPENJDK_$1_CPU" = xx86_64; then
|
if test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||||
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
||||||
|
@ -82,7 +82,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
|
|||||||
CFLAGS_linux := -fPIC, \
|
CFLAGS_linux := -fPIC, \
|
||||||
CFLAGS_solaris := -KPIC, \
|
CFLAGS_solaris := -KPIC, \
|
||||||
CFLAGS_macosx := -fPIC, \
|
CFLAGS_macosx := -fPIC, \
|
||||||
DISABLED_WARNINGS_gcc := unused-result, \
|
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
|
||||||
MAPFILE := $(UNPACK_MAPFILE),\
|
MAPFILE := $(UNPACK_MAPFILE),\
|
||||||
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
||||||
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
||||||
|
@ -358,7 +358,8 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
|
|||||||
WARNINGS_AS_ERRORS_xlc := false, \
|
WARNINGS_AS_ERRORS_xlc := false, \
|
||||||
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
|
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
|
||||||
unused-result maybe-uninitialized format \
|
unused-result maybe-uninitialized format \
|
||||||
format-security int-to-pointer-cast parentheses, \
|
format-security int-to-pointer-cast parentheses \
|
||||||
|
implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
|
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
|
||||||
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
|
E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
|
||||||
@ -491,7 +492,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
|
|||||||
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
|
||||||
$(LIBJAVA_HEADER_FLAGS) \
|
$(LIBJAVA_HEADER_FLAGS) \
|
||||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
||||||
DISABLED_WARNINGS_gcc := clobbered, \
|
DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
@ -669,7 +670,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
|
|||||||
CFLAGS_windows = -DCC_NOEX, \
|
CFLAGS_windows = -DCC_NOEX, \
|
||||||
WARNINGS_AS_ERRORS_xlc := false, \
|
WARNINGS_AS_ERRORS_xlc := false, \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
|
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
|
||||||
type-limits missing-field-initializers, \
|
type-limits missing-field-initializers implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
||||||
maybe-uninitialized, \
|
maybe-uninitialized, \
|
||||||
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
||||||
@ -943,7 +944,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
|||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
||||||
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized shift-negative-value, \
|
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
|
||||||
|
maybe-uninitialized shift-negative-value implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_clang := incompatible-pointer-types, \
|
DISABLED_WARNINGS_clang := incompatible-pointer-types, \
|
||||||
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
|
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
|
||||||
E_STATEMENT_NOT_REACHED, \
|
E_STATEMENT_NOT_REACHED, \
|
||||||
|
@ -67,7 +67,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
|
|||||||
CFLAGS_linux_ppc64le := -ffp-contract=off, \
|
CFLAGS_linux_ppc64le := -ffp-contract=off, \
|
||||||
CFLAGS_linux_s390x := -ffp-contract=off, \
|
CFLAGS_linux_s390x := -ffp-contract=off, \
|
||||||
CFLAGS_linux_aarch64 := -ffp-contract=off, \
|
CFLAGS_linux_aarch64 := -ffp-contract=off, \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
|
||||||
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
||||||
ARFLAGS := $(ARFLAGS), \
|
ARFLAGS := $(ARFLAGS), \
|
||||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||||
@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
|
|||||||
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
|
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \
|
||||||
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -229,6 +230,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
|
|||||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
||||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
|
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
|
||||||
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
|
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
|
||||||
REORDER := $(BUILD_LIBZIP_REORDER), \
|
REORDER := $(BUILD_LIBZIP_REORDER), \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
@ -270,6 +272,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
|
|||||||
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
|
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
||||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
CFLAGS_unix := -UDEBUG, \
|
CFLAGS_unix := -UDEBUG, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||||
@ -363,6 +366,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
|
|||||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||||
OPTIMIZATION := HIGH, \
|
OPTIMIZATION := HIGH, \
|
||||||
CFLAGS := $(LIBJLI_CFLAGS), \
|
CFLAGS := $(LIBJLI_CFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := maybe-uninitialized, \
|
||||||
DISABLED_WARNINGS_solstudio := \
|
DISABLED_WARNINGS_solstudio := \
|
||||||
E_ASM_DISABLES_OPTIMIZATION \
|
E_ASM_DISABLES_OPTIMIZATION \
|
||||||
E_STATEMENT_NOT_REACHED, \
|
E_STATEMENT_NOT_REACHED, \
|
||||||
|
@ -54,7 +54,7 @@ ifeq ($(ENABLE_INTREE_EC), true)
|
|||||||
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
|
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
|
||||||
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
|
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
|
||||||
$(BUILD_LIBSUNEC_FLAGS), \
|
$(BUILD_LIBSUNEC_FLAGS), \
|
||||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \
|
||||||
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
|
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
||||||
|
@ -43,6 +43,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
|
|||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
|
||||||
$(LIBDT_SOCKET_CPPFLAGS), \
|
$(LIBDT_SOCKET_CPPFLAGS), \
|
||||||
|
DISABLED_WARNINGS_gcc := shift-negative-value, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
@ -40,6 +40,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
|
|||||||
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
|
-I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \
|
||||||
$(LIBJAVA_HEADER_FLAGS), \
|
$(LIBJAVA_HEADER_FLAGS), \
|
||||||
CFLAGS_release := -DPRODUCT, \
|
CFLAGS_release := -DPRODUCT, \
|
||||||
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
|
MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -525,7 +525,7 @@ NET_SocketClose(int fd) {
|
|||||||
int len = sizeof (l);
|
int len = sizeof (l);
|
||||||
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
||||||
if (l.l_onoff == 0) {
|
if (l.l_onoff == 0) {
|
||||||
WSASendDisconnect(fd, NULL);
|
shutdown(fd, SD_SEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = closesocket (fd);
|
ret = closesocket (fd);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -272,7 +272,7 @@ Java_sun_nio_ch_SocketDispatcher_preClose0(JNIEnv *env, jclass clazz,
|
|||||||
int len = sizeof(l);
|
int len = sizeof(l);
|
||||||
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
||||||
if (l.l_onoff == 0) {
|
if (l.l_onoff == 0) {
|
||||||
WSASendDisconnect(fd, NULL);
|
shutdown(fd, SD_SEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -228,6 +228,7 @@ getLocalHostAddress() {
|
|||||||
// it looks up "localhost" and returns 127.0.0.1 if lookup
|
// it looks up "localhost" and returns 127.0.0.1 if lookup
|
||||||
// fails.
|
// fails.
|
||||||
struct addrinfo hints, *res = NULL;
|
struct addrinfo hints, *res = NULL;
|
||||||
|
uint32_t addr;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
// Use portable way to initialize the structure
|
// Use portable way to initialize the structure
|
||||||
@ -241,7 +242,9 @@ getLocalHostAddress() {
|
|||||||
|
|
||||||
// getaddrinfo might return more than one address
|
// getaddrinfo might return more than one address
|
||||||
// but we are using first one only
|
// but we are using first one only
|
||||||
return ((struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr;
|
addr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr;
|
||||||
|
freeaddrinfo(res);
|
||||||
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -300,7 +303,7 @@ parseAddress(const char *address, struct sockaddr_in *sa) {
|
|||||||
char *buf;
|
char *buf;
|
||||||
char *hostname;
|
char *hostname;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
|
int ai;
|
||||||
buf = (*callback->alloc)((int)strlen(address) + 1);
|
buf = (*callback->alloc)((int)strlen(address) + 1);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
RETURN_ERROR(JDWPTRANSPORT_ERROR_OUT_OF_MEMORY, "out of memory");
|
RETURN_ERROR(JDWPTRANSPORT_ERROR_OUT_OF_MEMORY, "out of memory");
|
||||||
@ -315,16 +318,25 @@ parseAddress(const char *address, struct sockaddr_in *sa) {
|
|||||||
*/
|
*/
|
||||||
addr = dbgsysInetAddr(hostname);
|
addr = dbgsysInetAddr(hostname);
|
||||||
if (addr == 0xffffffff) {
|
if (addr == 0xffffffff) {
|
||||||
struct hostent *hp = dbgsysGetHostByName(hostname);
|
struct addrinfo hints;
|
||||||
if (hp == NULL) {
|
struct addrinfo *results = NULL;
|
||||||
|
memset (&hints, 0, sizeof(hints));
|
||||||
|
hints.ai_family = AF_INET;
|
||||||
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
hints.ai_protocol = IPPROTO_TCP;
|
||||||
|
|
||||||
|
ai = dbgsysGetAddrInfo(hostname, NULL, &hints, &results);
|
||||||
|
|
||||||
|
if (ai != 0) {
|
||||||
/* don't use RETURN_IO_ERROR as unknown host is normal */
|
/* don't use RETURN_IO_ERROR as unknown host is normal */
|
||||||
setLastError(0, "gethostbyname: unknown host");
|
setLastError(0, "getaddrinfo: unknown host");
|
||||||
(*callback->free)(buf);
|
(*callback->free)(buf);
|
||||||
return JDWPTRANSPORT_ERROR_IO_ERROR;
|
return JDWPTRANSPORT_ERROR_IO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* lookup was successful */
|
/* lookup was successful */
|
||||||
memcpy(&(sa->sin_addr), hp->h_addr_list[0], hp->h_length);
|
sa->sin_addr = ((struct sockaddr_in *)results->ai_addr)->sin_addr;
|
||||||
|
freeaddrinfo(results);
|
||||||
} else {
|
} else {
|
||||||
sa->sin_addr.s_addr = addr;
|
sa->sin_addr.s_addr = addr;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -47,7 +47,7 @@ int dbgsysRecvFrom(int fd, char *buf, size_t nBytes, int flags, struct sockaddr
|
|||||||
int dbgsysListen(int fd, int backlog);
|
int dbgsysListen(int fd, int backlog);
|
||||||
int dbgsysRecv(int fd, char *buf, size_t nBytes, int flags);
|
int dbgsysRecv(int fd, char *buf, size_t nBytes, int flags);
|
||||||
int dbgsysSend(int fd, char *buf, size_t nBytes, int flags);
|
int dbgsysSend(int fd, char *buf, size_t nBytes, int flags);
|
||||||
struct hostent *dbgsysGetHostByName(char *hostname);
|
int dbgsysGetAddrInfo(char *hostname, char *service, struct addrinfo *hints, struct addrinfo **results);
|
||||||
int dbgsysSocket(int domain, int type, int protocol);
|
int dbgsysSocket(int domain, int type, int protocol);
|
||||||
int dbgsysBind(int fd, struct sockaddr *name, socklen_t namelen);
|
int dbgsysBind(int fd, struct sockaddr *name, socklen_t namelen);
|
||||||
int dbgsysSetSocketOption(int fd, jint cmd, jboolean on, jvalue value);
|
int dbgsysSetSocketOption(int fd, jint cmd, jboolean on, jvalue value);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -126,9 +126,11 @@ dbgsysSend(int fd, char *buf, size_t nBytes, int flags) {
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct hostent *
|
int
|
||||||
dbgsysGetHostByName(char *hostname) {
|
dbgsysGetAddrInfo(char *hostname, char *service,
|
||||||
return gethostbyname(hostname);
|
struct addrinfo *hints,
|
||||||
|
struct addrinfo **results) {
|
||||||
|
return getaddrinfo(hostname, service, hints, results);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short
|
unsigned short
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
#include "sysSocket.h"
|
#include "sysSocket.h"
|
||||||
#include "socketTransport.h"
|
#include "socketTransport.h"
|
||||||
@ -197,9 +198,11 @@ dbgsysSend(int fd, char *buf, size_t nBytes, int flags) {
|
|||||||
return send(fd, buf, (int)nBytes, flags);
|
return send(fd, buf, (int)nBytes, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct hostent *
|
int
|
||||||
dbgsysGetHostByName(char *hostname) {
|
dbgsysGetAddrInfo(char *hostname, char *service,
|
||||||
return gethostbyname(hostname);
|
struct addrinfo *hints,
|
||||||
|
struct addrinfo **result) {
|
||||||
|
return getaddrinfo(hostname, service, hints, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short
|
unsigned short
|
||||||
@ -223,7 +226,7 @@ dbgsysSocketClose(int fd) {
|
|||||||
|
|
||||||
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) {
|
||||||
if (l.l_onoff == 0) {
|
if (l.l_onoff == 0) {
|
||||||
WSASendDisconnect(fd, NULL);
|
shutdown(fd, SD_SEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return closesocket(fd);
|
return closesocket(fd);
|
||||||
@ -239,7 +242,11 @@ dbgsysBind(int fd, struct sockaddr *name, socklen_t namelen) {
|
|||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
dbgsysInetAddr(const char* cp) {
|
dbgsysInetAddr(const char* cp) {
|
||||||
return (uint32_t)inet_addr(cp);
|
uint32_t addr;
|
||||||
|
if (inet_pton(AF_INET, cp, &addr) < 1) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
@ -341,6 +341,7 @@ java/nio/channels/DatagramChannel/ChangingAddress.java 7141822 macosx-a
|
|||||||
|
|
||||||
java/nio/file/WatchService/Basic.java 7158947 solaris-all Solaris 11
|
java/nio/file/WatchService/Basic.java 7158947 solaris-all Solaris 11
|
||||||
java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11
|
java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11
|
||||||
|
java/nio/file/WatchService/LotsOfCancels.java 8188039 solaris-all Solaris 11
|
||||||
java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11
|
java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user