Mercurial > hg > release > icedtea8-forest-3.0 > jdk
changeset 11655:9316410a898f
PR2853: Remaining miscellaneous synchronisation changes from aarch64/jdk8u
line wrap: on
line diff
--- a/make/CompileDemos.gmk Fri Feb 05 17:41:45 2016 +0000 +++ b/make/CompileDemos.gmk Sat Feb 20 01:41:15 2016 +0000 @@ -229,7 +229,7 @@ BUILD_DEMO_JVMTI_$1_LANG := $4 endif ifeq (C++, $4) - $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX) + $1_EXTRA_CXX := $$(LDFLAGS_CXX_JDK) $(LIBCXX) endif $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \ @@ -246,14 +246,13 @@ -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 # Remove the -incremental:no setting to get .ilk-files like in the old build. - BUILD_DEMO_JVMTI_$1_LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)) - $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \ SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \ LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \ OPTIMIZATION := LOW, \ CXXFLAGS := $$($1_CXXFLAGS), \ - LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \ + LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)), \ + LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \ LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \ LDFLAGS_SUFFIX_posix := $5, \ LDFLAGS_SUFFIX_windows := $6, \
--- a/src/share/classes/java/awt/color/ICC_Profile.java Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/classes/java/awt/color/ICC_Profile.java Sat Feb 20 01:41:15 2016 +0000 @@ -1831,7 +1831,7 @@ new StringTokenizer(path, File.pathSeparator); while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) { dir = st.nextToken(); - fullPath = dir + File.separatorChar + fileName; + fullPath = dir + File.separatorChar + fileName; f = new File(fullPath); if (!isChildOf(f, dir)) { f = null; @@ -1846,7 +1846,7 @@ new StringTokenizer(path, File.pathSeparator); while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) { dir = st.nextToken(); - fullPath = dir + File.separatorChar + fileName; + fullPath = dir + File.separatorChar + fileName; f = new File(fullPath); } }
--- a/src/share/classes/java/security/Policy.java Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/classes/java/security/Policy.java Sat Feb 20 01:41:15 2016 +0000 @@ -33,6 +33,7 @@ import sun.security.util.Debug; import sun.security.util.SecurityConstants; + /** * A Policy object is responsible for determining whether code executing * in the Java runtime environment has permission to perform a
--- a/src/share/classes/sun/misc/SharedSecrets.java Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/classes/sun/misc/SharedSecrets.java Sat Feb 20 01:41:15 2016 +0000 @@ -146,10 +146,9 @@ public static JavaSecurityProtectionDomainAccess getJavaSecurityProtectionDomainAccess() { - if (javaSecurityProtectionDomainAccess == null) - unsafe.ensureClassInitialized(ProtectionDomain.class); - - return javaSecurityProtectionDomainAccess; + if (javaSecurityProtectionDomainAccess == null) + unsafe.ensureClassInitialized(ProtectionDomain.class); + return javaSecurityProtectionDomainAccess; } public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
--- a/src/share/classes/sun/security/util/ObjectIdentifier.java Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/classes/sun/security/util/ObjectIdentifier.java Sat Feb 20 01:41:15 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2006, 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
--- a/src/share/native/java/util/zip/Deflater.c Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/native/java/util/zip/Deflater.c Sat Feb 20 01:41:15 2016 +0000 @@ -68,13 +68,13 @@ JNIEXPORT jlong JNICALL Java_java_util_zip_Deflater_init(JNIEnv *env, jclass cls, jint level, - jint strategy, jboolean nowrap) + jint strategy, jboolean nowrap) { z_stream *strm = calloc(1, sizeof(z_stream)); if (strm == 0) { - JNU_ThrowOutOfMemoryError(env, 0); - return jlong_zero; + JNU_ThrowOutOfMemoryError(env, 0); + return jlong_zero; } else { const char *msg; int ret = deflateInit2(strm, level, Z_DEFLATED,
--- a/src/share/native/java/util/zip/Inflater.c Fri Feb 05 17:41:45 2016 +0000 +++ b/src/share/native/java/util/zip/Inflater.c Sat Feb 20 01:41:15 2016 +0000 @@ -40,7 +40,7 @@ #include "java_util_zip_Inflater.h" #define ThrowDataFormatException(env, msg) \ - JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) + JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) static jfieldID needDictID; static jfieldID finishedID;
--- a/src/solaris/classes/sun/awt/X11/XWM.java Fri Feb 05 17:41:45 2016 +0000 +++ b/src/solaris/classes/sun/awt/X11/XWM.java Sat Feb 20 01:41:15 2016 +0000 @@ -1093,8 +1093,6 @@ boolean supportsDynamicLayout() { int wm = getWMID(); - // TODO: does mutter support this? It's a fancy new WM, so it probably - // does. Confirm and fix this. switch (wm) { case XWM.ENLIGHTEN_WM: case XWM.KDE2_WM: @@ -1427,7 +1425,6 @@ return insets; } } - // TODO: figure out if Mutter implements the insets property. switch(getWMID()) { case XWM.KDE2_WM: return getInsetsFromProp(window, XA_KDE_NET_WM_FRAME_STRUT); @@ -1624,9 +1621,6 @@ correctWM.bottom = correctWM.left; break; } - case XWM.MUTTER_WM: - // TODO: Figure out if Mutter is double reparenting. - // For now the fallback code is good enough. case XWM.OTHER_WM: default: { /* this is very similar to the E! case above */ if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
--- a/src/solaris/native/sun/awt/awt_GraphicsEnv.c Fri Feb 05 17:41:45 2016 +0000 +++ b/src/solaris/native/sun/awt/awt_GraphicsEnv.c Sat Feb 20 01:41:15 2016 +0000 @@ -450,7 +450,7 @@ if (xrenderLibHandle != NULL) { xrenderFindVisualFormat = (XRenderFindVisualFormatFunc*)dlsym(xrenderLibHandle, - "XRenderFindVisualFormat"); + "XRenderFindVisualFormat"); } }
--- a/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c Fri Feb 05 17:41:45 2016 +0000 +++ b/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c Sat Feb 20 01:41:15 2016 +0000 @@ -23,13 +23,6 @@ * questions. */ -/** - * fstatat in glibc requires _ATFILE_SOURCE to be defined. - */ -#if defined(__linux__) -#define _ATFILE_SOURCE -#endif - #include <stdio.h> #include <stdlib.h> #include <limits.h> @@ -137,6 +130,34 @@ static fdopendir_func* my_fdopendir_func = NULL; /** + * fstatat missing from glibc on Linux. Temporary workaround + * for x86/x64. + */ +#if defined(__linux__) && defined(__i386) +#define FSTATAT64_SYSCALL_AVAILABLE +static int fstatat64_wrapper(int dfd, const char *path, + struct stat64 *statbuf, int flag) +{ + #ifndef __NR_fstatat64 + #define __NR_fstatat64 300 + #endif + return syscall(__NR_fstatat64, dfd, path, statbuf, flag); +} +#endif + +#if defined(__linux__) && defined(__x86_64__) +#define FSTATAT64_SYSCALL_AVAILABLE +static int fstatat64_wrapper(int dfd, const char *path, + struct stat64 *statbuf, int flag) +{ + #ifndef __NR_newfstatat + #define __NR_newfstatat 262 + #endif + return syscall(__NR_newfstatat, dfd, path, statbuf, flag); +} +#endif + +/** * Call this to throw an internal UnixException when a system/library * call fails */ @@ -232,10 +253,10 @@ my_futimesat_func = (futimesat_func*) dlsym(RTLD_DEFAULT, "futimesat"); my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir"); -#if defined(_ATFILE_SOURCE) - /* fstatat64 from glibc requires a define */ +#if defined(FSTATAT64_SYSCALL_AVAILABLE) + /* fstatat64 missing from glibc */ if (my_fstatat64_func == NULL) - my_fstatat64_func = (fstatat64_func*)&fstatat64; + my_fstatat64_func = (fstatat64_func*)&fstatat64_wrapper; #endif /* supports futimes or futimesat */
--- a/test/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java Fri Feb 05 17:41:45 2016 +0000 +++ b/test/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java Sat Feb 20 01:41:15 2016 +0000 @@ -39,15 +39,6 @@ Frame frame = new Frame(); frame.setVisible(true); - // wait until frame is really displayed - while (frame.getWidth() == 0 || frame.getHeight() == 0) { - System.out.println("Still not displayed..."); - try { - Thread.currentThread().sleep(1); - } - catch (InterruptedException ie) {} - } - BufferedImage img = new BufferedImage(frame.getWidth(), frame.getHeight(), BufferedImage.TYPE_INT_RGB);
--- a/test/java/awt/regtesthelpers/Util.java Fri Feb 05 17:41:45 2016 +0000 +++ b/test/java/awt/regtesthelpers/Util.java Sat Feb 20 01:41:15 2016 +0000 @@ -141,13 +141,6 @@ robot.mouseMove(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2); } - public static Point getTitlePoint(Window decoratedWindow) { - Point p = decoratedWindow.getLocationOnScreen(); - Dimension d = decoratedWindow.getSize(); - return new Point(p.x + (int)(d.getWidth()/2), - p.y + (int)decoratedWindow.getInsets().top/2); - } - /** * Moves mouse pointer in the center of a given {@code comp} component * and performs a left mouse button click using the {@code robot} parameter
--- a/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java Fri Feb 05 17:41:45 2016 +0000 +++ b/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java Sat Feb 20 01:41:15 2016 +0000 @@ -34,7 +34,6 @@ */ import java.io.IOException; -import java.net.ProtocolFamily; import java.net.Socket; import java.net.ProtocolFamily; import java.nio.channels.Channel; @@ -138,9 +137,11 @@ return provider.openDatagramChannel(); } - public DatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException { - return provider.openDatagramChannel(family); - } + public DatagramChannel openDatagramChannel(ProtocolFamily family) + throws IOException + { + return provider.openDatagramChannel(family); + } public Pipe openPipe() throws IOException { return provider.openPipe();
--- a/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java Fri Feb 05 17:41:45 2016 +0000 +++ b/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java Sat Feb 20 01:41:15 2016 +0000 @@ -34,7 +34,6 @@ import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; -import java.net.ProtocolFamily; import java.net.ServerSocket; import java.net.ProtocolFamily; import java.nio.channels.*; @@ -139,9 +138,11 @@ return provider.openDatagramChannel(); } - public DatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException { - return provider.openDatagramChannel(family); - } + public DatagramChannel openDatagramChannel(ProtocolFamily family) + throws IOException + { + return provider.openDatagramChannel(family); + } public Pipe openPipe() throws IOException