changeset 15905:028d56ebb42a

Merge
author amurillo
date Thu, 13 Oct 2016 09:02:13 -0700
parents 3d3f338b5aea 86e5d318fad9
children 234fa7498814
files make/Import.gmk src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelDeviceEventListener.java src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java test/java/awt/image/multiresolution/MultiResolutionTrayIconTest/MultiResolutionTrayIconTest.html test/java/beans/XMLEncoder/EnumPrivate.java test/java/beans/XMLEncoder/EnumPublic.java test/java/beans/XMLEncoder/java_util_Collections_CheckedCollection.java test/java/beans/XMLEncoder/java_util_Collections_CheckedList.java test/java/beans/XMLEncoder/java_util_Collections_CheckedMap.java test/java/beans/XMLEncoder/java_util_Collections_CheckedRandomAccessList.java test/java/beans/XMLEncoder/java_util_Collections_CheckedSet.java test/java/beans/XMLEncoder/java_util_Collections_CheckedSortedMap.java test/java/beans/XMLEncoder/java_util_Collections_CheckedSortedSet.java test/java/beans/XMLEncoder/java_util_EnumMap.java test/java/beans/XMLEncoder/java_util_JumboEnumSet.java test/java/beans/XMLEncoder/java_util_RegularEnumSet.java
diffstat 347 files changed, 11240 insertions(+), 4524 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Sep 28 11:07:32 2016 +0200
+++ b/.hgtags	Thu Oct 13 09:02:13 2016 -0700
@@ -381,3 +381,4 @@
 54c5931849a33a363e03fdffa141503f5cc4779d jdk-9+136
 e72df94364e3686e7d62059ce0d6b187b82da713 jdk-9+137
 665096863382bf23ce891307cf2a7511e77c1c88 jdk-9+138
+5518ac2f2ead5e594bd983f2047178136aafdfd0 jdk-9+139
--- a/ASSEMBLY_EXCEPTION	Wed Sep 28 11:07:32 2016 +0200
+++ b/ASSEMBLY_EXCEPTION	Thu Oct 13 09:02:13 2016 -0700
@@ -1,27 +1,27 @@
 
 OPENJDK ASSEMBLY EXCEPTION
 
-The OpenJDK source code made available by Sun at openjdk.java.net and
-openjdk.dev.java.net ("OpenJDK Code") is distributed under the terms of the
-GNU General Public License <http://www.gnu.org/copyleft/gpl.html> version 2
+The OpenJDK source code made available by Oracle America, Inc. (Oracle) at
+openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU
+General Public License <http://www.gnu.org/copyleft/gpl.html> version 2
 only ("GPL2"), with the following clarification and special exception.
 
     Linking this OpenJDK Code statically or dynamically with other code
     is making a combined work based on this library.  Thus, the terms
     and conditions of GPL2 cover the whole combination.
 
-    As a special exception, Sun gives you permission to link this
-    OpenJDK Code with certain code licensed by Sun as indicated at
+    As a special exception, Oracle gives you permission to link this
+    OpenJDK Code with certain code licensed by Oracle as indicated at
     http://openjdk.java.net/legal/exception-modules-2007-05-08.html
     ("Designated Exception Modules") to produce an executable,
     regardless of the license terms of the Designated Exception Modules,
     and to copy and distribute the resulting executable under GPL2,
     provided that the Designated Exception Modules continue to be
-    governed by the licenses under which they were offered by Sun.
+    governed by the licenses under which they were offered by Oracle.
 
-As such, it allows licensees and sublicensees of Sun's GPL2 OpenJDK Code to
-build an executable that includes those portions of necessary code that Sun
-could not provide under GPL2 (or that Sun has provided under GPL2 with the
-Classpath exception).  If you modify or add to the OpenJDK code, that new
-GPL2 code may still be combined with Designated Exception Modules if the
-new code is made subject to this exception by its copyright holder.
+As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code
+to build an executable that includes those portions of necessary code that
+Oracle could not provide under GPL2 (or that Oracle has provided under GPL2
+with the Classpath exception).  If you modify or add to the OpenJDK code,
+that new GPL2 code may still be combined with Designated Exception Modules
+if the new code is made subject to this exception by its copyright holder.
--- a/make/CompileDemos.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/CompileDemos.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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
@@ -338,6 +338,7 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \
       LIBRARY := $1, \
+      STRIP_SYMBOLS := false, \
   ))
 
   $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1)
@@ -453,6 +454,7 @@
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \
       LIBRARY := Poller, \
+      STRIP_SYMBOLS := false, \
   ))
 
   TARGETS += $(BUILD_DEMO_NATIVE_Poller)
--- a/make/CompileInterimRmic.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/CompileInterimRmic.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/CompileModuleTools.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2013, 2016, 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+include SetupJavaCompilers.gmk
+
+TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
+
+$(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
+    SETUP := GENERATE_USINGJDKBYTECODE, \
+    SRC := $(JDK_TOPDIR)/make/src/classes, \
+    INCLUDES := build/tools/deps \
+                build/tools/jigsaw, \
+    BIN := $(TOOLS_CLASSES_DIR), \
+    ADD_JAVAC_FLAGS := \
+        --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
+        --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
+))
--- a/make/CompileTools.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/CompileTools.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/GenerateModuleSummary.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/GenerateModuleSummary.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, 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/make/Import.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-#
-# Copyright (c) 2012, 2016, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-################################################################################
-
-# Put the libraries here. Different locations for different target OS types.
-ifneq ($(OPENJDK_TARGET_OS), windows)
-  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
-  BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
-else
-  HOTSPOT_LIB_DIR := $(HOTSPOT_DIST)/bin
-  BASE_INSTALL_LIBRARIES_HERE := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
-endif
-
-################################################################################
-#
-# Import hotspot
-#
-
-# Don't import jsig library for static builds
-ifneq ($(STATIC_BUILD), true)
-  JSIG_IMPORT = jsig.*
-else
-  JSIG_IMPORT =
-endif
-
-HOTSPOT_BASE_IMPORT_FILES := \
-    $(addprefix $(LIBRARY_PREFIX), jvm.* $(JSIG_IMPORT) jvm_db.* jvm_dtrace.*) \
-    Xusage.txt \
-    #
-
-$(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE, \
-    SRC := $(HOTSPOT_LIB_DIR), \
-    DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
-    FILES := $(shell $(FIND) $(HOTSPOT_LIB_DIR) -type f  \
-        -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE), $(HOTSPOT_BASE_IMPORT_FILES)) \) )))
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  $(eval $(call SetupCopyFiles,COPY_HOTSPOT_BASE_JVMLIB, \
-      SRC := $(HOTSPOT_DIST)/lib, \
-      DEST := $(BASE_INSTALL_LIBRARIES_HERE), \
-      FILES := $(wildcard $(HOTSPOT_DIST)/lib/*.lib)))
-endif
-
-BASE_TARGETS := $(COPY_HOTSPOT_BASE) $(COPY_HOTSPOT_BASE_JVMLIB)
-
-################################################################################
-
-ifneq ($(STATIC_BUILD), true)
-  ifeq ($(OPENJDK_TARGET_OS), macosx)
-    JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig$(SHARED_LIBRARY_SUFFIX).dSYM) \
-        $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
-  else
-    JSIG_DEBUGINFO := $(strip $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.debuginfo) \
-        $(wildcard $(HOTSPOT_DIST)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjsig.diz) )
-  endif
-
-  ifneq ($(OPENJDK_TARGET_OS), windows)
-    ifeq ($(call check-jvm-variant, server), true)
-      BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-      ifneq (, $(JSIG_DEBUGINFO))
-        BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
-      endif
-    endif
-    ifeq ($(call check-jvm-variant, client), true)
-      BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-      ifneq (, $(JSIG_DEBUGINFO))
-        BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
-      endif
-    endif
-    ifneq ($(OPENJDK_TARGET_OS), macosx)
-      ifeq ($(call check-jvm-variant, minimal), true)
-        BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
-        ifneq (,$(JSIG_DEBUGINFO))
-          BASE_TARGETS += $(BASE_INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
-        endif
-      endif
-    endif
-  endif
-endif
-
-$(BASE_INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.dSYM:
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(MV) $@.tmp $@
-else
-  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-  $(BASE_INSTALL_LIBRARIES_HERE)/server/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(RM) $@.tmp $(basename $@).debuginfo
-	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
-	$(RM) $(basename $@).debuginfo
-	$(MV) $@.tmp $@
-endif
-
-$(BASE_INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.dSYM : $(BASE_INSTALL_LIBRARIES_HERE)/%.dSYM
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz : $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(RM) $@.tmp $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(LN) -s ../$(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F))$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(RM) $(basename $@)$(SHARED_LIBRARY_SUFFIX).dSYM
-	$(MV) $@.tmp $@
-else
-  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-  $(BASE_INSTALL_LIBRARIES_HERE)/client/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(RM) $@.tmp $(basename $@).debuginfo
-	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
-	$(RM) $(basename $@).debuginfo
-	$(MV) $@.tmp $@
-endif
-
-$(BASE_INSTALL_LIBRARIES_HERE)/minimal/%$(SHARED_LIBRARY_SUFFIX): $(BASE_INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-  $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.debuginfo: $(BASE_INSTALL_LIBRARIES_HERE)/%.debuginfo
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(LN) -s ../$(@F) $@
-
-  $(BASE_INSTALL_LIBRARIES_HERE)/minimal/%.diz: $(BASE_INSTALL_LIBRARIES_HERE)/%.diz
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(RM) $@.tmp $(basename $@).debuginfo
-	$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
-	$(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo
-	$(RM) $(basename $@).debuginfo
-	$(MV) $@.tmp $@
-endif
-
-################################################################################
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_BIN, \
-      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
-      DEST := $(JDK_OUTPUTDIR)/bin, \
-      FILES := $(filter-out %.lib, $(BASE_TARGETS))))
-
-  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS_LIB, \
-      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
-      DEST := $(JDK_OUTPUTDIR)/lib, \
-      FILES := $(filter %.lib, $(BASE_TARGETS))))
-
-else
-  $(eval $(call SetupCopyFiles,BASE_COPY_LIBS, \
-      SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
-      DEST := $(JDK_OUTPUTDIR)/lib, \
-      FILES := $(BASE_TARGETS)))
-endif
-
-################################################################################
-
-all: $(BASE_TARGETS) $(BASE_COPY_LIBS_BIN) $(BASE_COPY_LIBS_LIB) \
-    $(BASE_COPY_LIBS)
-
-.PHONY: default all
--- a/make/ModuleTools.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/ModuleTools.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, 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
@@ -26,18 +26,14 @@
 include $(SPEC)
 include MakeBase.gmk
 include JavaCompilation.gmk
-include SetupJavaCompilers.gmk
 
 TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
 
-$(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
-    SETUP := GENERATE_USINGJDKBYTECODE, \
-    SRC := $(JDK_TOPDIR)/make/src/classes, \
-    INCLUDES := build/tools/deps \
-                build/tools/jigsaw, \
-    BIN := $(TOOLS_CLASSES_DIR), \
-    ADD_JAVAC_FLAGS := --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED ))
-
+# To avoid reevaluating the compilation setup for the tools each time this file
+# is included, the actual compilation is handled by CompileModuleTools.gmk. The
+# following trick is used to be able to declare a dependency on the built tools.
+BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
+    BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR))
 
 TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
     build.tools.jigsaw.GenGraphs
@@ -45,3 +41,8 @@
 TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
     --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
     build.tools.jigsaw.ModuleSummary
+
+TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \
+    -cp $(TOOLS_CLASSES_DIR) \
+    --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
+    build.tools.jigsaw.AddPackagesAttribute
--- a/make/Tools.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/Tools.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/data/fontconfig/solaris.fontconfig.properties	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/fontconfig/solaris.fontconfig.properties	Thu Oct 13 09:02:13 2016 -0700
@@ -1,6 +1,6 @@
 #
-# 
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2005, 2016, 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
@@ -30,602 +30,489 @@
 
 # Component Font Mappings
 
-allfonts.chinese-gb2312=-monotype-song-medium-r-normal--*-%d-*-*-m-*-gb2312.1980-0
-allfonts.chinese-gbk=-sun-song-medium-r-normal--*-%d-*-*-c-*-gbk-0
-allfonts.chinese-gb18030-0=-fangzheng-song-medium-r-normal--*-%d-*-*-m-*-gb18030.2000-0
-allfonts.chinese-gb18030-1=-fangzheng-song-medium-r-normal--*-%d-*-*-m-*-gb18030.2000-1
-allfonts.chinese-cns11643-1=-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-1
-allfonts.chinese-cns11643-2=-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-2
-allfonts.chinese-cns11643-3=-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-3
-allfonts.chinese-big5=-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1
-allfonts.chinese-hkscs=-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-hkscs-1
-allfonts.dingbats=-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
-allfonts.japanese-x0212=-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0
-allfonts.korean=-hanyang-kodig-medium-r-normal--*-%d-*-*-m-*-ksc5601.1987-0
-allfonts.korean-johab=-hanyang-kodig-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3
+allfonts.chinese-gb2312=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-gbk=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-gb18030-0=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-gb18030-1=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-cns11643-1=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-cns11643-2=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-cns11643-3=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-big5=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.chinese-hkscs=-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.dingbats=-microsoft-wingdings-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific
+allfonts.japanese-x0212=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.korean=-hanyang-gothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+allfonts.korean-johab=-hanyang-gothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
 allfonts.lucida=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
-allfonts.symbol=-*-symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific
+allfonts.symbol=-monotype-symbol-medium-r-normal--*-%d-*-*-p-*-adobe-symbol
+allfonts.bengali=-misc-lohit bengali-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.gujarati=-misc-lohit gujarati-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.hindi=-misc-lohit hindi-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.kannada=-misc-lohit kannada-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.malayalam=-misc-lohit malayalam-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.marathi=-misc-lohit marathi-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.tamil=-misc-lohit tamil-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.telugu=-misc-lohit telugu-medium-r-normal--0-0-0-0-p-0-iso10646-1
+allfonts.dejavusans=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso10646-1
 
-serif.plain.arabic=-monotype-naskh-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-serif.plain.cyrillic-iso8859-5=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5
-serif.plain.cyrillic-cp1251=-monotype-times-regular-r-normal--*-%d-*-*-p-*-ansi-1251
-serif.plain.cyrillic-koi8-r=-monotype-times-regular-r-normal--*-%d-*-*-p-*-koi8-r
-serif.plain.greek=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-7
-serif.plain.hebrew=-monotype-timesnewroman-medium-r-normal--*-%d-*-*-p-*-iso8859-8
-serif.plain.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-serif.plain.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-serif.plain.latin-1=-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1
-serif.plain.latin-2=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-2
-serif.plain.latin-5=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9
-serif.plain.latin-7=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-13
-serif.plain.latin-9=-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15
-serif.plain.thai=-monotype-angsa-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0
+serif.plain.arabic=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.cyrillic-iso8859-5=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.cyrillic-cp1251=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.cyrillic-koi8-r=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.greek=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.hebrew=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.plain.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.plain.latin-1=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.latin-2=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.latin-5=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.latin-7=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.latin-9=-monotype-times new roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.plain.thai=-monotype-angsana new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
 
-serif.bold.arabic=-monotype-naskh-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-serif.bold.cyrillic-iso8859-5=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-5
-serif.bold.cyrillic-cp1251=-monotype-times-bold-r-normal--*-%d-*-*-p-*-ansi-1251
-serif.bold.cyrillic-koi8-r=-monotype-times-bold-r-normal--*-%d-*-*-p-*-koi8-r
-serif.bold.greek=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-7
-serif.bold.hebrew=-monotype-timesnewroman-bold-r-normal-bold-*-%d-*-*-p-*-iso8859-8
-serif.bold.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-serif.bold.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-serif.bold.latin-1=-monotype-times new roman-bold-r---*-%d-*-*-p-*-iso8859-1
-serif.bold.latin-2=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-2
-serif.bold.latin-5=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-9
-serif.bold.latin-7=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-13
-serif.bold.latin-9=-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-15
-serif.bold.thai=-monotype-angsab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0
+serif.bold.arabic=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.cyrillic-iso8859-5=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.cyrillic-cp1251=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.cyrillic-koi8-r=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.greek=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.hebrew=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.bold.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.bold.latin-1=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.latin-2=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.latin-5=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.latin-7=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.latin-9=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bold.thai=-monotype-angsana new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
 
-serif.italic.arabic=-monotype-naskh-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-serif.italic.cyrillic-iso8859-5=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-5
-serif.italic.cyrillic-cp1251=-monotype-times-regular-i-normal--*-%d-*-*-p-*-ansi-1251
-serif.italic.cyrillic-koi8-r=-monotype-times-regular-i-normal--*-%d-*-*-p-*-koi8-r
-serif.italic.greek=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-7
-serif.italic.hebrew=-monotype-timesnewroman-medium-i-normal-italic-*-%d-*-*-p-*-iso8859-8
-serif.italic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-serif.italic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-serif.italic.latin-1=-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1
-serif.italic.latin-2=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-2
-serif.italic.latin-5=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-9
-serif.italic.latin-7=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-13
-serif.italic.latin-9=-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-15
-serif.italic.thai=-monotype-angsai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0
+serif.italic.arabic=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.cyrillic-iso8859-5=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.cyrillic-cp1251=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.cyrillic-koi8-r=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.greek=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.hebrew=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.italic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.italic.latin-1=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.latin-2=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.latin-5=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.latin-7=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.latin-9=-monotype-times new roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.italic.thai=-monotype-angsana new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
 
-serif.bolditalic.arabic=-monotype-naskh-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-serif.bolditalic.cyrillic-iso8859-5=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-5
-serif.bolditalic.cyrillic-cp1251=-monotype-times-bold-i-normal--*-%d-*-*-p-*-ansi-1251
-serif.bolditalic.cyrillic-koi8-r=-monotype-times-bold-i-normal--*-%d-*-*-p-*-koi8-r
-serif.bolditalic.greek=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-7
-serif.bolditalic.hebrew=-monotype-timesnewroman-bold-i-normal-bolditalic-*-%d-*-*-p-*-iso8859-8
-serif.bolditalic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-serif.bolditalic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-serif.bolditalic.latin-1=-monotype-times new roman-bold-i---*-%d-*-*-p-*-iso8859-1
-serif.bolditalic.latin-2=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-2
-serif.bolditalic.latin-5=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-9
-serif.bolditalic.latin-7=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-13
-serif.bolditalic.latin-9=-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-15
-serif.bolditalic.thai=-monotype-angsaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0
+serif.bolditalic.arabic=-monotype-times new roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.cyrillic-iso8859-5=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.cyrillic-cp1251=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.cyrillic-koi8-r=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.greek=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.hebrew=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.bolditalic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+serif.bolditalic.latin-1=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.latin-2=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.latin-5=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.latin-7=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.latin-9=-monotype-times new roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+serif.bolditalic.thai=-monotype-angsana new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
 
-sansserif.plain.arabic=-monotype-naskh-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-sansserif.plain.cyrillic-iso8859-5=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-5
-sansserif.plain.cyrillic-cp1251=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-ansi-1251
-sansserif.plain.cyrillic-koi8-r=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-koi8-r
-sansserif.plain.greek=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-7
-sansserif.plain.hebrew=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso8859-8
-sansserif.plain.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-sansserif.plain.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-sansserif.plain.latin-1=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1
-sansserif.plain.latin-2=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-2
-sansserif.plain.latin-5=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-9
-sansserif.plain.latin-7=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-13
-sansserif.plain.latin-9=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-15
-sansserif.plain.thai=-monotype-browa-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0
+sansserif.plain.arabic=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.cyrillic-iso8859-5=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.cyrillic-cp1251=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.cyrillic-koi8-r=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.greek=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.hebrew=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.plain.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.plain.latin-1=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.latin-2=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.latin-5=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.latin-7=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.latin-9=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.plain.thai=-monotype-browallia new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
 
-sansserif.bold.arabic=-monotype-naskh-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-sansserif.bold.cyrillic-iso8859-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-5
-sansserif.bold.cyrillic-cp1251=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-ansi-1251
-sansserif.bold.cyrillic-koi8-r=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-koi8-r
-sansserif.bold.greek=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-7
-sansserif.bold.hebrew=-monotype-arial-bold-r-normal-Bold-*-%d-*-*-p-*-iso8859-8
-sansserif.bold.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-sansserif.bold.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-sansserif.bold.latin-1=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1
-sansserif.bold.latin-2=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-2
-sansserif.bold.latin-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-9
-sansserif.bold.latin-7=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-13
-sansserif.bold.latin-9=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-15
-sansserif.bold.thai=-monotype-browab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0
+sansserif.bold.arabic=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.cyrillic-iso8859-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.cyrillic-cp1251=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.cyrillic-koi8-r=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.greek=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.hebrew=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.bold.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.bold.latin-1=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.latin-2=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.latin-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.latin-7=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.latin-9=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bold.thai=-monotype-browallia new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
 
-sansserif.italic.arabic=-monotype-naskh-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-sansserif.italic.cyrillic-iso8859-5=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-5
-sansserif.italic.cyrillic-cp1251=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-ansi-1251
-sansserif.italic.cyrillic-koi8-r=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-koi8-r
-sansserif.italic.greek=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-7
-sansserif.italic.hebrew=-monotype-arial-medium-i-normal-Italic-*-%d-*-*-p-*-iso8859-8
-sansserif.italic.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-sansserif.italic.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-sansserif.italic.latin-1=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1
-sansserif.italic.latin-2=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-2
-sansserif.italic.latin-5=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-9
-sansserif.italic.latin-7=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-13
-sansserif.italic.latin-9=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-15
-sansserif.italic.thai=-monotype-browai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0
+sansserif.italic.arabic=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.cyrillic-iso8859-5=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.cyrillic-cp1251=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.cyrillic-koi8-r=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.greek=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.hebrew=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.italic.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.italic.latin-1=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.latin-2=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.latin-5=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.latin-7=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.latin-9=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.italic.thai=-monotype-browallia new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
 
-sansserif.bolditalic.arabic=-monotype-naskh-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-sansserif.bolditalic.cyrillic-iso8859-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-5
-sansserif.bolditalic.cyrillic-cp1251=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-ansi-1251
-sansserif.bolditalic.cyrillic-koi8-r=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-koi8-r
-sansserif.bolditalic.greek=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-7
-sansserif.bolditalic.hebrew=-monotype-arial-bold-i-normal-BoldItalic-*-%d-*-*-p-*-iso8859-8
-sansserif.bolditalic.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-sansserif.bolditalic.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-sansserif.bolditalic.latin-1=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1
-sansserif.bolditalic.latin-2=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-2
-sansserif.bolditalic.latin-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-9
-sansserif.bolditalic.latin-7=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-13
-sansserif.bolditalic.latin-9=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-15
-sansserif.bolditalic.thai=-monotype-browaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0
+sansserif.bolditalic.arabic=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.cyrillic-iso8859-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.cyrillic-cp1251=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.cyrillic-koi8-r=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.greek=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.hebrew=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.bolditalic.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+sansserif.bolditalic.latin-1=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.latin-2=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.latin-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.latin-7=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.latin-9=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+sansserif.bolditalic.thai=-monotype-browallia new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
 
-monospaced.plain.arabic=-monotype-akhbar-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-monospaced.plain.cyrillic-iso8859-5=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-5
-monospaced.plain.cyrillic-cp1251=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-ansi-1251
-monospaced.plain.cyrillic-koi8-r=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-koi8-r
-monospaced.plain.greek=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-7
-monospaced.plain.hebrew=-monotype-couriernew-medium-r-normal--*-%d-*-*-m-*-iso8859-8
-monospaced.plain.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-monospaced.plain.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-monospaced.plain.latin-1=-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1
-monospaced.plain.latin-2=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-2
-monospaced.plain.latin-5=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-9
-monospaced.plain.latin-7=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-13
-monospaced.plain.latin-9=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-15
-monospaced.plain.thai=-monotype-cordia-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0
+monospaced.plain.arabic=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.cyrillic-iso8859-5=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.cyrillic-cp1251=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.cyrillic-koi8-r=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.greek=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.hebrew=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.plain.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.plain.latin-1=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.latin-2=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.latin-5=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.latin-7=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.latin-9=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.plain.thai=-monotype-cordia new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
 
-monospaced.bold.arabic=-monotype-akhbar-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-monospaced.bold.cyrillic-iso8859-5=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-5
-monospaced.bold.cyrillic-cp1251=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-ansi-1251
-monospaced.bold.cyrillic-koi8-r=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-koi8-r
-monospaced.bold.greek=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-7
-monospaced.bold.hebrew=-monotype-couriernew-bold-r-normal-Bold-*-%d-*-*-m-*-iso8859-8
-monospaced.bold.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-monospaced.bold.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-monospaced.bold.latin-1=-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1
-monospaced.bold.latin-2=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-2
-monospaced.bold.latin-5=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-9
-monospaced.bold.latin-7=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-13
-monospaced.bold.latin-9=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-15
-monospaced.bold.thai=-monotype-cordiab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0
+monospaced.bold.arabic=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.cyrillic-iso8859-5=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.cyrillic-cp1251=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.cyrillic-koi8-r=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.greek=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.hebrew=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.bold.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.bold.latin-1=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.latin-2=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.latin-5=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.latin-7=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.latin-9=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bold.thai=-monotype-cordia new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
 
-monospaced.italic.arabic=-monotype-akhbar-medium-r-normal--*-%d-*-*-p-*-iso8859-6
-monospaced.italic.cyrillic-iso8859-5=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-5
-monospaced.italic.cyrillic-cp1251=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-ansi-1251
-monospaced.italic.cyrillic-koi8-r=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-koi8-r
-monospaced.italic.greek=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-7
-monospaced.italic.hebrew=-monotype-couriernew-medium-i-normal-Italic-*-%d-*-*-m-*-iso8859-8
-monospaced.italic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-monospaced.italic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-monospaced.italic.latin-1=-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1
-monospaced.italic.latin-2=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-2
-monospaced.italic.latin-5=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-9
-monospaced.italic.latin-7=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-13
-monospaced.italic.latin-9=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-15
-monospaced.italic.thai=-monotype-cordiai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0
+monospaced.italic.arabic=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.cyrillic-iso8859-5=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.cyrillic-cp1251=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.cyrillic-koi8-r=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.greek=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.hebrew=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.italic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.italic.latin-1=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.latin-2=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.latin-5=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.latin-7=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.latin-9=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.italic.thai=-monotype-cordia new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
 
-monospaced.bolditalic.arabic=-monotype-akhbar-bold-r-normal--*-%d-*-*-p-*-iso8859-6
-monospaced.bolditalic.cyrillic-iso8859-5=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-5
-monospaced.bolditalic.cyrillic-cp1251=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-ansi-1251
-monospaced.bolditalic.cyrillic-koi8-r=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-koi8-r
-monospaced.bolditalic.greek=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-7
-monospaced.bolditalic.hebrew=-monotype-couriernew-bold-i-normal-BoldItalic-*-%d-*-*-m-*-iso8859-8
-monospaced.bolditalic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-monospaced.bolditalic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-monospaced.bolditalic.latin-1=-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1
-monospaced.bolditalic.latin-2=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-2
-monospaced.bolditalic.latin-5=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-9
-monospaced.bolditalic.latin-7=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-13
-monospaced.bolditalic.latin-9=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-15
-monospaced.bolditalic.thai=-monotype-cordiaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0
+monospaced.bolditalic.arabic=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.cyrillic-iso8859-5=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.cyrillic-cp1251=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.cyrillic-koi8-r=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.greek=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.hebrew=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.bolditalic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+monospaced.bolditalic.latin-1=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.latin-2=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.latin-5=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.latin-7=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.latin-9=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+monospaced.bolditalic.thai=-monotype-cordia new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
 
-dialog.plain.arabic=-monotype-shayyal-medium-r-normal--*-%d-*-*-m-*-iso8859-6
-dialog.plain.cyrillic-iso8859-5=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-5
-dialog.plain.cyrillic-cp1251=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-ansi-1251
-dialog.plain.cyrillic-koi8-r=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-koi8-r
-dialog.plain.greek=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-7
-dialog.plain.hebrew=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso8859-8
-dialog.plain.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialog.plain.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-dialog.plain.latin-1=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1
-dialog.plain.latin-2=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-2
-dialog.plain.latin-5=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-9
-dialog.plain.latin-7=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-13
-dialog.plain.latin-9=-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-15
-dialog.plain.thai=-monotype-browa-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0
+dialog.plain.arabic=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.cyrillic-iso8859-5=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.cyrillic-cp1251=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.cyrillic-koi8-r=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.greek=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.hebrew=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.plain.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.plain.latin-1=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.latin-2=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.latin-5=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.latin-7=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.latin-9=-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.plain.thai=-monotype-browallia new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
 
-dialog.bold.arabic=-monotype-shayyal-bold-r-normal--*-%d-*-*-m-*-iso8859-6
-dialog.bold.cyrillic-iso8859-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-5
-dialog.bold.cyrillic-cp1251=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-ansi-1251
-dialog.bold.cyrillic-koi8-r=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-koi8-r
-dialog.bold.greek=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-7
-dialog.bold.hebrew=-monotype-arial-bold-r-normal-Bold-*-%d-*-*-p-*-iso8859-8
-dialog.bold.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialog.bold.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-dialog.bold.latin-1=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1
-dialog.bold.latin-2=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-2
-dialog.bold.latin-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-9
-dialog.bold.latin-7=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-13
-dialog.bold.latin-9=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-15
-dialog.bold.thai=-monotype-browab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0
+dialog.bold.arabic=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.cyrillic-iso8859-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.cyrillic-cp1251=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.cyrillic-koi8-r=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.greek=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.hebrew=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.bold.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.bold.latin-1=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.latin-2=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.latin-5=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.latin-7=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.latin-9=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bold.thai=-monotype-browallia new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
 
-dialog.italic.arabic=-monotype-shayyal-medium-r-normal--*-%d-*-*-m-*-iso8859-6
-dialog.italic.cyrillic-iso8859-5=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-5
-dialog.italic.cyrillic-cp1251=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-ansi-1251
-dialog.italic.cyrillic-koi8-r=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-koi8-r
-dialog.italic.greek=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-7
-dialog.italic.hebrew=-monotype-arial-medium-i-normal-Italic-*-%d-*-*-p-*-iso8859-8
-dialog.italic.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialog.italic.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-dialog.italic.latin-1=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1
-dialog.italic.latin-2=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-2
-dialog.italic.latin-5=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-9
-dialog.italic.latin-7=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-13
-dialog.italic.latin-9=-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-15
-dialog.italic.thai=-monotype-browai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0
+dialog.italic.arabic=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.cyrillic-iso8859-5=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.cyrillic-cp1251=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.cyrillic-koi8-r=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.greek=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.hebrew=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.italic.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.italic.latin-1=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.latin-2=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.latin-5=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.latin-7=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.latin-9=-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.italic.thai=-monotype-browallia new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
 
-dialog.bolditalic.arabic=-monotype-shayyal-bold-r-normal--*-%d-*-*-m-*-iso8859-6
-dialog.bolditalic.cyrillic-iso8859-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-5
-dialog.bolditalic.cyrillic-cp1251=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-ansi-1251
-dialog.bolditalic.cyrillic-koi8-r=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-koi8-r
-dialog.bolditalic.greek=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-7
-dialog.bolditalic.hebrew=-monotype-arial-bold-i-normal-BoldItalic-*-%d-*-*-p-*-iso8859-8
-dialog.bolditalic.japanese-x0201=-ricoh-hg gothic b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialog.bolditalic.japanese-x0208=-ricoh-hg gothic b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0
-dialog.bolditalic.latin-1=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1
-dialog.bolditalic.latin-2=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-2
-dialog.bolditalic.latin-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-9
-dialog.bolditalic.latin-7=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-13
-dialog.bolditalic.latin-9=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-15
-dialog.bolditalic.thai=-monotype-browaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0
+dialog.bolditalic.arabic=-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.cyrillic-iso8859-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.cyrillic-cp1251=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.cyrillic-koi8-r=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.greek=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.hebrew=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.japanese-x0201=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.bolditalic.japanese-x0208=-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialog.bolditalic.latin-1=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.latin-2=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.latin-5=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.latin-7=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.latin-9=-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialog.bolditalic.thai=-monotype-browallia new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
 
-dialoginput.plain.arabic=-monotype-shayyal-medium-r-normal--*-%d-*-*-m-*-iso8859-6
-dialoginput.plain.cyrillic-iso8859-5=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-5
-dialoginput.plain.cyrillic-cp1251=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-ansi-1251
-dialoginput.plain.cyrillic-koi8-r=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-koi8-r
-dialoginput.plain.greek=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-7
-dialoginput.plain.hebrew=-monotype-couriernew-medium-r-normal--*-%d-*-*-m-*-iso8859-8
-dialoginput.plain.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialoginput.plain.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-dialoginput.plain.latin-1=-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1
-dialoginput.plain.latin-2=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-2
-dialoginput.plain.latin-5=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-9
-dialoginput.plain.latin-7=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-13
-dialoginput.plain.latin-9=-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-15
-dialoginput.plain.thai=-monotype-cordia-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0
+dialoginput.plain.arabic=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.cyrillic-iso8859-5=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.cyrillic-cp1251=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.cyrillic-koi8-r=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.greek=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.hebrew=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.plain.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.plain.latin-1=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.latin-2=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.latin-5=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.latin-7=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.latin-9=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.plain.thai=-monotype-cordia new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
 
-dialoginput.bold.arabic=-monotype-shayyal-bold-r-normal--*-%d-*-*-m-*-iso8859-6
-dialoginput.bold.cyrillic-iso8859-5=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-5
-dialoginput.bold.cyrillic-cp1251=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-ansi-1251
-dialoginput.bold.cyrillic-koi8-r=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-koi8-r
-dialoginput.bold.greek=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-7
-dialoginput.bold.hebrew=-monotype-couriernew-bold-r-normal-Bold-*-%d-*-*-m-*-iso8859-8
-dialoginput.bold.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialoginput.bold.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-dialoginput.bold.latin-1=-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1
-dialoginput.bold.latin-2=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-2
-dialoginput.bold.latin-5=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-9
-dialoginput.bold.latin-7=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-13
-dialoginput.bold.latin-9=-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-15
-dialoginput.bold.thai=-monotype-cordiab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0
+dialoginput.bold.arabic=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.cyrillic-iso8859-5=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.cyrillic-cp1251=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.cyrillic-koi8-r=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.greek=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.hebrew=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.bold.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.bold.latin-1=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.latin-2=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.latin-5=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.latin-7=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.latin-9=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bold.thai=-monotype-cordia new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
 
-dialoginput.italic.arabic=-monotype-shayyal-medium-r-normal--*-%d-*-*-m-*-iso8859-6
-dialoginput.italic.cyrillic-iso8859-5=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-5
-dialoginput.italic.cyrillic-cp1251=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-ansi-1251
-dialoginput.italic.cyrillic-koi8-r=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-koi8-r
-dialoginput.italic.greek=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-7
-dialoginput.italic.hebrew=-monotype-couriernew-medium-i-normal-Italic-*-%d-*-*-m-*-iso8859-8
-dialoginput.italic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialoginput.italic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-dialoginput.italic.latin-1=-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1
-dialoginput.italic.latin-2=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-2
-dialoginput.italic.latin-5=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-9
-dialoginput.italic.latin-7=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-13
-dialoginput.italic.latin-9=-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-15
-dialoginput.italic.thai=-monotype-cordiai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0
+dialoginput.italic.arabic=-monotype-courier new-medium-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.cyrillic-iso8859-5=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.cyrillic-cp1251=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.cyrillic-koi8-r=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.greek=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.hebrew=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.italic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.italic.latin-1=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.latin-2=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.latin-5=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.latin-7=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.latin-9=-monotype-courier new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.italic.thai=-monotype-cordia new-medium-i-normal--*-%d-*-*-p-*-iso10646-1
 
-dialoginput.bolditalic.arabic=-monotype-shayyal-bold-r-normal--*-%d-*-*-m-*-iso8859-6
-dialoginput.bolditalic.cyrillic-iso8859-5=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-5
-dialoginput.bolditalic.cyrillic-cp1251=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-ansi-1251
-dialoginput.bolditalic.cyrillic-koi8-r=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-koi8-r
-dialoginput.bolditalic.greek=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-7
-dialoginput.bolditalic.hebrew=-monotype-couriernew-bold-i-normal-BoldItalic-*-%d-*-*-m-*-iso8859-8
-dialoginput.bolditalic.japanese-x0201=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0
-dialoginput.bolditalic.japanese-x0208=-ricoh-hg mincho l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0
-dialoginput.bolditalic.latin-1=-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1
-dialoginput.bolditalic.latin-2=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-2
-dialoginput.bolditalic.latin-5=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-9
-dialoginput.bolditalic.latin-7=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-13
-dialoginput.bolditalic.latin-9=-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-15
-dialoginput.bolditalic.thai=-monotype-cordiaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0
+dialoginput.bolditalic.arabic=-monotype-courier new-bold-r-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.cyrillic-iso8859-5=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.cyrillic-cp1251=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.cyrillic-koi8-r=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.greek=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.hebrew=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.japanese-x0201=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.bolditalic.japanese-x0208=-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1
+dialoginput.bolditalic.latin-1=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.latin-2=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.latin-5=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.latin-7=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.latin-9=-monotype-courier new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
+dialoginput.bolditalic.thai=-monotype-cordia new-bold-i-normal--*-%d-*-*-p-*-iso10646-1
 
 # Search Sequences
 
-sequence.allfonts=latin-1,dingbats,symbol
+sequence.allfonts=latin-1
 
-sequence.allfonts.Big5=latin-1,chinese-big5,dingbats,symbol
+sequence.allfonts.Big5=latin-1,chinese-big5
 
-sequence.allfonts.Big5-HKSCS-2001=latin-1,chinese-big5,chinese-hkscs,dingbats,symbol
+sequence.allfonts.Big5-HKSCS-2001=latin-1,chinese-big5,chinese-hkscs
 
-sequence.allfonts.windows-1251=cyrillic-cp1251,latin-1,dingbats,symbol
+sequence.allfonts.windows-1251=cyrillic-cp1251,latin-1
 
-sequence.allfonts.GB2312=latin-1,chinese-gbk,chinese-gb2312,dingbats,symbol
+sequence.allfonts.GB2312=latin-1,chinese-gb2312
 
-sequence.allfonts.x-eucJP-Open=latin-1,japanese-x0201,japanese-x0208,japanese-x0212,dingbats,symbol
+sequence.allfonts.x-eucJP-Open=latin-1,japanese-x0201,japanese-x0208,japanese-x0212
 
-sequence.allfonts.EUC-KR=latin-1,korean,dingbats,symbol
+sequence.allfonts.EUC-KR=latin-1,korean
 
-sequence.allfonts.x-EUC-TW=latin-1,chinese-cns11643-1,chinese-cns11643-2,chinese-cns11643-3,dingbats,symbol
+sequence.allfonts.x-EUC-TW=latin-1,chinese-cns11643-1,chinese-cns11643-2,chinese-cns11643-3
 
-sequence.allfonts.GBK=latin-1,chinese-gbk,dingbats,symbol
+sequence.allfonts.GBK=latin-1,chinese-gbk
 
-sequence.allfonts.GB18030=latin-1,chinese-gb18030-0,chinese-gb18030-1,dingbats,symbol
+sequence.allfonts.GB18030=latin-1,chinese-gb18030-0,chinese-gb18030-1
 
-sequence.allfonts.ISO-8859-2=latin-2,latin-1,dingbats,symbol
+sequence.allfonts.ISO-8859-2=latin-2,latin-1
 
-sequence.allfonts.ISO-8859-5=cyrillic-iso8859-5,latin-1,dingbats,symbol
+sequence.allfonts.ISO-8859-5=cyrillic-iso8859-5,latin-1
 
-sequence.allfonts.ISO-8859-6=arabic,latin-1,dingbats,symbol
+sequence.allfonts.ISO-8859-6=arabic,latin-1
 
-sequence.allfonts.ISO-8859-7=latin-1,greek,dingbats,symbol
+sequence.allfonts.ISO-8859-7=latin-1,greek
 
-sequence.allfonts.ISO-8859-8=latin-1,hebrew,dingbats,symbol
+sequence.allfonts.ISO-8859-8=latin-1,hebrew
 
-sequence.allfonts.ISO-8859-9=latin-5,latin-1,dingbats,symbol
+sequence.allfonts.ISO-8859-9=latin-5,latin-1
 
-sequence.allfonts.ISO-8859-13=latin-7,latin-1,dingbats,symbol
+sequence.allfonts.ISO-8859-13=latin-7,latin-1
 
-sequence.allfonts.ISO-8859-15=latin-9,dingbats,symbol
+sequence.allfonts.ISO-8859-15=latin-9
 
-sequence.allfonts.KOI8-R=cyrillic-koi8-r,latin-1,dingbats,symbol
+sequence.allfonts.KOI8-R=cyrillic-koi8-r,latin-1
 
-sequence.allfonts.x-PCK=latin-1,japanese-x0201,japanese-x0208,japanese-x0212,dingbats,symbol
+sequence.allfonts.x-PCK=latin-1,japanese-x0201,japanese-x0208,japanese-x0212
 
-sequence.allfonts.TIS-620=latin-1,thai,dingbats,symbol
+sequence.allfonts.TIS-620=latin-1,thai
 
-sequence.allfonts.UTF-8=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        japanese-x0201,japanese-x0208,japanese-x0212,korean-johab,\
-        chinese-gb2312,chinese-big5,dingbats,symbol
+sequence.allfonts.UTF-8=latin-1
+sequence.allfonts.UTF-8.en=latin-1
+sequence.allfonts.UTF-8.hi=latin-1,hindi
+sequence.allfonts.UTF-8.be=latin-1,bengali
+sequence.allfonts.UTF-8.te=latin-1,telugu
+sequence.allfonts.UTF-8.mr=latin-1,marathi
+sequence.allfonts.UTF-8.ta=latin-1,tamil
+sequence.allfonts.UTF-8.gu=latin-1,gujarati
+sequence.allfonts.UTF-8.kn=latin-1,kannada
+sequence.allfonts.UTF-8.ma=latin-1,malayalam
 
-sequence.allfonts.UTF-8.hi=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        japanese-x0201,japanese-x0208,japanese-x0212,korean-johab,\
-        chinese-gb2312,chinese-big5,thai,dingbats,symbol
+sequence.allfonts.UTF-8.ko=latin-1,korean-johab,japanese-x0201,japanese-x0208,japanese-x0212
 
-sequence.allfonts.UTF-8.ko=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        korean-johab,japanese-x0201,japanese-x0208,japanese-x0212,\
-        chinese-gb2312,chinese-big5,dingbats,symbol
+sequence.allfonts.UTF-8.th=latin-1,thai
 
-sequence.allfonts.UTF-8.th=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        thai,chinese-gb2312,chinese-big5,japanese-x0201,japanese-x0208,japanese-x0212,\
-        korean-johab,dingbats,symbol
+sequence.allfonts.UTF-8.zh.CN=latin-1,chinese-gb18030-0,chinese-gb18030-1,chinese-big5,chinese-hkscs
 
-sequence.allfonts.UTF-8.zh.CN=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        chinese-gb18030-0,chinese-gb18030-1,chinese-big5,chinese-hkscs,\
-        japanese-x0201,japanese-x0208,japanese-x0212,korean-johab,thai,dingbats,symbol
+sequence.allfonts.UTF-8.zh.HK=latin-1,chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1
 
-sequence.allfonts.UTF-8.zh.HK=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1,\
-        japanese-x0201,japanese-x0208,japanese-x0212,korean-johab,thai,dingbats,symbol
-
-sequence.allfonts.UTF-8.zh.TW=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
-        chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1,\
-        japanese-x0201,japanese-x0208,japanese-x0212,korean-johab,thai,dingbats,symbol
+sequence.allfonts.UTF-8.zh.TW=latin-1,chinese-big5,chinese-hkscs,chinese-gb18030-0,chinese-gb18030-1
 
 # the fallback sequence omits the following character subsets:
-# - latin-1, latin-2, latin-5, latin-7, latin-9: characters covered by lucida
-# - cyrillic-cp1251, cyrillic-iso8859-5, cyrillic-koi8-r: characters covered by lucida
-# - arabic, devanagari, greek, hebrew, thai: characters covered by lucida
-# - chinese-cns11643-1, chinese-cns11643-2, chinese-cns11643-3, chinese-hkscs: same file as chinese-big5
-# - chinese-gbk, chinese-gb18030-1: same file as chinese-gb18030-0
+# - chinese: all same file : just use chinese-gb18030-0
 # - japanese-x0208: same files as japanese-x0201
 # - japanese-x0212: same files as japanese-x0201
 # - korean: same file as korean-johab
-# - dingbats, symbol: included in all core sequences
-sequence.fallback=lucida,\
-        chinese-big5,chinese-gb2312,chinese-gb18030-0,\
-        japanese-x0201,korean-johab
-
-# Exclusion Ranges
-
-exclusion.chinese-cns11643-2=0390-03d6,2200-22ef,2701-27be
-exclusion.chinese-cns11643-3=0390-03d6,2200-22ef,2701-27be
+sequence.fallback=latin-1,latin-2,latin-7,cyrillic-iso8859-5,greek,latin-5,latin-9,\
+        arabic,hebrew,thai,lucida,\
+        chinese-gb18030-0,\
+        japanese-x0201,korean-johab,\
+        hindi,bengali,telugu,marathi,tamil,gujarati,kannada,malayalam,\
+        dejavusans,dingbats,symbol
 
 # Font File Names
 
-filename.-*-symbol-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific=/usr/openwin/lib/X11/fonts/TrueType/Symbol.ttf
+filename.-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/arial.ttf
+filename.-monotype-arial-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/ariali.ttf
+filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/arialb.ttf
+filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/arialbi.ttf
+filename.-monotype-courier_new-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/cour.ttf
+filename.-monotype-courier_new-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/couri.ttf
+filename.-monotype-courier_new-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/courb.ttf
+filename.-monotype-courier_new-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/courbi.ttf
+filename.-monotype-times_new_roman-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/times.ttf
+filename.-monotype-times_new_roman-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/timesi.ttf
+filename.-monotype-times_new_roman-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/timesb.ttf
+filename.-monotype-times_new_roman-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/timesbi.ttf
+
+filename.-monotype-angsana_new-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/angsa.ttf
+filename.-monotype-angsana_new-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/angsai.ttf
+filename.-monotype-angsana_new-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/angsab.ttf
+filename.-monotype-angsana_new-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/angsaz.ttf
+filename.-monotype-browallia_new-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/browa.ttf
+filename.-monotype-browallia_new-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/browai.ttf
+filename.-monotype-browallia_new-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/browab.ttf
+filename.-monotype-browallia_new-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/browaz.ttf
+filename.-monotype-cordia_new-medium-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/cordia.ttf
+filename.-monotype-cordia_new-medium-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/cordiai.ttf
+filename.-monotype-cordia_new-bold-r-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/cordiab.ttf
+filename.-monotype-cordia_new-bold-i-normal--*-%d-*-*-p-*-iso10646-1=/usr/share/fonts/TrueType/core/cordiaz.ttf
+
+filename.-misc-ipagothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1=/usr/share/fonts/TrueType/ipafont/ipag.otf
+filename.-misc-ipamincho-medium-r-normal--*-%d-*-*-m-*-iso10646-1=/usr/share/fonts/TrueType/ipafont/ipam.otf
+filename.-hanyang-gothic-medium-r-normal--*-%d-*-*-m-*-iso10646-1=/usr/share/fonts/TrueType/hanyang/h2gtrm.ttf
+filename.-arphic-uming-medium-r-normal--*-%d-*-*-m-*-iso10646-1=/usr/share/fonts/TrueType/arphic/uming.ttf
+filename.-monotype-symbol-medium-r-normal--*-%d-*-*-p-*-adobe-symbol=/usr/share/fonts/TrueType/core/symbol.ttf
+filename.-microsoft-wingdings-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific=/usr/share/fonts/TrueType/core/wingdings.ttf
 filename.-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1=$JRE_LIB_FONTS/LucidaSansRegular.ttf
-filename.-fangzheng-song-medium-r-normal--*-%d-*-*-m-*-gb18030.2000-0=/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType/songti.ttf
-filename.-fangzheng-song-medium-r-normal--*-%d-*-*-m-*-gb18030.2000-1=/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType/songti.ttf
-filename.-hanyang-kodig-medium-r-normal--*-%d-*-*-m-*-ksc5601.1987-0=/usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType/h2gtrm.ttf
-filename.-hanyang-kodig-medium-r-normal--*-%d-*-*-m-*-ksc5601.1992-3=/usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType/h2gtrm.ttf
-filename.-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-big5-1=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT/ming.ttf
-filename.-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-1=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT/ming.ttf
-filename.-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-2=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT/ming.ttf
-filename.-Hanyi-Ming-Medium-r-normal--*-%d-*-*-m-*-cns11643-3=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT/ming.ttf
-filename.-hanyi-ming-medium-r-normal--*-%d-*-*-m-*-hkscs-1=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT/ming.ttf
-filename.-monotype-akhbar-bold-r-normal--*-%d-*-*-p-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/AKHBARBD.ttf
-filename.-monotype-akhbar-medium-r-normal--*-%d-*-*-p-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/AKHBARMT.ttf
-filename.-monotype-angsa-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/angsa.ttf
-filename.-monotype-angsab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/angsab.ttf
-filename.-monotype-angsai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/angsai.ttf
-filename.-monotype-angsaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/angsaz.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/Arial-BoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBoldItalic.ttf
-filename.-monotype-arial-bold-i-normal-BoldItalic-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/arialbih.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/Arial-Bold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-bold-r-normal-Bold-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/arialb_h.ttf
-filename.-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialBold.ttf
-filename.-monotype-arial-medium-i-normal-Italic-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/ariali_h.ttf
-filename.-monotype-arial-medium-r-normal--*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/arial__h.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/Arial-Italic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialItalic.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-arial-regular-r-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/ArialRegular.ttf
-filename.-monotype-browa-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/browa.ttf
-filename.-monotype-browab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/browab.ttf
-filename.-monotype-browai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/browai.ttf
-filename.-monotype-browaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/browaz.ttf
-filename.-monotype-cordia-medium-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/cordia.ttf
-filename.-monotype-cordiab-bold-r-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/cordiab.ttf
-filename.-monotype-cordiai-medium-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/cordiai.ttf
-filename.-monotype-cordiaz-bold-i-normal--*-%d-*-*-m-*-tis620.2533-0=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType/cordiaz.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-i-normal--*-%d-*-*-m-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBoldItalic.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-bold-r-normal--*-%d-*-*-m-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierBold.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-i-normal--*-%d-*-*-m-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierItalic.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier-regular-r-normal--*-%d-*-*-m-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/CourierRegular.ttf
-filename.-monotype-courier_new-bold-i---*-%d-*-*-m-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/CourierNew-BoldItalic.ttf
-filename.-monotype-courier_new-bold-r---*-%d-*-*-m-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/CourierNew-Bold.ttf
-filename.-monotype-courier_new-regular-i---*-%d-*-*-m-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/CourierNew-Italic.ttf
-filename.-monotype-courier_new-regular-r---*-%d-*-*-m-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/CourierNew.ttf
-filename.-monotype-couriernew-bold-i-normal-BoldItalic-*-%d-*-*-m-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/courbi_h.ttf
-filename.-monotype-couriernew-bold-r-normal-Bold-*-%d-*-*-m-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/courb__h.ttf
-filename.-monotype-couriernew-medium-i-normal-Italic-*-%d-*-*-m-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/couri__h.ttf
-filename.-monotype-couriernew-medium-r-normal--*-%d-*-*-m-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/cour___h.ttf
-filename.-monotype-naskh-bold-r-normal--*-%d-*-*-p-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/NASKHBD.ttf
-filename.-monotype-naskh-medium-r-normal--*-%d-*-*-p-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/NASKHMT.ttf
-filename.-monotype-shayyal-bold-r-normal--*-%d-*-*-m-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/SHAYBD.ttf
-filename.-monotype-shayyal-medium-r-normal--*-%d-*-*-m-*-iso8859-6=/usr/openwin/lib/locale/ar/X11/fonts/TrueType/SHAYMT.ttf
-filename.-monotype-song-medium-r-normal--*-%d-*-*-m-*-gb2312.1980-0=/usr/openwin/lib/locale/zh/X11/fonts/TrueType/msgbl.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-i-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBoldItalic.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-bold-r-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesBold.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-i-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesItalic.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-ansi-1251=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-13=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-15=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-2=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-5=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-7=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-iso8859-9=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times-regular-r-normal--*-%d-*-*-p-*-koi8-r=/usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType/TimesRegular.ttf
-filename.-monotype-times_new_roman-bold-i---*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman-BoldItalic.ttf
-filename.-monotype-times_new_roman-bold-r---*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman-Bold.ttf
-filename.-monotype-times_new_roman-regular-i---*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman-Italic.ttf
-filename.-monotype-times_new_roman-regular-r---*-%d-*-*-p-*-iso8859-1=/usr/openwin/lib/X11/fonts/TrueType/TimesNewRoman.ttf
-filename.-monotype-timesnewroman-bold-i-normal-bolditalic-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/timesbih.ttf
-filename.-monotype-timesnewroman-bold-r-normal-bold-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/timesb_h.ttf
-filename.-monotype-timesnewroman-medium-i-normal-italic-*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/timesi_h.ttf
-filename.-monotype-timesnewroman-medium-r-normal--*-%d-*-*-p-*-iso8859-8=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType/times__h.ttf
-filename.-ricoh-heiseimin-w3-r-normal--*-%d-*-*-m-*-jisx0212.1990-0=/usr/openwin/lib/locale/ja/X11/fonts/TT/hgmlsun.ttf
-filename.-ricoh-hg_gothic_b-medium-r-normal-*-*-%d-*-*-m-*-jisx0208.1983-0=/usr/openwin/lib/locale/ja/X11/fonts/TT/hggbsun.ttf
-filename.-ricoh-hg_gothic_b-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0=/usr/openwin/lib/locale/ja/X11/fonts/TT/hggbsun.ttf
-filename.-ricoh-hg_mincho_l-medium-r-normal--*-%d-*-*-m-*-jisx0201.1976-0=/usr/openwin/lib/locale/ja/X11/fonts/TT/hgmlsun.ttf
-filename.-ricoh-hg_mincho_l-medium-r-normal--*-%d-*-*-m-*-jisx0208.1983-0=/usr/openwin/lib/locale/ja/X11/fonts/TT/hgmlsun.ttf
-filename.-sun-song-medium-r-normal--*-%d-*-*-c-*-gbk-0=/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType/songti.ttf
-filename.-urw-itc_zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific=/usr/openwin/lib/X11/fonts/TrueType/MonotypeSorts.ttf
+filename.-misc-lohit_bengali-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Bengali.ttf
+filename.-misc-lohit_gujarati-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Gujarati.ttf
+filename.-misc-lohit_hindi-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Hindi.ttf
+filename.-misc-lohit_kannada-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Kannada.ttf
+filename.-misc-lohit_malayalam-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Malayalam.ttf
+filename.-misc-lohit_marathi-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Marathi.ttf
+filename.-misc-lohit_tamil-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Tamil.ttf
+filename.-misc-lohit_telugu-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/lohit/Lohit-Telugu.ttf
+filename.-misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/TrueType/dejavu/DejaVuSans.ttf
 
 # AWT X11 font paths
-awtfontpath.latin-1=/usr/openwin/lib/X11/fonts/TrueType
-awtfontpath.latin-2=/usr/openwin/lib/locale/iso_8859_2/X11/fonts/TrueType
-awtfontpath.latin-5=/usr/openwin/lib/locale/iso_8859_9/X11/fonts/TrueType
-awtfontpath.latin-7=/usr/openwin/lib/locale/iso_8859_13/X11/fonts/TrueType
-awtfontpath.latin-9=/usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType
-awtfontpath.hebrew=/usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType
-awtfontpath.arabic=/usr/openwin/lib/locale/ar/X11/fonts/TrueType
-awtfontpath.thai=/usr/openwin/lib/locale/th_TH/X11/fonts/TrueType
-awtfontpath.greek=/usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType
-awtfontpath.cyrillic-iso8859-5=/usr/openwin/lib/locale/iso_8859_5/X11/fonts/TrueType
-awtfontpath.cyrillic-cp1251=/usr/openwin/lib/locale/ru.ansi-1251/X11/fonts/TrueType
-awtfontpath.cyrillic-koi8-r=/usr/openwin/lib/locale/KOI8-R/X11/fonts/TrueType
-awtfontpath.korean=/usr/openwin/lib/locale/ko/X11/fonts/TrueType
-awtfontpath.korean-johab=/usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType
-awtfontpath.japanese-x0201=/usr/openwin/lib/locale/ja/X11/fonts/TT
-awtfontpath.japanese-x0208=/usr/openwin/lib/locale/ja/X11/fonts/TT
-awtfontpath.japanese-x0212=/usr/openwin/lib/locale/ja/X11/fonts/TT
-awtfontpath.chinese-gbk=/usr/openwin/lib/locale/zh.GBK/X11/fonts/TrueType
-awtfontpath.chinese-cns11643-1=/usr/openwin/lib/locale/zh_TW/X11/fonts/TrueType
-awtfontpath.chinese-cns11643-2=/usr/openwin/lib/locale/zh_TW/X11/fonts/TrueType
-awtfontpath.chinese-cns11643-3=/usr/openwin/lib/locale/zh_TW/X11/fonts/TrueType
-awtfontpath.chinese-big5=/usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT
-awtfontpath.chinese-gb2312=/usr/openwin/lib/locale/zh/X11/fonts/TrueType
-awtfontpath.chinese-gb18030-0=/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType
-awtfontpath.chinese-gb18030-1=/usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType
-awtfontpath.chinese-hkscs=/usr/openwin/lib/locale/zh_HK.BIG5HK/X11/fonts/TT
+awtfontpath.latin-1=/usr/share/fonts/TrueType/core
+awtfontpath.latin-2=/usr/share/fonts/TrueType/core
+awtfontpath.latin-5=/usr/share/fonts/TrueType/core
+awtfontpath.latin-7=/usr/share/fonts/TrueType/core
+awtfontpath.latin-9=/usr/share/fonts/TrueType/core
+awtfontpath.hebrew=/usr/share/fonts/TrueType/core
+awtfontpath.arabic=/usr/share/fonts/TrueType/core
+awtfontpath.thai=/usr/share/fonts/TrueType/core
+awtfontpath.greek=/usr/share/fonts/TrueType/core
+awtfontpath.cyrillic-iso8859-5=/usr/share/fonts/TrueType/core
+awtfontpath.cyrillic-cp1251=/usr/share/fonts/TrueType/core
+awtfontpath.cyrillic-koi8-r=/usr/share/fonts/TrueType/core
+awtfontpath.korean=/usr/share/fonts/TrueType/hanyang
+awtfontpath.korean-johab=/usr/share/fonts/TrueType/hanyang
+awtfontpath.japanese-x0201=/usr/share/fonts/TrueType/ipafont
+awtfontpath.japanese-x0208=/usr/share/fonts/TrueType/ipafont
+awtfontpath.japanese-x0212=/usr/share/fonts/TrueType/ipafont
+awtfontpath.chinese-gbk=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-cns11643-1=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-cns11643-2=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-cns11643-3=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-big5=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-gb2312=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-gb18030-0=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-gb18030-1=/usr/share/fonts/TrueType/arphic
+awtfontpath.chinese-hkscs=/usr/share/fonts/TrueType/arphic
+awtfontpath.bengali=/usr/share/fonts/TrueType/lohit
+awtfontpath.gujarati=/usr/share/fonts/TrueType/lohit
+awtfontpath.hindi=/usr/share/fonts/TrueType/lohit
+awtfontpath.kannada=/usr/share/fonts/TrueType/lohit
+awtfontpath.malayalam=/usr/share/fonts/TrueType/lohit
+awtfontpath.marathi=/usr/share/fonts/TrueType/lohit
+awtfontpath.tamil=/usr/share/fonts/TrueType/lohit
+awtfontpath.telugu=/usr/share/fonts/TrueType/lohit
+awtfontpath.dejavusans=/usr/share/fonts/TrueType/dejavu
 
 # Appended Font Path
 
-
-
--- a/make/data/tzdata/VERSION	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/VERSION	Thu Oct 13 09:02:13 2016 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2016f
+tzdata2016g
--- a/make/data/tzdata/africa	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/africa	Thu Oct 13 09:02:13 2016 -0700
@@ -487,7 +487,7 @@
 # http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
 #
 # From Paul Eggert (2013-10-25):
-# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2.
+# For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Libya	1951	only	-	Oct	14	2:00	1:00	S
--- a/make/data/tzdata/antarctica	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/antarctica	Thu Oct 13 09:02:13 2016 -0700
@@ -33,9 +33,7 @@
 # http://www.spri.cam.ac.uk/bob/periant.htm
 # for information.
 # Unless otherwise specified, we have no time zone information.
-#
-# Except for the French entries,
-# I made up all time zone abbreviations mentioned here; corrections welcome!
+
 # FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited.
 
 # Argentina - year-round bases
@@ -52,7 +50,7 @@
 #	previously sealers and scientific personnel wintered
 #	Margaret Turner reports
 #	http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
-#	(1999-09-30) that they're UTC+5, with no DST;
+#	(1999-09-30) that they're UT +05, with no DST;
 #	presumably this is when they have visitors.
 #
 # year-round bases
@@ -91,23 +89,22 @@
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Casey	0	-	-00	1969
-			8:00	-	AWST	2009 Oct 18  2:00
-						# Australian Western Std Time
-			11:00	-	CAST	2010 Mar  5  2:00  # Casey Time
-			8:00	-	AWST	2011 Oct 28  2:00
-			11:00	-	CAST	2012 Feb 21 17:00u
-			8:00	-	AWST
+			8:00	-	+08	2009 Oct 18  2:00
+			11:00	-	+11	2010 Mar  5  2:00
+			8:00	-	+08	2011 Oct 28  2:00
+			11:00	-	+11	2012 Feb 21 17:00u
+			8:00	-	+08
 Zone Antarctica/Davis	0	-	-00	1957 Jan 13
-			7:00	-	DAVT	1964 Nov    # Davis Time
+			7:00	-	+07	1964 Nov
 			0	-	-00	1969 Feb
-			7:00	-	DAVT	2009 Oct 18  2:00
-			5:00	-	DAVT	2010 Mar 10 20:00u
-			7:00	-	DAVT	2011 Oct 28  2:00
-			5:00	-	DAVT	2012 Feb 21 20:00u
-			7:00	-	DAVT
+			7:00	-	+07	2009 Oct 18  2:00
+			5:00	-	+05	2010 Mar 10 20:00u
+			7:00	-	+07	2011 Oct 28  2:00
+			5:00	-	+05	2012 Feb 21 20:00u
+			7:00	-	+07
 Zone Antarctica/Mawson	0	-	-00	1954 Feb 13
-			6:00	-	MAWT	2009 Oct 18  2:00 # Mawson Time
-			5:00	-	MAWT
+			6:00	-	+06	2009 Oct 18  2:00
+			5:00	-	+05
 # References:
 # Casey Weather (1998-02-26)
 # http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html
@@ -161,7 +158,7 @@
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Kerguelen	0	-	-00	1950 # Port-aux-Français
-			5:00	-	TFT	# ISO code TF Time
+			5:00	-	+05
 #
 # year-round base in the main continent
 # Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11
@@ -172,9 +169,9 @@
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/DumontDUrville 0 -	-00	1947
-			10:00	-	PMT	1952 Jan 14 # Port-Martin Time
+			10:00	-	+10	1952 Jan 14
 			0	-	-00	1956 Nov
-			10:00	-	DDUT	# Dumont-d'Urville Time
+			10:00	-	+10
 
 # France & Italy - year-round base
 # Concordia, -750600+1232000, since 2005
@@ -200,7 +197,7 @@
 # station of Japan, it's appropriate for the principal location.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Syowa	0	-	-00	1957 Jan 29
-			3:00	-	SYOT	# Syowa Time
+			3:00	-	+03
 # See:
 # NIPR Antarctic Research Activities (1999-08-17)
 # http://www.nipr.ac.jp/english/ara01.html
@@ -237,17 +234,17 @@
 # correct, but they should be quite close to the actual dates.
 #
 # From Paul Eggert (2014-03-21):
-# The CET-switching Troll rules require zic from tzcode 2014b or later, so as
+# The CET-switching Troll rules require zic from tz 2014b or later, so as
 # suggested by Bengt-Inge Larsson comment them out for now, and approximate
 # with only UTC and CEST.  Uncomment them when 2014b is more prevalent.
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-#Rule	Troll	2005	max	-	Mar	 1	1:00u	1:00	CET
-Rule	Troll	2005	max	-	Mar	lastSun	1:00u	2:00	CEST
-#Rule	Troll	2005	max	-	Oct	lastSun	1:00u	1:00	CET
-#Rule	Troll	2004	max	-	Nov	 7	1:00u	0:00	UTC
+#Rule	Troll	2005	max	-	Mar	 1	1:00u	1:00	+01
+Rule	Troll	2005	max	-	Mar	lastSun	1:00u	2:00	+02
+#Rule	Troll	2005	max	-	Oct	lastSun	1:00u	1:00	+01
+#Rule	Troll	2004	max	-	Nov	 7	1:00u	0:00	+00
 # Remove the following line when uncommenting the above '#Rule' lines.
-Rule	Troll	2004	max	-	Oct	lastSun	1:00u	0:00	UTC
+Rule	Troll	2004	max	-	Oct	lastSun	1:00u	0:00	+00
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Troll	0	-	-00	2005 Feb 12
 			0:00	Troll	%s
@@ -288,10 +285,10 @@
 # changes during the year and does not necessarily correspond to mean
 # solar noon.  So the Vostok time might have been whatever the clocks
 # happened to be during their visit.  So we still don't really know what time
-# it is at Vostok.  But we'll guess UTC+6.
+# it is at Vostok.  But we'll guess +06.
 #
 Zone Antarctica/Vostok	0	-	-00	1957 Dec 16
-			6:00	-	VOST	# Vostok time
+			6:00	-	+06
 
 # S Africa - year-round bases
 # Marion Island, -4653+03752
@@ -324,7 +321,7 @@
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Antarctica/Rothera	0	-	-00	1976 Dec  1
-			-3:00	-	ROTT	# Rothera time
+			-3:00	-	-03
 
 # Uruguay - year round base
 # Artigas, King George Island, -621104-0585107
--- a/make/data/tzdata/asia	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/asia	Thu Oct 13 09:02:13 2016 -0700
@@ -139,13 +139,11 @@
 # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May  2
-			3:00	-	YERT	1957 Mar    # Yerevan Time
-			4:00 RussiaAsia YER%sT	1991 Mar 31  2:00s
-			3:00	1:00	YERST	1991 Sep 23 # independence
-			3:00 RussiaAsia	AM%sT	1995 Sep 24  2:00s
-			4:00	-	AMT	1997
-			4:00 RussiaAsia	AM%sT	2012 Feb  9
-			4:00	-	AMT
+			3:00	-	+03	1957 Mar
+			4:00 RussiaAsia +04/+05	1991 Mar 31  2:00s
+			3:00 RussiaAsia	+03/+04	1995 Sep 24  2:00s
+			4:00	-	+04	1997
+			4:00 RussiaAsia	+04/+05
 
 # Azerbaijan
 
@@ -166,13 +164,12 @@
 Rule	Azer	1997	2015	-	Oct	lastSun	 5:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Baku	3:19:24 -	LMT	1924 May  2
-			3:00	-	BAKT	1957 Mar    # Baku Time
-			4:00 RussiaAsia BAK%sT	1991 Mar 31  2:00s
-			3:00	1:00	BAKST	1991 Aug 30 # independence
-			3:00 RussiaAsia	AZ%sT	1992 Sep lastSun  2:00s
-			4:00	-	AZT	1996     # Azerbaijan Time
-			4:00	EUAsia	AZ%sT	1997
-			4:00	Azer	AZ%sT
+			3:00	-	+03	1957 Mar
+			4:00 RussiaAsia +04/+05	1991 Mar 31  2:00s
+			3:00 RussiaAsia	+03/+04	1992 Sep lastSun  2:00s
+			4:00	-	+04	1996
+			4:00	EUAsia	+04/+05	1997
+			4:00	Azer	+04/+05
 
 # Bahrain
 # See Asia/Qatar.
@@ -291,7 +288,7 @@
 # Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-Zone	Asia/Rangoon	6:24:40 -	LMT	1880        # or Yangon
+Zone	Asia/Yangon	6:24:40 -	LMT	1880        # or Rangoon
 			6:24:40	-	RMT	1920        # Rangoon Mean Time?
 			6:30	-	BURT	1942 May    # Burma Time
 			9:00	-	JST	1945 May  3
@@ -406,7 +403,7 @@
 # Lewiston (ME) Daily Sun (1939-05-29), p 17, said "Even the time is
 # different - the occupied districts going by Tokyo time, an hour
 # ahead of that prevailing in the rest of Shanghai."  Guess that the
-# Xujiahui Observatory was under French control and stuck with UT+8.
+# Xujiahui Observatory was under French control and stuck with UT +08.
 #
 # In earlier versions of this file, China had many separate Zone entries, but
 # this was based on what were apparently incorrect data in Shanks & Pottenger.
@@ -415,26 +412,26 @@
 # Proposed in 1918 and theoretically in effect until 1949 (although in practice
 # mainly observed in coastal areas), the five zones were:
 #
-# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT+8.5
+# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30
 # Asia/Harbin (currently a link to Asia/Shanghai)
 # Heilongjiang (except Mohe county), Jilin
 #
-# Zhongyuan Time ("Central plain Time") UT+8
+# Zhongyuan Time ("Central plain Time") UT +08
 # Asia/Shanghai
 # most of China
 # This currently represents most other zones as well,
 # as apparently these regions have been the same since 1970.
 # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest.
-# Guo says Shanghai switched to UT+8 "from the end of the 19th century".
+# Guo says Shanghai switched to UT +08 "from the end of the 19th century".
 #
-# Long-shu Time (probably due to Long and Shu being two names of that area) UT+7
+# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07
 # Asia/Chongqing (currently a link to Asia/Shanghai)
 # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan;
 # most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong
 # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing,
 # Yangchun, Yangjiang, Yu'nan, and Yunfu.
 #
-# Xin-zang Time ("Xinjiang-Tibet Time") UT+6
+# Xin-zang Time ("Xinjiang-Tibet Time") UT +06
 # Asia/Urumqi
 # This currently represents Kunlun Time as well,
 # as apparently the two regions have been the same since 1970.
@@ -447,7 +444,7 @@
 # Shihezi, Changji, Yanqi, Heshuo, Tuokexun, Tulufan, Shanshan, Hami,
 # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan.
 #
-# Kunlun Time UT+5.5
+# Kunlun Time UT +05:30
 # Asia/Kashgar (currently a link to Asia/Urumqi)
 # West Tibet, including Pulan, Aheqi, Shufu, Shule;
 # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke,
@@ -463,7 +460,7 @@
 #
 # On the other hand, ethnic Uyghurs, who make up about half the
 # population of Xinjiang, typically use "Xinjiang time" which is two
-# hours behind Beijing time, or UTC +0600. The government of the Xinjiang
+# hours behind Beijing time, or UT +06. The government of the Xinjiang
 # Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as
 # local governments such as the Ürümqi city government use both times in
 # publications, referring to what is popularly called Xinjiang time as
@@ -519,8 +516,8 @@
 # having the same time as Beijing.
 
 # From Paul Eggert (2014-06-30):
-# In the early days of the PRC, Tibet was given its own time zone (UT+6) but
-# this was withdrawn in 1959 and never reinstated; see Tubten Khétsun,
+# In the early days of the PRC, Tibet was given its own time zone (UT +06)
+# but this was withdrawn in 1959 and never reinstated; see Tubten Khétsun,
 # Memories of life in Lhasa under Chinese Rule, Columbia U Press, ISBN
 # 978-0231142861 (2008), translator's introduction by Matthew Akester, p x.
 # As this is before our 1970 cutoff, Tibet doesn't need a separate zone.
@@ -534,12 +531,12 @@
 # Republics, the Soviet Union, the Kuomintang, and the People's Republic of
 # China, and tracking down all these organizations' timekeeping rules would be
 # quite a trick.  Approximate this lost history by a transition from LMT to
-# XJT at the start of 1928, the year of accession of the warlord Jin Shuren,
+# UT +06 at the start of 1928, the year of accession of the warlord Jin Shuren,
 # which happens to be the date given by Shanks & Pottenger (no doubt as a
-# guess) as the transition from LMT.  Ignore the usage of UT+8 before
-# 1986-02-01 under the theory that the transition date to UT+8 is unknown and
+# guess) as the transition from LMT.  Ignore the usage of +08 before
+# 1986-02-01 under the theory that the transition date to +08 is unknown and
 # that the sort of users who prefer Asia/Urumqi now typically ignored the
-# UT+8 mandate back then.
+# +08 mandate back then.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Beijing time, used throughout China; represented by Shanghai.
@@ -744,7 +741,7 @@
 # be found from historical government announcement database.
 
 # From Paul Eggert (2014-07-03):
-# As per Yu-Cheng Chuang, say that Taiwan was at UT+9 from 1937-10-01
+# As per Yu-Cheng Chuang, say that Taiwan was at UT +09 from 1937-10-01
 # until 1945-09-21 at 01:00, overriding Shanks & Pottenger.
 # Likewise, use Yu-Cheng Chuang's data for DST in Taiwan.
 
@@ -858,16 +855,15 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Tbilisi	2:59:11 -	LMT	1880
 			2:59:11	-	TBMT	1924 May  2 # Tbilisi Mean Time
-			3:00	-	TBIT	1957 Mar    # Tbilisi Time
-			4:00 RussiaAsia TBI%sT	1991 Mar 31  2:00s
-			3:00	1:00	TBIST	1991 Apr  9 # independence
-			3:00 RussiaAsia GE%sT	1992        # Georgia Time
-			3:00 E-EurAsia	GE%sT	1994 Sep lastSun
-			4:00 E-EurAsia	GE%sT	1996 Oct lastSun
-			4:00	1:00	GEST	1997 Mar lastSun
-			4:00 E-EurAsia	GE%sT	2004 Jun 27
-			3:00 RussiaAsia	GE%sT	2005 Mar lastSun  2:00
-			4:00	-	GET
+			3:00	-	+03	1957 Mar
+			4:00 RussiaAsia +04/+05	1991 Mar 31  2:00s
+			3:00 RussiaAsia +03/+04	1992
+			3:00 E-EurAsia	+03/+04	1994 Sep lastSun
+			4:00 E-EurAsia	+04/+05	1996 Oct lastSun
+			4:00	1:00	+05	1997 Mar lastSun
+			4:00 E-EurAsia	+04/+05	2004 Jun 27
+			3:00 RussiaAsia	+03/+04	2005 Mar lastSun  2:00
+			4:00	-	+04
 
 # East Timor
 
@@ -944,7 +940,7 @@
 # These would be the earliest possible times for a change.
 # Régimes horaires pour le monde entier, by Henri Le Corre, (Éditions
 # Traditionnelles, 1987, Paris) says that Java and Madura switched
-# from JST to UTC+07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura
+# from UT +09 to +07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura
 # (Hollandia).  For now, assume all Indonesian locations other than Jayapura
 # switched on 1945-09-23.
 #
@@ -955,11 +951,11 @@
 # summary published by the Time and Frequency Laboratory of the
 # Research Center for Calibration, Instrumentation and Metrology,
 # Indonesia, <http://time.kim.lipi.go.id/time-eng.php> (2006-09-29).
-# The abbreviations are:
+# The time zone abbreviations and UT offsets are:
 #
-# WIB  - UTC+7 - Waktu Indonesia Barat (Indonesia western time)
-# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time)
-# WIT  - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time)
+# WIB  - +07 - Waktu Indonesia Barat (Indonesia western time)
+# WITA - +08 - Waktu Indonesia Tengah (Indonesia central time)
+# WIT  - +09 - Waktu Indonesia Timur (Indonesia eastern time)
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Java, Sumatra
@@ -1848,11 +1844,11 @@
 Rule	Kyrgyz	1997	2004	-	Oct	lastSun	2:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Bishkek	4:58:24 -	LMT	1924 May  2
-			5:00	-	FRUT	1930 Jun 21 # Frunze Time
-			6:00 RussiaAsia FRU%sT	1991 Mar 31  2:00s
-			5:00	1:00	FRUST	1991 Aug 31  2:00 # independence
-			5:00	Kyrgyz	KG%sT	2005 Aug 12 # Kyrgyzstan Time
-			6:00	-	KGT
+			5:00	-	+05	1930 Jun 21
+			6:00 RussiaAsia +06/+07	1991 Mar 31  2:00s
+			5:00 RussiaAsia	+05/+06	1991 Aug 31  2:00
+			5:00	Kyrgyz	+05/+06	2005 Aug 12
+			6:00	-	+06
 
 ###############################################################################
 
@@ -1891,25 +1887,24 @@
 Rule	ROK	1987	1988	-	May	Sun>=8	2:00	1:00	D
 Rule	ROK	1987	1988	-	Oct	Sun>=8	3:00	0	S
 
-# From Paul Eggert (2014-10-30):
+# From Paul Eggert (2016-08-23):
 # The Korean Wikipedia entry gives the following sources for UT offsets:
 #
-# 1908: Official Journal Article No. 3994 (Edict No. 5)
+# 1908: Official Journal Article No. 3994 (decree No. 5)
 # 1912: Governor-General of Korea Official Gazette Issue No. 367
 #       (Announcement No. 338)
 # 1954: Presidential Decree No. 876 (1954-03-17)
 # 1961: Law No. 676 (1961-08-07)
-# 1987: Law No. 3919 (1986-12-31)
 #
-# The Wikipedia entry also has confusing information about a change
-# to UT+9 in April 1910, but then what would be the point of the later change
-# to UT+9 on 1912-01-01?  Omit the 1910 change for now.
+# (Another source "1987: Law No. 3919 (1986-12-31)" was in the 2014-10-30
+# edition of the Korean Wikipedia entry.)
 #
 # I guessed that time zone abbreviations through 1945 followed the same
 # rules as discussed under Taiwan, with nominal switches from JST to KST
 # when the respective cities were taken over by the Allies after WWII.
 #
-# For Pyongyang we have no information; guess no changes since World War II.
+# For Pyongyang, guess no changes from World War II until 2015, as we
+# have no information otherwise.
 
 # From Steffen Thorsen (2015-08-07):
 # According to many news sources, North Korea is going to change to
@@ -2069,7 +2064,7 @@
 # Bill Bonnet (2005-05-19) reports that the US Embassy in Ulaanbaatar says
 # there is only one time zone and that DST is observed, citing Microsoft
 # Windows XP as the source.  Risto Nykänen (2005-05-16) reports that
-# travelmongolia.org says there are two time zones (UTC+7, UTC+8) with no DST.
+# travelmongolia.org says there are two time zones (UT +07, +08) with no DST.
 # Oscar van Vlijmen (2005-05-20) reports that the Mongolian Embassy in
 # Washington, DC says there are two time zones, with DST observed.
 # He also found
@@ -2705,7 +2700,7 @@
 # earlier date.
 #
 # Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two
-# time zones; the other zone, at UTC+4, was in the far eastern part of
+# time zones; the other zone, at UT +04, was in the far eastern part of
 # the country.  Ignore this, as it's before our 1970 cutoff.
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2974,10 +2969,10 @@
 # From Shanks & Pottenger.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dushanbe	4:35:12 -	LMT	1924 May  2
-			5:00	-	DUST	1930 Jun 21 # Dushanbe Time
-			6:00 RussiaAsia DUS%sT	1991 Mar 31  2:00s
-			5:00	1:00	DUSST	1991 Sep  9  2:00s
-			5:00	-	TJT	# Tajikistan Time
+			5:00	-	+05	1930 Jun 21
+			6:00 RussiaAsia +06/+07	1991 Mar 31  2:00s
+			5:00	1:00	+05/+06	1991 Sep  9  2:00s
+			5:00	-	+05
 
 # Thailand
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2991,11 +2986,10 @@
 # From Shanks & Pottenger.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Ashgabat	3:53:32 -	LMT	1924 May  2 # or Ashkhabad
-			4:00	-	ASHT	1930 Jun 21 # Ashkhabad Time
-			5:00 RussiaAsia	ASH%sT	1991 Mar 31  2:00
-			4:00 RussiaAsia	ASH%sT	1991 Oct 27 # independence
-			4:00 RussiaAsia	TM%sT	1992 Jan 19  2:00
-			5:00	-	TMT
+			4:00	-	+04	1930 Jun 21
+			5:00 RussiaAsia	+05/+06	1991 Mar 31  2:00
+			4:00 RussiaAsia	+04/+05	1992 Jan 19  2:00
+			5:00	-	+05
 
 # United Arab Emirates
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -3007,20 +3001,18 @@
 # Byalokoz 1919 says Uzbekistan was 4:27:53.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Samarkand	4:27:53 -	LMT	1924 May  2
-			4:00	-	SAMT	1930 Jun 21 # Samarkand Time
-			5:00	-	SAMT	1981 Apr  1
-			5:00	1:00	SAMST	1981 Oct  1
-			6:00	-	TAST	1982 Apr  1 # Tashkent Time
-			5:00 RussiaAsia	SAM%sT	1991 Sep  1 # independence
-			5:00 RussiaAsia	UZ%sT	1992
-			5:00	-	UZT
+			4:00	-	+04	1930 Jun 21
+			5:00	-	+05	1981 Apr  1
+			5:00	1:00	+06	1981 Oct  1
+			6:00	-	+06	1982 Apr  1
+			5:00 RussiaAsia	+05/+06	1992
+			5:00	-	+05
 # Milne says Tashkent was 4:37:10.8; round to nearest.
 Zone	Asia/Tashkent	4:37:11 -	LMT	1924 May  2
-			5:00	-	TAST	1930 Jun 21 # Tashkent Time
-			6:00 RussiaAsia	TAS%sT	1991 Mar 31  2:00
-			5:00 RussiaAsia	TAS%sT	1991 Sep  1 # independence
-			5:00 RussiaAsia	UZ%sT	1992
-			5:00	-	UZT
+			5:00	-	+05	1930 Jun 21
+			6:00 RussiaAsia	+06/+07	1991 Mar 31  2:00
+			5:00 RussiaAsia	+05/+06	1992
+			5:00	-	+05
 
 # Vietnam
 
--- a/make/data/tzdata/australasia	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/australasia	Thu Oct 13 09:02:13 2016 -0700
@@ -568,7 +568,7 @@
 # Base the Bougainville entry on the Arawa-Kieta region, which appears to have
 # the most people even though it was devastated in the Bougainville Civil War.
 #
-# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates
+# Although Shanks gives 1942-03-15 / 1943-11-01 for UT +09, these dates
 # are apparently rough guesswork from the starts of military campaigns.
 # The World War II entries below are instead based on Arawa-Kieta.
 # The Japanese occupied Kieta in July 1942,
@@ -576,8 +576,8 @@
 # http://pwencycl.kgbudge.com/B/o/Bougainville.htm
 # and seem to have controlled it until their 1945-08-21 surrender.
 #
-# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11
-# on 2014-12-28 at 02:00.  They call UTC+11 "Bougainville Standard Time";
+# The Autonomous Region of Bougainville switched from UT +10 to +11
+# on 2014-12-28 at 02:00.  They call +11 "Bougainville Standard Time";
 # abbreviate this as BST.  See:
 # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/
 #
@@ -643,7 +643,7 @@
 # From Paul Eggert (2014-06-27):
 # The International Date Line Act 2011
 # http://www.parliament.gov.ws/images/ACTS/International_Date_Line_Act__2011_-_Eng.pdf
-# changed Samoa from UTC-11 to UTC+13, effective "12 o'clock midnight, on
+# changed Samoa from UT -11 to +13, effective "12 o'clock midnight, on
 # Thursday 29th December 2011".  The International Date Line was adjusted
 # accordingly.
 
@@ -738,7 +738,7 @@
 # 1886-1891; Baker was similar but exact dates are not known.
 # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
 # uninhabited thereafter.
-# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
+# Howland observed Hawaii Standard Time (UT -10:30) in 1937;
 # see page 206 of Elgen M. Long and Marie K. Long,
 # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
 # So most likely Howland and Baker observed Hawaii Time from 1935
@@ -1496,7 +1496,7 @@
 # Zealand time.  I understand that is the time they keep locally, anyhow."
 # For now, assume this practice goes back to the introduction of standard time
 # in New Zealand, as this would make Chatham Islands time almost exactly match
-# LMT back when New Zealand was at UTC+11:30; also, assume Chatham Islands did
+# LMT back when New Zealand was at UT +11:30; also, assume Chatham Islands did
 # not observe New Zealand's prewar DST.
 
 ###############################################################################
@@ -1552,7 +1552,7 @@
 # For now, we assume the Ladrones switched at the same time as the Philippines;
 # see Asia/Manila.
 
-# US Public Law 106-564 (2000-12-23) made UTC+10 the official standard time,
+# US Public Law 106-564 (2000-12-23) made UT +10 the official standard time,
 # under the name "Chamorro Standard Time".  There is no official abbreviation,
 # but Congressman Robert A. Underwood, author of the bill that became law,
 # wrote in a press release (2000-12-27) that he will seek the use of "ChST".
@@ -1564,15 +1564,15 @@
 # "I am certain, having lived there for the past decade, that 'Truk'
 # (now properly known as Chuuk) ... is in the time zone GMT+10."
 #
-# Shanks & Pottenger write that Truk switched from UTC+10 to UTC+11
+# Shanks & Pottenger write that Truk switched from UT +10 to +11
 # on 1978-10-01; ignore this for now.
 
 # From Paul Eggert (1999-10-29):
 # The Federated States of Micronesia Visitors Board writes in
 # The Federated States of Micronesia - Visitor Information (1999-01-26)
 # http://www.fsmgov.org/info/clocks.html
-# that Truk and Yap are UTC+10, and Ponape and Kosrae are UTC+11.
-# We don't know when Kosrae switched from UTC+12; assume January 1 for now.
+# that Truk and Yap are UT +10, and Ponape and Kosrae are +11.
+# We don't know when Kosrae switched from +12; assume January 1 for now.
 
 
 # Midway
@@ -1638,11 +1638,11 @@
 # ordaining - by a masterpiece of diplomatic flattery - that
 # the Fourth of July should be celebrated twice in that year."
 
-# Although Shanks & Pottenger says they both switched to UTC-11:30
-# in 1911, and to UTC-11 in 1950. many earlier sources give UTC-11
+# Although Shanks & Pottenger says they both switched to UT -11:30
+# in 1911, and to -11 in 1950. many earlier sources give -11
 # for American Samoa, e.g., the US National Bureau of Standards
 # circular "Standard Time Throughout the World", 1932.
-# Assume American Samoa switched to UTC-11 in 1911, not 1950,
+# Assume American Samoa switched to -11 in 1911, not 1950,
 # and that after 1950 they agreed until (western) Samoa skipped a
 # day in 2011.  Assume also that the Samoas follow the US and New
 # Zealand's "ST"/"DT" style of daylight-saving abbreviations.
--- a/make/data/tzdata/backward	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/backward	Thu Oct 13 09:02:13 2016 -0700
@@ -59,6 +59,7 @@
 Link	Asia/Urumqi		Asia/Kashgar
 Link	Asia/Kathmandu		Asia/Katmandu
 Link	Asia/Macau		Asia/Macao
+Link	Asia/Yangon		Asia/Rangoon
 Link	Asia/Ho_Chi_Minh	Asia/Saigon
 Link	Asia/Jerusalem		Asia/Tel_Aviv
 Link	Asia/Thimphu		Asia/Thimbu
--- a/make/data/tzdata/etcetera	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/etcetera	Thu Oct 13 09:02:13 2016 -0700
@@ -31,6 +31,13 @@
 # need now for the entries that are not on UTC are for ships at sea
 # that cannot use POSIX TZ settings.
 
+# Starting with POSIX 1003.1-2001, the entries below are all
+# unnecessary as settings for the TZ environment variable.  E.g.,
+# instead of TZ='Etc/GMT+4' one can use the POSIX setting TZ='<-04>+4'.
+#
+# Do not use a POSIX TZ setting like TZ='GMT+4', which is four hours
+# behind GMT but uses the completely misleading abbreviation "GMT".
+
 Zone	Etc/GMT		0	-	GMT
 Zone	Etc/UTC		0	-	UTC
 Zone	Etc/UCT		0	-	UCT
@@ -49,23 +56,13 @@
 Link	Etc/GMT				Etc/GMT+0
 Link	Etc/GMT				Etc/GMT0
 
-# We use POSIX-style signs in the Zone names and the output abbreviations,
+# Be consistent with POSIX TZ settings in the Zone names,
 # even though this is the opposite of what many people expect.
 # POSIX has positive signs west of Greenwich, but many people expect
 # positive signs east of Greenwich.  For example, TZ='Etc/GMT+4' uses
-# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
+# the abbreviation "-04" and corresponds to 4 hours behind UT
 # (i.e. west of Greenwich) even though many people would expect it to
 # mean 4 hours ahead of UT (i.e. east of Greenwich).
-#
-# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
-# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
-# ISO 8601 you can use TZ='<-0400>+4'.  Thus the commonly-expected
-# offset is kept within the angle bracket (and is used for display)
-# while the POSIX sign is kept outside the angle bracket (and is used
-# for calculation).
-#
-# Do not use a TZ setting like TZ='GMT+4', which is four hours behind
-# GMT but uses the completely misleading abbreviation "GMT".
 
 # Earlier incarnations of this package were not POSIX-compliant,
 # and had lines such as
@@ -74,30 +71,31 @@
 # way does a
 #		zic -l GMT-12
 # so we moved the names into the Etc subdirectory.
+# Also, the time zone abbreviations are now compatible with %z.
 
-Zone	Etc/GMT-14	14	-	GMT-14	# 14 hours ahead of GMT
-Zone	Etc/GMT-13	13	-	GMT-13
-Zone	Etc/GMT-12	12	-	GMT-12
-Zone	Etc/GMT-11	11	-	GMT-11
-Zone	Etc/GMT-10	10	-	GMT-10
-Zone	Etc/GMT-9	9	-	GMT-9
-Zone	Etc/GMT-8	8	-	GMT-8
-Zone	Etc/GMT-7	7	-	GMT-7
-Zone	Etc/GMT-6	6	-	GMT-6
-Zone	Etc/GMT-5	5	-	GMT-5
-Zone	Etc/GMT-4	4	-	GMT-4
-Zone	Etc/GMT-3	3	-	GMT-3
-Zone	Etc/GMT-2	2	-	GMT-2
-Zone	Etc/GMT-1	1	-	GMT-1
-Zone	Etc/GMT+1	-1	-	GMT+1
-Zone	Etc/GMT+2	-2	-	GMT+2
-Zone	Etc/GMT+3	-3	-	GMT+3
-Zone	Etc/GMT+4	-4	-	GMT+4
-Zone	Etc/GMT+5	-5	-	GMT+5
-Zone	Etc/GMT+6	-6	-	GMT+6
-Zone	Etc/GMT+7	-7	-	GMT+7
-Zone	Etc/GMT+8	-8	-	GMT+8
-Zone	Etc/GMT+9	-9	-	GMT+9
-Zone	Etc/GMT+10	-10	-	GMT+10
-Zone	Etc/GMT+11	-11	-	GMT+11
-Zone	Etc/GMT+12	-12	-	GMT+12
+Zone	Etc/GMT-14	14	-	+14
+Zone	Etc/GMT-13	13	-	+13
+Zone	Etc/GMT-12	12	-	+12
+Zone	Etc/GMT-11	11	-	+11
+Zone	Etc/GMT-10	10	-	+10
+Zone	Etc/GMT-9	9	-	+09
+Zone	Etc/GMT-8	8	-	+08
+Zone	Etc/GMT-7	7	-	+07
+Zone	Etc/GMT-6	6	-	+06
+Zone	Etc/GMT-5	5	-	+05
+Zone	Etc/GMT-4	4	-	+04
+Zone	Etc/GMT-3	3	-	+03
+Zone	Etc/GMT-2	2	-	+02
+Zone	Etc/GMT-1	1	-	+01
+Zone	Etc/GMT+1	-1	-	-01
+Zone	Etc/GMT+2	-2	-	-02
+Zone	Etc/GMT+3	-3	-	-03
+Zone	Etc/GMT+4	-4	-	-04
+Zone	Etc/GMT+5	-5	-	-05
+Zone	Etc/GMT+6	-6	-	-06
+Zone	Etc/GMT+7	-7	-	-07
+Zone	Etc/GMT+8	-8	-	-08
+Zone	Etc/GMT+9	-9	-	-09
+Zone	Etc/GMT+10	-10	-	-10
+Zone	Etc/GMT+11	-11	-	-11
+Zone	Etc/GMT+12	-12	-	-12
--- a/make/data/tzdata/europe	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/europe	Thu Oct 13 09:02:13 2016 -0700
@@ -98,8 +98,7 @@
 #        1:00       CET CEST CEMT Central Europe
 #        1:00:14    SET           Swedish (1879-1899)*
 #        2:00       EET EEST      Eastern Europe
-#        3:00       FET           Further-eastern Europe (2011-2014)*
-#        3:00       MSK MSD  MSM* Minsk, Moscow
+#        3:00       MSK MSD       Moscow
 
 # From Peter Ilieve (1994-12-04),
 # The original six [EU members]: Belgium, France, (West) Germany, Italy,
@@ -606,16 +605,33 @@
 Rule	E-Eur	1981	max	-	Mar	lastSun	 0:00	1:00	S
 Rule	E-Eur	1996	max	-	Oct	lastSun	 0:00	0	-
 
+
+# Daylight saving time for Russia and the Soviet Union
+#
+# The 1917-1921 decree URLs are from Alexander Belopolsky (2016-08-23).
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Russia	1917	only	-	Jul	 1	23:00	1:00	MST  # Moscow Summer Time
+#
+# Decree No. 142 (1917-12-22) http://istmat.info/node/28137
 Rule	Russia	1917	only	-	Dec	28	 0:00	0	MMT  # Moscow Mean Time
+#
+# Decree No. 497 (1918-05-30) http://istmat.info/node/30001
 Rule	Russia	1918	only	-	May	31	22:00	2:00	MDST # Moscow Double Summer Time
 Rule	Russia	1918	only	-	Sep	16	 1:00	1:00	MST
+#
+# Decree No. 258 (1919-05-29) http://istmat.info/node/37949
 Rule	Russia	1919	only	-	May	31	23:00	2:00	MDST
-Rule	Russia	1919	only	-	Jul	 1	 2:00	1:00	MSD
+#
+Rule	Russia	1919	only	-	Jul	 1	 0:00u	1:00	MSD
 Rule	Russia	1919	only	-	Aug	16	 0:00	0	MSK
+#
+# Decree No. 63 (1921-02-03) http://istmat.info/node/45840
 Rule	Russia	1921	only	-	Feb	14	23:00	1:00	MSD
-Rule	Russia	1921	only	-	Mar	20	23:00	2:00	MSM  # Midsummer
+#
+# Decree No. 121 (1921-03-07) http://istmat.info/node/45949
+Rule	Russia	1921	only	-	Mar	20	23:00	2:00	+05
+#
 Rule	Russia	1921	only	-	Sep	 1	 0:00	1:00	MSD
 Rule	Russia	1921	only	-	Oct	 1	 0:00	0	-
 # Act No. 925 of the Council of Ministers of the USSR (1980-10-24):
@@ -798,8 +814,6 @@
 # From Alexander Bokovoy (2014-10-09):
 # Belarussian government decided against changing to winter time....
 # http://eng.belta.by/all_news/society/Belarus-decides-against-adjusting-time-in-Russias-wake_i_76335.html
-# From Paul Eggert (2014-10-08):
-# Hence Belarus can share time zone abbreviations with Moscow again.
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
@@ -810,8 +824,7 @@
 			3:00	Russia	MSK/MSD	1990
 			3:00	-	MSK	1991 Mar 31  2:00s
 			2:00	Russia	EE%sT	2011 Mar 27  2:00s
-			3:00	-	FET	2014 Oct 26  1:00s
-			3:00	-	MSK
+			3:00	-	+03
 
 # Belgium
 #
@@ -1319,7 +1332,7 @@
 # http://www.parlament-berlin.de/pds-fraktion.nsf/727459127c8b66ee8525662300459099/defc77cb784f180ac1256c2b0030274b/$FILE/bersarint.pdf
 # says that Bersarin issued an order to use Moscow time on May 20.
 # However, Moscow did not observe daylight saving in 1945, so
-# this was equivalent to CEMT (GMT+3), not GMT+4.
+# this was equivalent to UT +03, not +04.
 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -2283,7 +2296,6 @@
 # http://www.worldtimezone.com/dst_news/dst_news_russia-map-2014-07.html
 
 # From Paul Eggert (2006-03-22):
-# Except for Moscow after 1919-07-01, I invented the time zone abbreviations.
 # Moscow time zone abbreviations after 1919-07-01, and Moscow rules after 1991,
 # are from Andrey A. Chernov.  The rest is from Shanks & Pottenger,
 # except we follow Chernov's report that 1992 DST transitions were Sat
@@ -2359,7 +2371,7 @@
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1989 Mar 26  2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27  2:00s
-			 3:00	-	FET	2014 Oct 26  2:00s
+			 3:00	-	+03	2014 Oct 26  2:00s
 			 2:00	-	EET
 
 
@@ -2412,6 +2424,16 @@
 # 78	RU-SPE	Saint Petersburg
 # 83	RU-NEN	Nenets Autonomous Okrug
 
+# From Paul Eggert (2016-08-23):
+# The Soviets switched to UT-based time in 1919.  Decree No. 59
+# (1919-02-08) http://istmat.info/node/35567 established UT-based time
+# zones, and Decree No. 147 (1919-03-29) http://istmat.info/node/35854
+# specified a transition date of 1919-07-01, apparently at 00:00 UT.
+# No doubt only the Soviet-controlled regions switched on that date;
+# later transitions to UT-based time in other parts of Russia are
+# taken from what appear to be guesses by Shanks.
+# (Thanks to Alexander Belopolsky for pointers to the decrees.)
+
 # From Stepan Golosunov (2016-03-07):
 # 11. Regions-violators, 1981-1982.
 # Wikipedia refers to
@@ -2453,7 +2475,7 @@
 # attributes the 1982 changes to the Act of the Council of Ministers
 # of the USSR No. 126 from 18.02.1982.  1980-925.txt also adds
 # Udmurtia to the list of affected territories and lists Khatangsky
-# district separately from Taymyr Autonomous Okurg.  Probably erroneously.
+# district separately from Taymyr Autonomous Okrug.  Probably erroneously.
 #
 # The affected territories are currently listed under Europe/Moscow,
 # Asia/Yekaterinburg and Asia/Krasnoyarsk.
@@ -2513,7 +2535,7 @@
 
 Zone Europe/Moscow	 2:30:17 -	LMT	1880
 			 2:30:17 -	MMT	1916 Jul  3 # Moscow Mean Time
-			 2:31:19 Russia	%s	1919 Jul  1  2:00
+			 2:31:19 Russia	%s	1919 Jul  1  0:00u
 			 3:00	Russia	%s	1921 Oct
 			 3:00	Russia	MSK/MSD	1922 Oct
 			 2:00	-	EET	1930 Jun 21
@@ -2596,22 +2618,21 @@
 # The 1988 transition is from USSR act No. 5 (1988-01-04).
 
 Zone Europe/Volgograd	 2:57:40 -	LMT	1920 Jan  3
-			 3:00	-	TSAT	1925 Apr  6 # Tsaritsyn Time
-			 3:00	-	STAT	1930 Jun 21 # Stalingrad Time
-			 4:00	-	STAT	1961 Nov 11
-			 4:00	Russia	VOL%sT	1988 Mar 27  2:00s # Volgograd T
-			 3:00	Russia	VOL%sT	1991 Mar 31  2:00s
-			 4:00	-	VOLT	1992 Mar 29  2:00s
-			 3:00	Russia	MSK/MSD	2011 Mar 27  2:00s
-			 4:00	-	MSK	2014 Oct 26  2:00s
-			 3:00	-	MSK
+			 3:00	-	+03	1930 Jun 21
+			 4:00	-	+04	1961 Nov 11
+			 4:00	Russia	+04/+05	1988 Mar 27  2:00s
+			 3:00	Russia	+03/+04	1991 Mar 31  2:00s
+			 4:00	-	+04	1992 Mar 29  2:00s
+			 3:00	Russia	+03/+04	2011 Mar 27  2:00s
+			 4:00	-	+04	2014 Oct 26  2:00s
+			 3:00	-	+03
 
 # From Paul Eggert (2016-03-18):
 # Europe/Kirov covers:
 # 43	RU-KIR	Kirov Oblast
 # The 1989 transition is from USSR act No. 227 (1989-03-14).
 #
-Zone Europe/Kirov	 3:18:48 -	LMT	1919 Jul  1  2:00
+Zone Europe/Kirov	 3:18:48 -	LMT	1919 Jul  1  0:00u
 			 3:00	-	+03	1930 Jun 21
 			 4:00	Russia	+04/+05	1989 Mar 26  2:00s
 			 3:00	Russia	+03/+04	1991 Mar 31  2:00s
@@ -2629,16 +2650,16 @@
 # Byalokoz 1919 says Samara was 3:20:20.
 # The 1989 transition is from USSR act No. 227 (1989-03-14).
 
-Zone Europe/Samara	 3:20:20 -	LMT	1919 Jul  1  2:00
-			 3:00	-	SAMT	1930 Jun 21 # Samara Time
-			 4:00	-	SAMT	1935 Jan 27
-			 4:00	Russia	KUY%sT	1989 Mar 26  2:00s # Kuybyshev
-			 3:00	Russia	MSK/MSD	1991 Mar 31  2:00s
-			 2:00	Russia	EE%sT	1991 Sep 29  2:00s
-			 3:00	-	SAMT	1991 Oct 20  3:00
-			 4:00	Russia	SAM%sT	2010 Mar 28  2:00s
-			 3:00	Russia	SAM%sT	2011 Mar 27  2:00s
-			 4:00	-	SAMT
+Zone Europe/Samara	 3:20:20 -	LMT	1919 Jul  1  0:00u
+			 3:00	-	+03	1930 Jun 21
+			 4:00	-	+04	1935 Jan 27
+			 4:00	Russia	+04/+05	1989 Mar 26  2:00s
+			 3:00	Russia	+03/+04	1991 Mar 31  2:00s
+			 2:00	Russia	+02/+03	1991 Sep 29  2:00s
+			 3:00	-	+03	1991 Oct 20  3:00
+			 4:00	Russia	+04/+05	2010 Mar 28  2:00s
+			 3:00	Russia	+03/+04	2011 Mar 27  2:00s
+			 4:00	-	+04
 
 # From Paul Eggert (2016-03-18):
 # Europe/Ulyanovsk covers:
@@ -2653,7 +2674,7 @@
 # From Matt Johnson (2016-03-09):
 # http://publication.pravo.gov.ru/Document/View/0001201603090051
 
-Zone Europe/Ulyanovsk	 3:13:36 -	LMT	1919 Jul  1  2:00
+Zone Europe/Ulyanovsk	 3:13:36 -	LMT	1919 Jul  1  0:00u
 			 3:00	-	+03	1930 Jun 21
 			 4:00	Russia	+04/+05	1989 Mar 26  2:00s
 			 3:00	Russia	+03/+04	1991 Mar 31  2:00s
@@ -2685,12 +2706,12 @@
 
 Zone Asia/Yekaterinburg	 4:02:33 -	LMT	1916 Jul  3
 			 3:45:05 -	PMT	1919 Jul 15  4:00
-			 4:00	-	SVET	1930 Jun 21 # Sverdlovsk Time
-			 5:00	Russia	SVE%sT	1991 Mar 31  2:00s
-			 4:00	Russia	SVE%sT	1992 Jan 19  2:00s
-			 5:00	Russia	YEK%sT	2011 Mar 27  2:00s
-			 6:00	-	YEKT	2014 Oct 26  2:00s
-			 5:00	-	YEKT
+			 4:00	-	+04	1930 Jun 21
+			 5:00	Russia	+05/+06	1991 Mar 31  2:00s
+			 4:00	Russia	+04/+05	1992 Jan 19  2:00s
+			 5:00	Russia	+05/+06	2011 Mar 27  2:00s
+			 6:00	-	+06	2014 Oct 26  2:00s
+			 5:00	-	+05
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25):
@@ -2700,12 +2721,12 @@
 # Byalokoz 1919 says Omsk was 4:53:30.
 
 Zone Asia/Omsk		 4:53:30 -	LMT	1919 Nov 14
-			 5:00	-	OMST	1930 Jun 21 # Omsk Time
-			 6:00	Russia	OMS%sT	1991 Mar 31  2:00s
-			 5:00	Russia	OMS%sT	1992 Jan 19  2:00s
-			 6:00	Russia	OMS%sT	2011 Mar 27  2:00s
-			 7:00	-	OMST	2014 Oct 26  2:00s
-			 6:00	-	OMST
+			 5:00	-	+05	1930 Jun 21
+			 6:00	Russia	+06/+07	1991 Mar 31  2:00s
+			 5:00	Russia	+05/+06	1992 Jan 19  2:00s
+			 6:00	Russia	+06/+07	2011 Mar 27  2:00s
+			 7:00	-	+07	2014 Oct 26  2:00s
+			 6:00	-	+06
 
 # From Paul Eggert (2016-02-22):
 # Asia/Barnaul covers:
@@ -2785,7 +2806,7 @@
 # Note that time belts (numbered from 2 (Moscow) to 12 according to their
 # GMT/UTC offset and having too many exceptions like regions formally
 # belonging to one belt but using time from another) were replaced
-# with time zones in 2011 with different numberings (there was a
+# with time zones in 2011 with different numbering (there was a
 # 2-hour gap between second and third zones in 2011-2014).
 
 # From Stepan Golosunov (2016-04-12):
@@ -2868,12 +2889,12 @@
 # Byalokoz 1919 says Krasnoyarsk was 6:11:26.
 
 Zone Asia/Krasnoyarsk	 6:11:26 -	LMT	1920 Jan  6
-			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
-			 7:00	Russia	KRA%sT	1991 Mar 31  2:00s
-			 6:00	Russia	KRA%sT	1992 Jan 19  2:00s
-			 7:00	Russia	KRA%sT	2011 Mar 27  2:00s
-			 8:00	-	KRAT	2014 Oct 26  2:00s
-			 7:00	-	KRAT
+			 6:00	-	+06	1930 Jun 21
+			 7:00	Russia	+07/+08	1991 Mar 31  2:00s
+			 6:00	Russia	+06/+07	1992 Jan 19  2:00s
+			 7:00	Russia	+07/+08	2011 Mar 27  2:00s
+			 8:00	-	+08	2014 Oct 26  2:00s
+			 7:00	-	+07
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25):
@@ -2890,12 +2911,12 @@
 
 Zone Asia/Irkutsk	 6:57:05 -	LMT	1880
 			 6:57:05 -	IMT	1920 Jan 25 # Irkutsk Mean Time
-			 7:00	-	IRKT	1930 Jun 21 # Irkutsk Time
-			 8:00	Russia	IRK%sT	1991 Mar 31  2:00s
-			 7:00	Russia	IRK%sT	1992 Jan 19  2:00s
-			 8:00	Russia	IRK%sT	2011 Mar 27  2:00s
-			 9:00	-	IRKT	2014 Oct 26  2:00s
-			 8:00	-	IRKT
+			 7:00	-	+07	1930 Jun 21
+			 8:00	Russia	+08/+09	1991 Mar 31  2:00s
+			 7:00	Russia	+07/+08	1992 Jan 19  2:00s
+			 8:00	Russia	+08/+09	2011 Mar 27  2:00s
+			 9:00	-	+09	2014 Oct 26  2:00s
+			 8:00	-	+08
 
 
 # From Tim Parenti (2014-07-06):
@@ -2912,13 +2933,13 @@
 # http://publication.pravo.gov.ru/Document/View/0001201512300107
 
 Zone Asia/Chita	 7:33:52 -	LMT	1919 Dec 15
-			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
-			 9:00	Russia	YAK%sT	1991 Mar 31  2:00s
-			 8:00	Russia	YAK%sT	1992 Jan 19  2:00s
-			 9:00	Russia	YAK%sT	2011 Mar 27  2:00s
-			10:00	-	YAKT	2014 Oct 26  2:00s
-			 8:00	-	IRKT	2016 Mar 27  2:00
-			 9:00	-	YAKT
+			 8:00	-	+08	1930 Jun 21
+			 9:00	Russia	+09/+10	1991 Mar 31  2:00s
+			 8:00	Russia	+08/+09	1992 Jan 19  2:00s
+			 9:00	Russia	+09/+10	2011 Mar 27  2:00s
+			10:00	-	+10	2014 Oct 26  2:00s
+			 8:00	-	+08	2016 Mar 27  2:00
+			 9:00	-	+09
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29):
@@ -2958,12 +2979,12 @@
 # Byalokoz 1919 says Yakutsk was 8:38:58.
 
 Zone Asia/Yakutsk	 8:38:58 -	LMT	1919 Dec 15
-			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
-			 9:00	Russia	YAK%sT	1991 Mar 31  2:00s
-			 8:00	Russia	YAK%sT	1992 Jan 19  2:00s
-			 9:00	Russia	YAK%sT	2011 Mar 27  2:00s
-			10:00	-	YAKT	2014 Oct 26  2:00s
-			 9:00	-	YAKT
+			 8:00	-	+08	1930 Jun 21
+			 9:00	Russia	+09/+10	1991 Mar 31  2:00s
+			 8:00	Russia	+08/+09	1992 Jan 19  2:00s
+			 9:00	Russia	+09/+10	2011 Mar 27  2:00s
+			10:00	-	+10	2014 Oct 26  2:00s
+			 9:00	-	+09
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29):
@@ -2981,12 +3002,12 @@
 # Go with Byalokoz.
 
 Zone Asia/Vladivostok	 8:47:31 -	LMT	1922 Nov 15
-			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
-			10:00	Russia	VLA%sT	1991 Mar 31  2:00s
-			 9:00	Russia	VLA%sT	1992 Jan 19  2:00s
-			10:00	Russia	VLA%sT	2011 Mar 27  2:00s
-			11:00	-	VLAT	2014 Oct 26  2:00s
-			10:00	-	VLAT
+			 9:00	-	+09	1930 Jun 21
+			10:00	Russia	+10/+11	1991 Mar 31  2:00s
+			 9:00	Russia	+09/+10	1992 Jan 19  2:00s
+			10:00	Russia	+10/+11	2011 Mar 27  2:00s
+			11:00	-	+11	2014 Oct 26  2:00s
+			10:00	-	+10
 
 
 # From Tim Parenti (2014-07-03):
@@ -3004,14 +3025,14 @@
 # This transition is no doubt wrong, but we have no better info.
 
 Zone Asia/Khandyga	 9:02:13 -	LMT	1919 Dec 15
-			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
-			 9:00	Russia	YAK%sT	1991 Mar 31  2:00s
-			 8:00	Russia	YAK%sT	1992 Jan 19  2:00s
-			 9:00	Russia	YAK%sT	2004
-			10:00	Russia	VLA%sT	2011 Mar 27  2:00s
-			11:00	-	VLAT	2011 Sep 13  0:00s # Decree 725?
-			10:00	-	YAKT	2014 Oct 26  2:00s
-			 9:00	-	YAKT
+			 8:00	-	+08	1930 Jun 21
+			 9:00	Russia	+09/+10	1991 Mar 31  2:00s
+			 8:00	Russia	+08/+09	1992 Jan 19  2:00s
+			 9:00	Russia	+09/+10	2004
+			10:00	Russia	+10/+11	2011 Mar 27  2:00s
+			11:00	-	+11	2011 Sep 13  0:00s # Decree 725?
+			10:00	-	+10	2014 Oct 26  2:00s
+			 9:00	-	+09
 
 
 # From Tim Parenti (2014-07-03):
@@ -3027,15 +3048,14 @@
 
 # The Zone name should be Asia/Yuzhno-Sakhalinsk, but that's too long.
 Zone Asia/Sakhalin	 9:30:48 -	LMT	1905 Aug 23
-			 9:00	-	JCST	1937 Oct  1
-			 9:00	-	JST	1945 Aug 25
-			11:00	Russia	SAK%sT	1991 Mar 31  2:00s # Sakhalin T
-			10:00	Russia	SAK%sT	1992 Jan 19  2:00s
-			11:00	Russia	SAK%sT	1997 Mar lastSun  2:00s
-			10:00	Russia	SAK%sT	2011 Mar 27  2:00s
-			11:00	-	SAKT	2014 Oct 26  2:00s
-			10:00	-	SAKT	2016 Mar 27  2:00s
-			11:00	-	SAKT
+			 9:00	-	+09	1945 Aug 25
+			11:00	Russia	+11/+12	1991 Mar 31  2:00s # Sakhalin T
+			10:00	Russia	+10/+11	1992 Jan 19  2:00s
+			11:00	Russia	+11/+12	1997 Mar lastSun  2:00s
+			10:00	Russia	+10/+11	2011 Mar 27  2:00s
+			11:00	-	+11	2014 Oct 26  2:00s
+			10:00	-	+10	2016 Mar 27  2:00s
+			11:00	-	+11
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29):
@@ -3058,13 +3078,13 @@
 # http://publication.pravo.gov.ru/Document/View/0001201604050038
 
 Zone Asia/Magadan	10:03:12 -	LMT	1924 May  2
-			10:00	-	MAGT	1930 Jun 21 # Magadan Time
-			11:00	Russia	MAG%sT	1991 Mar 31  2:00s
-			10:00	Russia	MAG%sT	1992 Jan 19  2:00s
-			11:00	Russia	MAG%sT	2011 Mar 27  2:00s
-			12:00	-	MAGT	2014 Oct 26  2:00s
-			10:00	-	MAGT	2016 Apr 24  2:00s
-			11:00	-	MAGT
+			10:00	-	+10	1930 Jun 21 # Magadan Time
+			11:00	Russia	+11/+12	1991 Mar 31  2:00s
+			10:00	Russia	+10/+11	1992 Jan 19  2:00s
+			11:00	Russia	+11/+12	2011 Mar 27  2:00s
+			12:00	-	+12	2014 Oct 26  2:00s
+			10:00	-	+10	2016 Apr 24  2:00s
+			11:00	-	+11
 
 
 # From Tim Parenti (2014-07-06):
@@ -3107,17 +3127,14 @@
 # in Russian.)  In addition, Srednekolymsk appears to be a much older
 # settlement and the population of Zyryanka seems to be declining.
 # Go with Srednekolymsk.
-#
-# Since Magadan Oblast moves to UTC+10 on 2014-10-26, we cannot keep using MAGT
-# as the abbreviation.  Use SRET instead.
 
 Zone Asia/Srednekolymsk	10:14:52 -	LMT	1924 May  2
-			10:00	-	MAGT	1930 Jun 21 # Magadan Time
-			11:00	Russia	MAG%sT	1991 Mar 31  2:00s
-			10:00	Russia	MAG%sT	1992 Jan 19  2:00s
-			11:00	Russia	MAG%sT	2011 Mar 27  2:00s
-			12:00	-	MAGT	2014 Oct 26  2:00s
-			11:00	-	SRET	# Srednekolymsk Time
+			10:00	-	+10	1930 Jun 21
+			11:00	Russia	+11/+12	1991 Mar 31  2:00s
+			10:00	Russia	+10/+11	1992 Jan 19  2:00s
+			11:00	Russia	+11/+12	2011 Mar 27  2:00s
+			12:00	-	+12	2014 Oct 26  2:00s
+			11:00	-	+11
 
 
 # From Tim Parenti (2014-07-03):
@@ -3135,14 +3152,14 @@
 # UTC+12 since at least then, too.
 
 Zone Asia/Ust-Nera	 9:32:54 -	LMT	1919 Dec 15
-			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
-			 9:00	Russia	YAKT	1981 Apr  1
-			11:00	Russia	MAG%sT	1991 Mar 31  2:00s
-			10:00	Russia	MAG%sT	1992 Jan 19  2:00s
-			11:00	Russia	MAG%sT	2011 Mar 27  2:00s
-			12:00	-	MAGT	2011 Sep 13  0:00s # Decree 725?
-			11:00	-	VLAT	2014 Oct 26  2:00s
-			10:00	-	VLAT
+			 8:00	-	+08	1930 Jun 21
+			 9:00	Russia	+09/+10	1981 Apr  1
+			11:00	Russia	+11/+12	1991 Mar 31  2:00s
+			10:00	Russia	+10/+11	1992 Jan 19  2:00s
+			11:00	Russia	+11/+12	2011 Mar 27  2:00s
+			12:00	-	+12	2011 Sep 13  0:00s # Decree 725?
+			11:00	-	+11	2014 Oct 26  2:00s
+			10:00	-	+10
 
 
 # From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25):
@@ -3155,12 +3172,12 @@
 # The Zone name should be Asia/Petropavlovsk-Kamchatski or perhaps
 # Asia/Petropavlovsk-Kamchatsky, but these are too long.
 Zone Asia/Kamchatka	10:34:36 -	LMT	1922 Nov 10
-			11:00	-	PETT	1930 Jun 21 # P-K Time
-			12:00	Russia	PET%sT	1991 Mar 31  2:00s
-			11:00	Russia	PET%sT	1992 Jan 19  2:00s
-			12:00	Russia	PET%sT	2010 Mar 28  2:00s
-			11:00	Russia	PET%sT	2011 Mar 27  2:00s
-			12:00	-	PETT
+			11:00	-	+11	1930 Jun 21
+			12:00	Russia	+12/+13	1991 Mar 31  2:00s
+			11:00	Russia	+11/+12	1992 Jan 19  2:00s
+			12:00	Russia	+12/+13	2010 Mar 28  2:00s
+			11:00	Russia	+11/+12	2011 Mar 27  2:00s
+			12:00	-	+12
 
 
 # From Tim Parenti (2014-07-03):
@@ -3168,13 +3185,13 @@
 # 87	RU-CHU	Chukotka Autonomous Okrug
 
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
-			12:00	-	ANAT	1930 Jun 21 # Anadyr Time
-			13:00	Russia	ANA%sT	1982 Apr  1  0:00s
-			12:00	Russia	ANA%sT	1991 Mar 31  2:00s
-			11:00	Russia	ANA%sT	1992 Jan 19  2:00s
-			12:00	Russia	ANA%sT	2010 Mar 28  2:00s
-			11:00	Russia	ANA%sT	2011 Mar 27  2:00s
-			12:00	-	ANAT
+			12:00	-	+12	1930 Jun 21
+			13:00	Russia	+13/+14	1982 Apr  1  0:00s
+			12:00	Russia	+12/+13	1991 Mar 31  2:00s
+			11:00	Russia	+11/+12	1992 Jan 19  2:00s
+			12:00	Russia	+12/+13	2010 Mar 28  2:00s
+			11:00	Russia	+11/+12	2011 Mar 27  2:00s
+			12:00	-	+12
 
 
 # San Marino
@@ -3495,6 +3512,14 @@
 # Engineered Standard Time," said Twitter user @aysekarahasan.
 # http://www.bbc.com/news/world-europe-34631326
 
+# From Burak AYDIN (2016-09-08):
+# Turkey will stay in Daylight Saving Time even in winter....
+# http://www.resmigazete.gov.tr/eskiler/2016/09/20160908-2.pdf
+#
+# From Paul Eggert (2016-09-07):
+# The change is permanent, so this is the new standard time in Turkey.
+# It takes effect today, which is not much notice.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
 Rule	Turkey	1916	only	-	Oct	 1	0:00	0	-
@@ -3558,7 +3583,7 @@
 Zone	Europe/Istanbul	1:55:52 -	LMT	1880
 			1:56:56	-	IMT	1910 Oct # Istanbul Mean Time?
 			2:00	Turkey	EE%sT	1978 Oct 15
-			3:00	Turkey	TR%sT	1985 Apr 20 # Turkey Time
+			3:00	Turkey	+03/+04	1985 Apr 20
 			2:00	Turkey	EE%sT	2007
 			2:00	EU	EE%sT	2011 Mar 27  1:00u
 			2:00	-	EET	2011 Mar 28  1:00u
@@ -3566,7 +3591,8 @@
 			2:00	-	EET	2014 Mar 31  1:00u
 			2:00	EU	EE%sT	2015 Oct 25  1:00u
 			2:00	1:00	EEST	2015 Nov  8  1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2016 Sep  7
+			3:00	-	+03
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
 # Ukraine
--- a/make/data/tzdata/factory	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/factory	Thu Oct 13 09:02:13 2016 -0700
@@ -24,9 +24,10 @@
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
-# For companies who don't want to put time zone specification in
-# their installation procedures.  When users run date, they'll get the message.
-# Also useful for the "comp.sources" version.
+# For distributors who don't want to put time zone specification in
+# their installation procedures.  Users that run 'date' will get the
+# time zone abbreviation "-00", indicating that the actual time zone
+# is unknown.
 
 # Zone	NAME	GMTOFF	RULES	FORMAT
-Zone	Factory	0	- "Local time zone must be set--see zic manual page"
+Zone	Factory	0	-	-00
--- a/make/data/tzdata/leapseconds	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/leapseconds	Thu Oct 13 09:02:13 2016 -0700
@@ -79,6 +79,7 @@
 Leap	2008	Dec	31	23:59:60	+	S
 Leap	2012	Jun	30	23:59:60	+	S
 Leap	2015	Jun	30	23:59:60	+	S
+Leap	2016	Dec	31	23:59:60	+	S
 
-#	Updated through IERS Bulletin C51
-#	File expires on:  28 December 2016
+#	Updated through IERS Bulletin C52
+#	File expires on:  28 June 2017
--- a/make/data/tzdata/northamerica	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/northamerica	Thu Oct 13 09:02:13 2016 -0700
@@ -436,11 +436,42 @@
 # north of the Salmon River, and the towns of Burgdorf and Warren),
 # Nevada (except West Wendover), Oregon (except the northern 3/4 of
 # Malheur county), and Washington
+
+# From Paul Eggert (2016-08-20):
+# In early February 1948, in response to California's electricity shortage,
+# PG&E changed power frequency from 60 to 59.5 Hz during daylight hours,
+# causing electric clocks to lose six minutes per day.  (This did not change
+# legal time, and is not part of the data here.)  See:
+# Ross SA. An energy crisis from the past: Northern California in 1948.
+# Working Paper No. 8, Institute of Governmental Studies, UC Berkeley,
+# 1973-11.  http://escholarship.org/uc/item/8x22k30c
+#
+# In another measure to save electricity, DST was instituted from 1948-03-14
+# at 02:01 to 1949-01-16 at 02:00, with the governor having the option to move
+# the fallback transition earlier.  See pages 3-4 of:
+# http://clerk.assembly.ca.gov/sites/clerk.assembly.ca.gov/files/archive/Statutes/1948/48Vol1_Chapters.pdf
+#
+# In response:
+#
+#   Governor Warren received a torrent of objecting mail, and it is not too much
+#   to speculate that the objections to Daylight Saving Time were one important
+#   factor in the defeat of the Dewey-Warren Presidential ticket in California.
+#     -- Ross, p 25
+#
+# On December 8 the governor exercised the option, setting the date to January 1
+# (LA Times 1948-12-09).  The transition time was 02:00 (LA Times 1949-01-01).
+#
+# Despite the controversy, in 1949 California voters approved Proposition 12,
+# which established DST from April's last Sunday at 01:00 until September's
+# last Sunday at 02:00. This was amended by 1962's Proposition 6, which changed
+# the fall-back date to October's last Sunday. See:
+# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1501&context=ca_ballot_props
+# http://repository.uchastings.edu/cgi/viewcontent.cgi?article=1636&context=ca_ballot_props
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
-Rule	CA	1948	only	-	Mar	14	2:00	1:00	D
+Rule	CA	1948	only	-	Mar	14	2:01	1:00	D
 Rule	CA	1949	only	-	Jan	 1	2:00	0	S
-Rule	CA	1950	1966	-	Apr	lastSun	2:00	1:00	D
+Rule	CA	1950	1966	-	Apr	lastSun	1:00	1:00	D
 Rule	CA	1950	1961	-	Sep	lastSun	2:00	0	S
 Rule	CA	1962	1966	-	Oct	lastSun	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -3304,7 +3335,7 @@
 # indicating that the normal ET rules are followed.
 #
 # From Paul Eggert (2014-08-19):
-# The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round.  See:
+# The 2014-08-13 Cabinet meeting decided to stay on UT -04 year-round.  See:
 # http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm
 # Model this as a switch from EST/EDT to AST ...
 # From Chris Walton (2014-11-04):
--- a/make/data/tzdata/southamerica	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/southamerica	Thu Oct 13 09:02:13 2016 -0700
@@ -433,9 +433,9 @@
 # stuck on Summer daylight savings time even though the summer is over.
 
 # From Paul Eggert (2013-09-05):
-# Perhaps San Luis operates on the legal fiction that it is at UTC-4
+# Perhaps San Luis operates on the legal fiction that it is at -04
 # with perpetual summer time, but ordinary usage typically seems to
-# just say it's at UTC-3; see, for example,
+# just say it's at -03; see, for example,
 # http://es.wikipedia.org/wiki/Hora_oficial_argentina
 # We've documented similar situations as being plain changes to
 # standard time, so let's do that here too.  This does not change UTC
--- a/make/data/tzdata/zone.tab	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/data/tzdata/zone.tab	Thu Oct 13 09:02:13 2016 -0700
@@ -284,7 +284,7 @@
 MH	+0905+16720	Pacific/Kwajalein	Kwajalein
 MK	+4159+02126	Europe/Skopje
 ML	+1239-00800	Africa/Bamako
-MM	+1647+09610	Asia/Rangoon
+MM	+1647+09610	Asia/Yangon
 MN	+4755+10653	Asia/Ulaanbaatar	Mongolia (most areas)
 MN	+4801+09139	Asia/Hovd	Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
 MN	+4804+11430	Asia/Choibalsan	Dornod, Sukhbaatar
--- a/make/gendata/GendataBreakIterator.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gendata/GendataBreakIterator.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/gendata/GendataHtml32dtd.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gendata/GendataHtml32dtd.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/gensrc/Gensrc-java.base.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/Gensrc-java.base.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/gensrc/Gensrc-jdk.jlink.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/Gensrc-jdk.jlink.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, 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/make/gensrc/GensrcIcons.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/GensrcIcons.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/gensrc/GensrcLocaleData.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/GensrcLocaleData.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/gensrc/GensrcModuleLoaderMap.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/GensrcModuleLoaderMap.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, 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/make/gensrc/GensrcVarHandles.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/gensrc/GensrcVarHandles.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, 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/make/launcher/Launcher-java.scripting.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-java.scripting.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/launcher/Launcher-jdk.compiler.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.compiler.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/launcher/Launcher-jdk.javadoc.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.javadoc.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/launcher/Launcher-jdk.jdeps.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.jdeps.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, 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/make/launcher/Launcher-jdk.jlink.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.jlink.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, 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/make/launcher/Launcher-jdk.jstatd.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.jstatd.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/launcher/Launcher-jdk.pack200.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.pack200.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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
@@ -58,10 +58,6 @@
 
 endif
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
-  UNPACKEXE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
-endif
-
 UNPACK_MAPFILE_DIR := $(JDK_TOPDIR)/make/mapfiles/libunpack
 UNPACK_MAPFILE_PLATFORM_FILE := \
     $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH)
@@ -79,7 +75,7 @@
 
 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
     SRC := $(UNPACKEXE_SRC), \
-    TOOLCHAIN := $(UNPACKEXE_TOOLCHAIN), \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) -DFULL, \
     CFLAGS_release := -DPRODUCT, \
--- a/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/lib/CoreLibraries.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/lib/CoreLibraries.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -236,10 +236,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), aix)
-  LIBJIMAGE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
-endif # OPENJDK_TARGET_OS aix
-
 JIMAGELIB_CPPFLAGS := \
     -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
     -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
@@ -249,7 +245,7 @@
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
     LIBRARY := jimage, \
-    TOOLCHAIN := $(LIBJIMAGE_TOOLCHAIN), \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     OPTIMIZATION := LOW, \
     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libjimage \
@@ -259,7 +255,7 @@
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
     CFLAGS_unix := -UDEBUG, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
-    LDFLAGS := $(LDFLAGS_JDKLIB) \
+    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
         -export:JIMAGE_PackageToModule \
--- a/make/lib/Lib-java.desktop.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/lib/Lib-java.desktop.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/mapfiles/libnet/mapfile-vers	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/mapfiles/libnet/mapfile-vers	Thu Oct 13 09:02:13 2016 -0700
@@ -98,7 +98,6 @@
 		Java_sun_net_sdp_SdpSupport_create0;
 		Java_sun_net_spi_DefaultProxySelector_init;
 		Java_sun_net_spi_DefaultProxySelector_getSystemProxy;
-		NET_AllocSockaddr;
 		NET_SockaddrToInetAddress;
                 NET_SockaddrEqualsInetAddress;
 		NET_InetAddressToSockaddr;
--- a/make/rmic/Rmic-java.management.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/rmic/Rmic-java.management.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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/make/rmic/RmicCommon.gmk	Wed Sep 28 11:07:32 2016 +0200
+++ b/make/rmic/RmicCommon.gmk	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, 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
@@ -37,7 +37,7 @@
   RMIC_MAIN_CLASS := sun.rmi.rmic.Main
 endif
 
-RMIC := $(JAVA) $(INTERIM_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS)
+RMIC := $(JAVA_SMALL) $(INTERIM_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS)
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
 # NOTE: If the smart javac dependency management is reintroduced, these classes risk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/src/classes/build/tools/jigsaw/AddPackagesAttribute.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.jigsaw;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Optional;
+import java.util.Set;
+
+import jdk.internal.module.ModuleInfoExtender;
+
+/**
+ * Adds the Packages class file attribute to each module-info.class in an
+ * exploded build.
+ */
+
+public class AddPackagesAttribute {
+
+    public static void main(String[] args) throws IOException {
+
+        if (args.length != 1) {
+            System.err.println("Usage AddPackagesAttribute exploded-java-home");
+            System.exit(-1);
+        }
+
+        String home = args[0];
+        Path dir = Paths.get(home, "modules");
+
+        ModuleFinder finder = ModuleFinder.of(dir);
+
+        try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
+            for (Path entry : stream) {
+                Path mi = entry.resolve("module-info.class");
+                if (Files.isRegularFile(mi)) {
+                    String mn = entry.getFileName().toString();
+                    Optional<ModuleReference> omref = finder.find(mn);
+                    if (omref.isPresent()) {
+                        Set<String> packages = omref.get().descriptor().conceals();
+                        addPackagesAttribute(mi, packages);
+                    }
+                }
+            }
+        }
+    }
+
+    static void addPackagesAttribute(Path mi, Set<String> packages) throws IOException {
+        byte[] bytes;
+        try (InputStream in = Files.newInputStream(mi)) {
+            ModuleInfoExtender extender = ModuleInfoExtender.newExtender(in);
+            extender.conceals(packages);
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            extender.write(baos);
+            bytes = baos.toByteArray();
+        }
+
+        Files.write(mi, bytes);
+    }
+
+}
--- a/src/java.base/share/classes/java/io/FilePermission.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/io/FilePermission.java	Thu Oct 13 09:02:13 2016 -0700
@@ -25,11 +25,20 @@
 
 package java.io;
 
+import java.net.URI;
+import java.nio.file.*;
 import java.security.*;
 import java.util.Enumeration;
+import java.util.Objects;
 import java.util.StringJoiner;
 import java.util.Vector;
 import java.util.concurrent.ConcurrentHashMap;
+
+import jdk.internal.misc.JavaIOFilePermissionAccess;
+import jdk.internal.misc.SharedSecrets;
+import sun.nio.fs.DefaultFileSystemProvider;
+import sun.security.action.GetPropertyAction;
+import sun.security.util.FilePermCompat;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -41,8 +50,11 @@
  * the file separator character, <code>File.separatorChar</code>) indicates
  * all the files and directories contained in that directory. A pathname
  * that ends with "/-" indicates (recursively) all files
- * and subdirectories contained in that directory. A pathname consisting of
- * the special token "&lt;&lt;ALL FILES&gt;&gt;" matches <b>any</b> file.
+ * and subdirectories contained in that directory. Such a pathname is called
+ * a wildcard pathname. Otherwise, it's a simple pathname.
+ * <P>
+ * A pathname consisting of the special token {@literal "<<ALL FILES>>"}
+ * matches <b>any</b> file.
  * <P>
  * Note: A pathname consisting of a single "*" indicates all the files
  * in the current directory, while a pathname consisting of a single "-"
@@ -75,12 +87,12 @@
  * <P>
  * Be careful when granting FilePermissions. Think about the implications
  * of granting read and especially write access to various files and
- * directories. The "&lt;&lt;ALL FILES&gt;&gt;" permission with write action is
+ * directories. The {@literal "<<ALL FILES>>"} permission with write action is
  * especially dangerous. This grants permission to write to the entire
  * file system. One thing this effectively allows is replacement of the
  * system binary, including the JVM runtime environment.
- *
- * <p>Please note: Code can always read a file from the same
+ * <P>
+ * Please note: Code can always read a file from the same
  * directory it's in (or a subdirectory of that directory); it does not
  * need explicit permission to do so.
  *
@@ -145,34 +157,127 @@
     private String actions; // Left null as long as possible, then
                             // created and re-used in the getAction function.
 
-    // canonicalized dir path. In the case of
-    // directories, it is the name "/blah/*" or "/blah/-" without
-    // the last character (the "*" or "-").
+    // canonicalized dir path. used by the "old" behavior (nb == false).
+    // In the case of directories, it is the name "/blah/*" or "/blah/-"
+    // without the last character (the "*" or "-").
 
     private transient String cpath;
 
+    // Following fields used by the "new" behavior (nb == true), in which
+    // input path is not canonicalized. For compatibility (so that granting
+    // FilePermission on "x" allows reading "`pwd`/x", an alternative path
+    // can be added so that both can be used in an implies() check. Please note
+    // the alternative path only deals with absolute/relative path, and does
+    // not deal with symlink/target.
+
+    private transient Path npath;       // normalized dir path.
+    private transient Path npath2;      // alternative normalized dir path.
+    private transient boolean allFiles; // whether this is <<ALL FILES>>
+
     // static Strings used by init(int mask)
     private static final char RECURSIVE_CHAR = '-';
     private static final char WILD_CHAR = '*';
 
-/*
-    public String toString()
-    {
-        StringBuffer sb = new StringBuffer();
-        sb.append("***\n");
-        sb.append("cpath = "+cpath+"\n");
-        sb.append("mask = "+mask+"\n");
-        sb.append("actions = "+getActions()+"\n");
-        sb.append("directory = "+directory+"\n");
-        sb.append("recursive = "+recursive+"\n");
-        sb.append("***\n");
-        return sb.toString();
-    }
-*/
+//    public String toString() {
+//        StringBuffer sb = new StringBuffer();
+//        sb.append("*** FilePermission on " + getName() + " ***");
+//        for (Field f : FilePermission.class.getDeclaredFields()) {
+//            if (!Modifier.isStatic(f.getModifiers())) {
+//                try {
+//                    sb.append(f.getName() + " = " + f.get(this));
+//                } catch (Exception e) {
+//                    sb.append(f.getName() + " = " + e.toString());
+//                }
+//                sb.append('\n');
+//            }
+//        }
+//        sb.append("***\n");
+//        return sb.toString();
+//    }
 
     private static final long serialVersionUID = 7930732926638008763L;
 
     /**
+     * Always use the internal default file system, in case it was modified
+     * with java.nio.file.spi.DefaultFileSystemProvider.
+     */
+    private static final java.nio.file.FileSystem builtInFS =
+            DefaultFileSystemProvider.create()
+                    .getFileSystem(URI.create("file:///"));
+
+    /**
+     * Creates FilePermission objects with special internals.
+     * See {@link FilePermCompat#newPermPlusAltPath(Permission)} and
+     * {@link FilePermCompat#newPermUsingAltPath(Permission)}.
+     */
+
+    private static final Path here = builtInFS.getPath(
+            GetPropertyAction.privilegedGetProperty("user.dir"));
+
+    /**
+     * A private constructor like a clone, only npath2 is not touched.
+     * @param input
+     */
+    private FilePermission(FilePermission input) {
+        super(input.getName());
+        this.npath = input.npath;
+        this.actions = input.actions;
+        this.allFiles = input.allFiles;
+        this.recursive = input.recursive;
+        this.directory = input.directory;
+        this.cpath = input.cpath;
+        this.mask = input.mask;
+    }
+
+    /**
+     * Returns the alternative path as a Path object, i.e. absolute path
+     * for a relative one, or vice versa.
+     *
+     * @param in a real path w/o "-" or "*" at the end, and not <<ALL FILES>>.
+     * @return the alternative path, or null if cannot find one.
+     */
+    private static Path altPath(Path in) {
+        try {
+            if (!in.isAbsolute()) {
+                return here.resolve(in).normalize();
+            } else {
+                return here.relativize(in).normalize();
+            }
+        } catch (IllegalArgumentException e) {
+            return null;
+        }
+    }
+
+    static {
+        SharedSecrets.setJavaIOFilePermissionAccess(
+            new JavaIOFilePermissionAccess() {
+                public FilePermission newPermPlusAltPath(FilePermission input) {
+                    if (input.npath2 == null && !input.allFiles) {
+                        Path npath2 = altPath(input.npath);
+                        if (npath2 != null) {
+                            FilePermission np = new FilePermission(input);
+                            np.npath2 = npath2;
+                            return np;
+                        }
+                    }
+                    return input;
+                }
+                public FilePermission newPermUsingAltPath(FilePermission input) {
+                    if (!input.allFiles) {
+                        Path npath2 = altPath(input.npath);
+                        if (npath2 != null) {
+                            FilePermission np = new FilePermission(input);
+                            np.npath = npath2;
+                            return np;
+                        }
+                    }
+                    return null;
+                }
+            }
+        );
+    }
+
+    /**
      * initialize a FilePermission object. Common to all constructors.
      * Also called during de-serialization.
      *
@@ -186,60 +291,106 @@
         if (mask == NONE)
                 throw new IllegalArgumentException("invalid actions mask");
 
-        if ((cpath = getName()) == null)
+        if (FilePermCompat.nb) {
+            String name = getName();
+
+            if (name == null)
                 throw new NullPointerException("name can't be null");
 
-        this.mask = mask;
+            this.mask = mask;
 
-        if (cpath.equals("<<ALL FILES>>")) {
-            directory = true;
-            recursive = true;
-            cpath = "";
-            return;
+            if (name.equals("<<ALL FILES>>")) {
+                allFiles = true;
+                npath = builtInFS.getPath("");
+                // other fields remain default
+                return;
+            }
+
+            boolean rememberStar = false;
+            if (name.endsWith("*")) {
+                rememberStar = true;
+                recursive = false;
+                name = name.substring(0, name.length()-1) + "-";
+            }
+
+            try {
+                // new File() can "normalize" some name, for example, "/C:/X" on
+                // Windows. Some JDK codes generate such illegal names.
+                npath = builtInFS.getPath(new File(name).getPath())
+                        .normalize();
+            } catch (InvalidPathException ipe) {
+                // Still invalid. For compatibility reason, accept it
+                // but make this permission useless.
+                npath = builtInFS.getPath("-u-s-e-l-e-s-s-");
+                this.mask = NONE;
+            }
+
+            // lastName should always be non-null now
+            Path lastName = npath.getFileName();
+            if (lastName != null && lastName.toString().equals("-")) {
+                directory = true;
+                recursive = !rememberStar;
+                npath = npath.getParent();
+            }
+            if (npath == null) {
+                npath = builtInFS.getPath("");
+            }
+        } else {
+            if ((cpath = getName()) == null)
+                throw new NullPointerException("name can't be null");
+
+            this.mask = mask;
+
+            if (cpath.equals("<<ALL FILES>>")) {
+                directory = true;
+                recursive = true;
+                cpath = "";
+                return;
+            }
+
+            // store only the canonical cpath if possible
+            cpath = AccessController.doPrivileged(new PrivilegedAction<>() {
+                public String run() {
+                    try {
+                        String path = cpath;
+                        if (cpath.endsWith("*")) {
+                            // call getCanonicalPath with a path with wildcard character
+                            // replaced to avoid calling it with paths that are
+                            // intended to match all entries in a directory
+                            path = path.substring(0, path.length() - 1) + "-";
+                            path = new File(path).getCanonicalPath();
+                            return path.substring(0, path.length() - 1) + "*";
+                        } else {
+                            return new File(path).getCanonicalPath();
+                        }
+                    } catch (IOException ioe) {
+                        return cpath;
+                    }
+                }
+            });
+
+            int len = cpath.length();
+            char last = ((len > 0) ? cpath.charAt(len - 1) : 0);
+
+            if (last == RECURSIVE_CHAR &&
+                    cpath.charAt(len - 2) == File.separatorChar) {
+                directory = true;
+                recursive = true;
+                cpath = cpath.substring(0, --len);
+            } else if (last == WILD_CHAR &&
+                    cpath.charAt(len - 2) == File.separatorChar) {
+                directory = true;
+                //recursive = false;
+                cpath = cpath.substring(0, --len);
+            } else {
+                // overkill since they are initialized to false, but
+                // commented out here to remind us...
+                //directory = false;
+                //recursive = false;
+            }
+
+            // XXX: at this point the path should be absolute. die if it isn't?
         }
-
-        // store only the canonical cpath if possible
-        cpath = AccessController.doPrivileged(new PrivilegedAction<>() {
-            public String run() {
-                try {
-                    String path = cpath;
-                    if (cpath.endsWith("*")) {
-                        // call getCanonicalPath with a path with wildcard character
-                        // replaced to avoid calling it with paths that are
-                        // intended to match all entries in a directory
-                        path = path.substring(0, path.length()-1) + "-";
-                        path = new File(path).getCanonicalPath();
-                        return path.substring(0, path.length()-1) + "*";
-                    } else {
-                        return new File(path).getCanonicalPath();
-                    }
-                } catch (IOException ioe) {
-                    return cpath;
-                }
-            }
-        });
-
-        int len = cpath.length();
-        char last = ((len > 0) ? cpath.charAt(len - 1) : 0);
-
-        if (last == RECURSIVE_CHAR &&
-            cpath.charAt(len - 2) == File.separatorChar) {
-            directory = true;
-            recursive = true;
-            cpath = cpath.substring(0, --len);
-        } else if (last == WILD_CHAR &&
-            cpath.charAt(len - 2) == File.separatorChar) {
-            directory = true;
-            //recursive = false;
-            cpath = cpath.substring(0, --len);
-        } else {
-            // overkill since they are initialized to false, but
-            // commented out here to remind us...
-            //directory = false;
-            //recursive = false;
-        }
-
-        // XXX: at this point the path should be absolute. die if it isn't?
     }
 
     /**
@@ -254,7 +405,7 @@
      * indicates all the files and directories contained in that directory.
      * A pathname that ends with "/-" indicates (recursively) all files and
      * subdirectories contained in that directory. The special pathname
-     * "&lt;&lt;ALL FILES&gt;&gt;" matches any file.
+     * {@literal "<<ALL FILES>>"} matches any file.
      *
      * <p>A pathname consisting of a single "*" indicates all the files
      * in the current directory, while a pathname consisting of a single "-"
@@ -264,6 +415,28 @@
      *
      * <p>A pathname containing an empty string represents an empty path.
      *
+     * @implNote In this implementation, the
+     * {@code jdk.io.permissionsUseCanonicalPath} system property dictates how
+     * the {@code path} argument is processed and stored.
+     * <P>
+     * If the value of the system property is set to {@code true}, {@code path}
+     * is canonicalized and stored as a String object named {@code cpath}.
+     * This means a relative path is converted to an absolute path, a Windows
+     * DOS-style 8.3 path is expanded to a long path, and a symbolic link is
+     * resolved to its target, etc.
+     * <P>
+     * If the value of the system property is set to {@code false}, {@code path}
+     * is converted to a {@link java.nio.file.Path} object named {@code npath}
+     * after {@link Path#normalize() normalization}. No canonicalization is
+     * performed which means the underlying file system is not accessed.
+     * <P>
+     * In either case, the "*" or "-" character at the end of a wildcard
+     * {@code path} is removed before canonicalization or normalization.
+     * It is stored in a separate wildcard flag field.
+     * <P>
+     * The default value of the {@code jdk.io.permissionsUseCanonicalPath}
+     * system property is {@code false} in this implementation.
+     *
      * @param path the pathname of the file/directory.
      * @param actions the action string.
      *
@@ -305,6 +478,38 @@
      *      "/tmp/*" encompasses all files in the "/tmp" directory,
      *      including the one named "foo".
      * </ul>
+     * <P>
+     * Precisely, a simple pathname implies another simple pathname
+     * if and only if they are equal. A simple pathname never implies
+     * a wildcard pathname. A wildcard pathname implies another wildcard
+     * pathname if and only if all simple pathnames implied by the latter
+     * are implied by the former. A wildcard pathname implies a simple
+     * pathname if and only if
+     * <ul>
+     *     <li>if the wildcard flag is "*", the simple pathname's path
+     *     must be right inside the wildcard pathname's path.
+     *     <li>if the wildcard flag is "-", the simple pathname's path
+     *     must be recursively inside the wildcard pathname's path.
+     * </ul>
+     * <P>
+     * {@literal "<<ALL FILES>>"} implies every other pathname. No pathname,
+     * except for {@literal "<<ALL FILES>>"} itself, implies
+     * {@literal "<<ALL FILES>>"}.
+     *
+     * @implNote
+     * If {@code jdk.io.permissionsUseCanonicalPath} is {@code true}, a
+     * simple {@code cpath} is inside a wildcard {@code cpath} if and only if
+     * after removing the base name (the last name in the pathname's name
+     * sequence) from the former the remaining part equals to the latter,
+     * a simple {@code cpath} is recursively inside a wildcard {@code cpath}
+     * if and only if the former starts with the latter.
+     * <p>
+     * If {@code jdk.io.permissionsUseCanonicalPath} is {@code false}, a
+     * simple {@code npath} is inside a wildcard {@code npath} if and only if
+     * {@code  simple_npath.relativize(wildcard_npath)} is exactly "..",
+     * a simple {@code npath} is recursively inside a wildcard {@code npath}
+     * if and only if {@code simple_npath.relativize(wildcard_npath)}
+     * is a series of one or more "..".
      *
      * @param p the permission to check against.
      *
@@ -334,45 +539,125 @@
      * @return the effective mask
      */
     boolean impliesIgnoreMask(FilePermission that) {
-        if (this.directory) {
-            if (this.recursive) {
-                // make sure that.path is longer then path so
-                // something like /foo/- does not imply /foo
-                if (that.directory) {
-                    return (that.cpath.length() >= this.cpath.length()) &&
-                            that.cpath.startsWith(this.cpath);
-                }  else {
-                    return ((that.cpath.length() > this.cpath.length()) &&
-                        that.cpath.startsWith(this.cpath));
+        if (FilePermCompat.nb) {
+            if (allFiles) {
+                return true;
+            }
+            if (that.allFiles) {
+                return false;
+            }
+            // Left at least same level of wildness as right
+            if ((this.recursive && that.recursive) != that.recursive
+                    || (this.directory && that.directory) != that.directory) {
+                return false;
+            }
+            // Same npath is good as long as both or neither are directories
+            if (this.npath.equals(that.npath)
+                    && this.directory == that.directory) {
+                return true;
+            }
+            int diff = containsPath(this.npath, that.npath);
+            // Right inside left is good if recursive
+            if (diff >= 1 && recursive) {
+                return true;
+            }
+            // Right right inside left if it is element in set
+            if (diff == 1 && directory && !that.directory) {
+                return true;
+            }
+
+            // Hack: if a npath2 field exists, apply the same checks
+            // on it as a fallback.
+            if (this.npath2 != null) {
+                if (this.npath2.equals(that.npath)
+                        && this.directory == that.directory) {
+                    return true;
                 }
-            } else {
-                if (that.directory) {
-                    // if the permission passed in is a directory
-                    // specification, make sure that a non-recursive
-                    // permission (i.e., this object) can't imply a recursive
-                    // permission.
-                    if (that.recursive)
-                        return false;
-                    else
-                        return (this.cpath.equals(that.cpath));
+                diff = containsPath(this.npath2, that.npath);
+                if (diff >= 1 && recursive) {
+                    return true;
+                }
+                if (diff == 1 && directory && !that.directory) {
+                    return true;
+                }
+            }
+
+            return false;
+        } else {
+            if (this.directory) {
+                if (this.recursive) {
+                    // make sure that.path is longer then path so
+                    // something like /foo/- does not imply /foo
+                    if (that.directory) {
+                        return (that.cpath.length() >= this.cpath.length()) &&
+                                that.cpath.startsWith(this.cpath);
+                    } else {
+                        return ((that.cpath.length() > this.cpath.length()) &&
+                                that.cpath.startsWith(this.cpath));
+                    }
                 } else {
-                    int last = that.cpath.lastIndexOf(File.separatorChar);
-                    if (last == -1)
-                        return false;
-                    else {
-                        // this.cpath.equals(that.cpath.substring(0, last+1));
-                        // Use regionMatches to avoid creating new string
-                        return (this.cpath.length() == (last + 1)) &&
-                            this.cpath.regionMatches(0, that.cpath, 0, last+1);
+                    if (that.directory) {
+                        // if the permission passed in is a directory
+                        // specification, make sure that a non-recursive
+                        // permission (i.e., this object) can't imply a recursive
+                        // permission.
+                        if (that.recursive)
+                            return false;
+                        else
+                            return (this.cpath.equals(that.cpath));
+                    } else {
+                        int last = that.cpath.lastIndexOf(File.separatorChar);
+                        if (last == -1)
+                            return false;
+                        else {
+                            // this.cpath.equals(that.cpath.substring(0, last+1));
+                            // Use regionMatches to avoid creating new string
+                            return (this.cpath.length() == (last + 1)) &&
+                                    this.cpath.regionMatches(0, that.cpath, 0, last + 1);
+                        }
                     }
                 }
+            } else if (that.directory) {
+                // if this is NOT recursive/wildcarded,
+                // do not let it imply a recursive/wildcarded permission
+                return false;
+            } else {
+                return (this.cpath.equals(that.cpath));
             }
-        } else if (that.directory) {
-            // if this is NOT recursive/wildcarded,
-            // do not let it imply a recursive/wildcarded permission
-            return false;
-        } else {
-            return (this.cpath.equals(that.cpath));
+        }
+    }
+
+    /**
+     * Returns the depth between an outer path p1 and an inner path p2. -1
+     * is returned if
+     *
+     * - p1 does not contains p2.
+     * - this is not decidable. For example, p1="../x", p2="y".
+     * - the depth is not decidable. For example, p1="/", p2="x".
+     *
+     * This method can return 2 if the depth is greater than 2.
+     *
+     * @param p1 the expected outer path, normalized
+     * @param p2 the expected inner path, normalized
+     * @return the depth in between
+     */
+    private static int containsPath(Path p1, Path p2) {
+        Path p;
+        try {
+            p = p2.relativize(p1).normalize();
+            if (p.getName(0).toString().isEmpty()) {
+                return 0;
+            } else {
+                for (Path item: p) {
+                    String s = item.toString();
+                    if (!s.equals("..")) {
+                        return -1;
+                    }
+                }
+                return p.getNameCount();
+            }
+        } catch (IllegalArgumentException iae) {
+            return -1;
         }
     }
 
@@ -380,6 +665,12 @@
      * Checks two FilePermission objects for equality. Checks that <i>obj</i> is
      * a FilePermission, and has the same pathname and actions as this object.
      *
+     * @implNote More specifically, two pathnames are the same if and only if
+     * they have the same wildcard flag and their {@code cpath}
+     * (if {@code jdk.io.permissionsUseCanonicalPath} is {@code true}) or
+     * {@code npath} (if {@code jdk.io.permissionsUseCanonicalPath}
+     * is {@code false}) are equal. Or they are both {@literal "<<ALL FILES>>"}.
+     *
      * @param obj the object we are testing for equality with this object.
      * @return <code>true</code> if obj is a FilePermission, and has the same
      *          pathname and actions as this FilePermission object,
@@ -395,10 +686,18 @@
 
         FilePermission that = (FilePermission) obj;
 
-        return (this.mask == that.mask) &&
-            this.cpath.equals(that.cpath) &&
-            (this.directory == that.directory) &&
-            (this.recursive == that.recursive);
+        if (FilePermCompat.nb) {
+            return (this.mask == that.mask) &&
+                    (this.allFiles == that.allFiles) &&
+                    this.npath.equals(that.npath) &&
+                    (this.directory == that.directory) &&
+                    (this.recursive == that.recursive);
+        } else {
+            return (this.mask == that.mask) &&
+                    this.cpath.equals(that.cpath) &&
+                    (this.directory == that.directory) &&
+                    (this.recursive == that.recursive);
+        }
     }
 
     /**
@@ -408,7 +707,11 @@
      */
     @Override
     public int hashCode() {
-        return 0;
+        if (FilePermCompat.nb) {
+            return Objects.hash(mask, allFiles, directory, recursive, npath);
+        } else {
+            return 0;
+        }
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,631 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.io;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.Security;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.function.Function;
+
+
+/**
+ * Filter classes, array lengths, and graph metrics during deserialization.
+ * If set on an {@link ObjectInputStream}, the {@link #checkInput checkInput(FilterInfo)}
+ * method is called to validate classes, the length of each array,
+ * the number of objects being read from the stream, the depth of the graph,
+ * and the total number of bytes read from the stream.
+ * <p>
+ * A filter can be set via {@link ObjectInputStream#setObjectInputFilter setObjectInputFilter}
+ * for an individual ObjectInputStream.
+ * A filter can be set via {@link Config#setSerialFilter(ObjectInputFilter) Config.setSerialFilter}
+ * to affect every {@code ObjectInputStream} that does not otherwise set a filter.
+ * <p>
+ * A filter determines whether the arguments are {@link Status#ALLOWED ALLOWED}
+ * or {@link Status#REJECTED REJECTED} and should return the appropriate status.
+ * If the filter cannot determine the status it should return
+ * {@link Status#UNDECIDED UNDECIDED}.
+ * Filters should be designed for the specific use case and expected types.
+ * A filter designed for a particular use may be passed a class that is outside
+ * of the scope of the filter. If the purpose of the filter is to black-list classes
+ * then it can reject a candidate class that matches and report UNDECIDED for others.
+ * A filter may be called with class equals {@code null}, {@code arrayLength} equal -1,
+ * the depth, number of references, and stream size and return a status
+ * that reflects only one or only some of the values.
+ * This allows a filter to specific about the choice it is reporting and
+ * to use other filters without forcing either allowed or rejected status.
+ *
+ * <p>
+ * Typically, a custom filter should check if a process-wide filter
+ * is configured and defer to it if so. For example,
+ * <pre>{@code
+ * ObjectInputFilter.Status checkInput(FilterInfo info) {
+ *     ObjectInputFilter serialFilter = ObjectInputFilter.Config.getSerialFilter();
+ *     if (serialFilter != null) {
+ *         ObjectInputFilter.Status status = serialFilter.checkInput(info);
+ *         if (status != ObjectInputFilter.Status.UNDECIDED) {
+ *             // The process-wide filter overrides this filter
+ *             return status;
+ *         }
+ *     }
+ *     if (info.serialClass() != null &&
+ *         Remote.class.isAssignableFrom(info.serialClass())) {
+ *         return Status.REJECTED;      // Do not allow Remote objects
+ *     }
+ *     return Status.UNDECIDED;
+ * }
+ *}</pre>
+ * <p>
+ * Unless otherwise noted, passing a {@code null} argument to a
+ * method in this interface and its nested classes will cause a
+ * {@link NullPointerException} to be thrown.
+ *
+ * @see ObjectInputStream#setObjectInputFilter(ObjectInputFilter)
+ * @since 9
+ */
+@FunctionalInterface
+public interface ObjectInputFilter {
+
+    /**
+     * Check the class, array length, number of object references, depth,
+     * stream size, and other available filtering information.
+     * Implementations of this method check the contents of the object graph being created
+     * during deserialization. The filter returns {@link Status#ALLOWED Status.ALLOWED},
+     * {@link Status#REJECTED Status.REJECTED}, or {@link Status#UNDECIDED Status.UNDECIDED}.
+     *
+     * @param filterInfo provides information about the current object being deserialized,
+     *             if any, and the status of the {@link ObjectInputStream}
+     * @return  {@link Status#ALLOWED Status.ALLOWED} if accepted,
+     *          {@link Status#REJECTED Status.REJECTED} if rejected,
+     *          {@link Status#UNDECIDED Status.UNDECIDED} if undecided.
+     * @since 9
+     */
+    Status checkInput(FilterInfo filterInfo);
+
+    /**
+     * FilterInfo provides access to information about the current object
+     * being deserialized and the status of the {@link ObjectInputStream}.
+     * @since 9
+     */
+    interface FilterInfo {
+        /**
+         * The class of an object being deserialized.
+         * For arrays, it is the array type.
+         * For example, the array class name of a 2 dimensional array of strings is
+         * "{@code [[Ljava.lang.String;}".
+         * To check the array's element type, iteratively use
+         * {@link Class#getComponentType() Class.getComponentType} while the result
+         * is an array and then check the class.
+         * The {@code serialClass is null} in the case where a new object is not being
+         * created and to give the filter a chance to check the depth, number of
+         * references to existing objects, and the stream size.
+         *
+         * @return class of an object being deserialized; may be null
+         */
+        Class<?> serialClass();
+
+        /**
+         * The number of array elements when deserializing an array of the class.
+         *
+         * @return the non-negative number of array elements when deserializing
+         * an array of the class, otherwise -1
+         */
+        long arrayLength();
+
+        /**
+         * The current depth.
+         * The depth starts at {@code 1} and increases for each nested object and
+         * decrements when each nested object returns.
+         *
+         * @return the current depth
+         */
+        long depth();
+
+        /**
+         * The current number of object references.
+         *
+         * @return the non-negative current number of object references
+         */
+        long references();
+
+        /**
+         * The current number of bytes consumed.
+         * @implSpec  {@code streamBytes} is implementation specific
+         * and may not be directly related to the object in the stream
+         * that caused the callback.
+         *
+         * @return the non-negative current number of bytes consumed
+         */
+        long streamBytes();
+    }
+
+    /**
+     * The status of a check on the class, array length, number of references,
+     * depth, and stream size.
+     *
+     * @since 9
+     */
+    enum Status {
+        /**
+         * The status is undecided, not allowed and not rejected.
+         */
+        UNDECIDED,
+        /**
+         * The status is allowed.
+         */
+        ALLOWED,
+        /**
+         * The status is rejected.
+         */
+        REJECTED;
+    }
+
+    /**
+     * A utility class to set and get the process-wide filter or create a filter
+     * from a pattern string. If a process-wide filter is set, it will be
+     * used for each {@link ObjectInputStream} that does not set its own filter.
+     * <p>
+     * When setting the filter, it should be stateless and idempotent,
+     * reporting the same result when passed the same arguments.
+     * <p>
+     * The filter is configured using the {@link java.security.Security}
+     * property {@code jdk.serialFilter} and can be overridden by
+     * the System property {@code jdk.serialFilter}.
+     *
+     * The syntax is the same as for the {@link #createFilter(String) createFilter} method.
+     *
+     * @since 9
+     */
+    final class Config {
+        /* No instances. */
+        private Config() {}
+
+        /**
+         * Lock object for process-wide filter.
+         */
+        private final static Object serialFilterLock = new Object();
+
+        /**
+         * Debug: Logger
+         */
+        private final static System.Logger configLog;
+
+        /**
+         * Logger for debugging.
+         */
+        static void filterLog(System.Logger.Level level, String msg, Object... args) {
+            if (configLog != null) {
+                configLog.log(level, msg, args);
+            }
+        }
+
+        /**
+         * The name for the process-wide deserialization filter.
+         * Used as a system property and a java.security.Security property.
+         */
+        private final static String SERIAL_FILTER_PROPNAME = "jdk.serialFilter";
+
+        /**
+         * The process-wide filter; may be null.
+         * Lookup the filter in java.security.Security or
+         * the system property.
+         */
+        private final static ObjectInputFilter configuredFilter;
+
+        static {
+            configuredFilter = AccessController
+                    .doPrivileged((PrivilegedAction<ObjectInputFilter>) () -> {
+                        String props = System.getProperty(SERIAL_FILTER_PROPNAME);
+                        if (props == null) {
+                            props = Security.getProperty(SERIAL_FILTER_PROPNAME);
+                        }
+                        if (props != null) {
+                            System.Logger log =
+                                    System.getLogger("java.io.serialization");
+                            log.log(System.Logger.Level.INFO,
+                                    "Creating serialization filter from {0}", props);
+                            try {
+                                return createFilter(props);
+                            } catch (RuntimeException re) {
+                                log.log(System.Logger.Level.ERROR,
+                                        "Error configuring filter: {0}", re);
+                            }
+                        }
+                        return null;
+                    });
+            configLog = (configuredFilter != null) ? System.getLogger("java.io.serialization") : null;
+        }
+
+        /**
+         * Current configured filter.
+         */
+        private static ObjectInputFilter serialFilter = configuredFilter;
+
+        /**
+         * Returns the process-wide serialization filter or {@code null} if not configured.
+         *
+         * @return the process-wide serialization filter or {@code null} if not configured
+         */
+        public static ObjectInputFilter getSerialFilter() {
+            synchronized (serialFilterLock) {
+                return serialFilter;
+            }
+        }
+
+        /**
+         * Set the process-wide filter if it has not already been configured or set.
+         *
+         * @param filter the serialization filter to set as the process-wide filter; not null
+         * @throws SecurityException if there is security manager and the
+         *       {@code SerializablePermission("serialFilter")} is not granted
+         * @throws IllegalStateException if the filter has already been set {@code non-null}
+         */
+        public static void setSerialFilter(ObjectInputFilter filter) {
+            Objects.requireNonNull(filter, "filter");
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                sm.checkPermission(ObjectStreamConstants.SERIAL_FILTER_PERMISSION);
+            }
+            synchronized (serialFilterLock) {
+                if (serialFilter != null) {
+                    throw new IllegalStateException("Serial filter can only be set once");
+                }
+                serialFilter = filter;
+            }
+        }
+
+        /**
+         * Returns an ObjectInputFilter from a string of patterns.
+         * <p>
+         * Patterns are separated by ";" (semicolon). Whitespace is significant and
+         * is considered part of the pattern.
+         * If a pattern includes an equals assignment, "{@code =}" it sets a limit.
+         * If a limit appears more than once the last value is used.
+         * <ul>
+         *     <li>maxdepth={@code value} - the maximum depth of a graph</li>
+         *     <li>maxrefs={@code value}  - the maximum number of internal references</li>
+         *     <li>maxbytes={@code value} - the maximum number of bytes in the input stream</li>
+         *     <li>maxarray={@code value} - the maximum array length allowed</li>
+         * </ul>
+         * <p>
+         * Other patterns match or reject class or package name
+         * as returned from {@link Class#getName() Class.getName()} and
+         * if an optional module name is present
+         * {@link java.lang.reflect.Module#getName() class.getModule().getName()}.
+         * Note that for arrays the element type is used in the pattern,
+         * not the array type.
+         * <ul>
+         * <li>If the pattern starts with "!", the class is rejected if the remaining pattern is matched;
+         *     otherwise the class is allowed if the pattern matches.
+         * <li>If the pattern contains "/", the non-empty prefix up to the "/" is the module name;
+         *     if the module name matches the module name of the class then
+         *     the remaining pattern is matched with the class name.
+         *     If there is no "/", the module name is not compared.
+         * <li>If the pattern ends with ".**" it matches any class in the package and all subpackages.
+         * <li>If the pattern ends with ".*" it matches any class in the package.
+         * <li>If the pattern ends with "*", it matches any class with the pattern as a prefix.
+         * <li>If the pattern is equal to the class name, it matches.
+         * <li>Otherwise, the pattern is not matched.
+         * </ul>
+         * <p>
+         * The resulting filter performs the limit checks and then
+         * tries to match the class, if any. If any of the limits are exceeded,
+         * the filter returns {@link Status#REJECTED Status.REJECTED}.
+         * If the class is an array type, the class to be matched is the element type.
+         * Arrays of any number of dimensions are treated the same as the element type.
+         * For example, a pattern of "{@code !example.Foo}",
+         * rejects creation of any instance or array of {@code example.Foo}.
+         * The first pattern that matches, working from left to right, determines
+         * the {@link Status#ALLOWED Status.ALLOWED}
+         * or {@link Status#REJECTED Status.REJECTED} result.
+         * If nothing matches, the result is {@link Status#UNDECIDED Status.UNDECIDED}.
+         *
+         * @param pattern the pattern string to parse; not null
+         * @return a filter to check a class being deserialized; may be null;
+         *          {@code null} if no patterns
+         * @throws IllegalArgumentException
+         *                if a limit is missing the name, or the long value
+         *                is not a number or is negative,
+         *                or the module name is missing if the pattern contains "/"
+         *                or if the package is missing for ".*" and ".**"
+         */
+        public static ObjectInputFilter createFilter(String pattern) {
+            Objects.requireNonNull(pattern, "pattern");
+            return Global.createFilter(pattern);
+        }
+
+        /**
+         * Implementation of ObjectInputFilter that performs the checks of
+         * the process-wide serialization filter. If configured, it will be
+         * used for all ObjectInputStreams that do not set their own filters.
+         *
+         */
+        final static class Global implements ObjectInputFilter {
+            /**
+             * The pattern used to create the filter.
+             */
+            private final String pattern;
+            /**
+             * The list of class filters.
+             */
+            private final List<Function<Class<?>, Status>> filters;
+            /**
+             * Maximum allowed bytes in the stream.
+             */
+            private long maxStreamBytes;
+            /**
+             * Maximum depth of the graph allowed.
+             */
+            private long maxDepth;
+            /**
+             * Maximum number of references in a graph.
+             */
+            private long maxReferences;
+            /**
+             * Maximum length of any array.
+             */
+            private long maxArrayLength;
+
+            /**
+             * Returns an ObjectInputFilter from a string of patterns.
+             *
+             * @param pattern the pattern string to parse
+             * @return a filter to check a class being deserialized; not null
+             * @throws IllegalArgumentException if the parameter is malformed
+             *                if the pattern is missing the name, the long value
+             *                is not a number or is negative.
+             */
+            static ObjectInputFilter createFilter(String pattern) {
+                Global filter = new Global(pattern);
+                return filter.isEmpty() ? null : filter;
+            }
+
+            /**
+             * Construct a new filter from the pattern String.
+             *
+             * @param pattern a pattern string of filters
+             * @throws IllegalArgumentException if the pattern is malformed
+             */
+            private Global(String pattern) {
+                this.pattern = pattern;
+
+                maxArrayLength = Long.MAX_VALUE; // Default values are unlimited
+                maxDepth = Long.MAX_VALUE;
+                maxReferences = Long.MAX_VALUE;
+                maxStreamBytes = Long.MAX_VALUE;
+
+                String[] patterns = pattern.split(";");
+                filters = new ArrayList<>(patterns.length);
+                for (int i = 0; i < patterns.length; i++) {
+                    String p = patterns[i];
+                    int nameLen = p.length();
+                    if (nameLen == 0) {
+                        continue;
+                    }
+                    if (parseLimit(p)) {
+                        // If the pattern contained a limit setting, i.e. type=value
+                        continue;
+                    }
+                    boolean negate = p.charAt(0) == '!';
+                    int poffset = negate ? 1 : 0;
+
+                    // isolate module name, if any
+                    int slash = p.indexOf('/', poffset);
+                    if (slash == poffset) {
+                        throw new IllegalArgumentException("module name is missing in: \"" + pattern + "\"");
+                    }
+                    final String moduleName = (slash >= 0) ? p.substring(poffset, slash) : null;
+                    poffset = (slash >= 0) ? slash + 1 : poffset;
+
+                    final Function<Class<?>, Status> patternFilter;
+                    if (p.endsWith("*")) {
+                        // Wildcard cases
+                        if (p.endsWith(".*")) {
+                            // Pattern is a package name with a wildcard
+                            final String pkg = p.substring(poffset, nameLen - 1);
+                            if (pkg.length() < 2) {
+                                throw new IllegalArgumentException("package missing in: \"" + pattern + "\"");
+                            }
+                            if (negate) {
+                                // A Function that fails if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> matchesPackage(c, pkg) ? Status.REJECTED : Status.UNDECIDED;
+                            } else {
+                                // A Function that succeeds if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> matchesPackage(c, pkg) ? Status.ALLOWED : Status.UNDECIDED;
+                            }
+                        } else if (p.endsWith(".**")) {
+                            // Pattern is a package prefix with a double wildcard
+                            final String pkgs = p.substring(poffset, nameLen - 2);
+                            if (pkgs.length() < 2) {
+                                throw new IllegalArgumentException("package missing in: \"" + pattern + "\"");
+                            }
+                            if (negate) {
+                                // A Function that fails if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> c.getName().startsWith(pkgs) ? Status.REJECTED : Status.UNDECIDED;
+                            } else {
+                                // A Function that succeeds if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> c.getName().startsWith(pkgs) ? Status.ALLOWED : Status.UNDECIDED;
+                            }
+                        } else {
+                            // Pattern is a classname (possibly empty) with a trailing wildcard
+                            final String className = p.substring(poffset, nameLen - 1);
+                            if (negate) {
+                                // A Function that fails if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> c.getName().startsWith(className) ? Status.REJECTED : Status.UNDECIDED;
+                            } else {
+                                // A Function that succeeds if the class starts with the pattern, otherwise don't care
+                                patternFilter = c -> c.getName().startsWith(className) ? Status.ALLOWED : Status.UNDECIDED;
+                            }
+                        }
+                    } else {
+                        final String name = p.substring(poffset);
+                        if (name.isEmpty()) {
+                            throw new IllegalArgumentException("class or package missing in: \"" + pattern + "\"");
+                        }
+                        // Pattern is a class name
+                        if (negate) {
+                            // A Function that fails if the class equals the pattern, otherwise don't care
+                            patternFilter = c -> c.getName().equals(name) ? Status.REJECTED : Status.UNDECIDED;
+                        } else {
+                            // A Function that succeeds if the class equals the pattern, otherwise don't care
+                            patternFilter = c -> c.getName().equals(name) ? Status.ALLOWED : Status.UNDECIDED;
+                        }
+                    }
+                    // If there is a moduleName, combine the module name check with the package/class check
+                    if (moduleName == null) {
+                        filters.add(patternFilter);
+                    } else {
+                        filters.add(c -> moduleName.equals(c.getModule().getName()) ? patternFilter.apply(c) : Status.UNDECIDED);
+                    }
+                }
+            }
+
+            /**
+             * Returns if this filter has any checks.
+             * @return {@code true} if the filter has any checks, {@code false} otherwise
+             */
+            private boolean isEmpty() {
+                return filters.isEmpty() &&
+                        maxArrayLength == Long.MAX_VALUE &&
+                        maxDepth == Long.MAX_VALUE &&
+                        maxReferences == Long.MAX_VALUE &&
+                        maxStreamBytes == Long.MAX_VALUE;
+            }
+
+            /**
+             * Parse out a limit for one of maxarray, maxdepth, maxbytes, maxreferences.
+             *
+             * @param pattern a string with a type name, '=' and a value
+             * @return {@code true} if a limit was parsed, else {@code false}
+             * @throws IllegalArgumentException if the pattern is missing
+             *                the name, the Long value is not a number or is negative.
+             */
+            private boolean parseLimit(String pattern) {
+                int eqNdx = pattern.indexOf('=');
+                if (eqNdx < 0) {
+                    // not a limit pattern
+                    return false;
+                }
+                String valueString = pattern.substring(eqNdx + 1);
+                if (pattern.startsWith("maxdepth=")) {
+                    maxDepth = parseValue(valueString);
+                } else if (pattern.startsWith("maxarray=")) {
+                    maxArrayLength = parseValue(valueString);
+                } else if (pattern.startsWith("maxrefs=")) {
+                    maxReferences = parseValue(valueString);
+                } else if (pattern.startsWith("maxbytes=")) {
+                    maxStreamBytes = parseValue(valueString);
+                } else {
+                    throw new IllegalArgumentException("unknown limit: " + pattern.substring(0, eqNdx));
+                }
+                return true;
+            }
+
+            /**
+             * Parse the value of a limit and check that it is non-negative.
+             * @param string inputstring
+             * @return the parsed value
+             * @throws IllegalArgumentException if parsing the value fails or the value is negative
+             */
+            private static long parseValue(String string) throws IllegalArgumentException {
+                // Parse a Long from after the '=' to the end
+                long value = Long.parseLong(string);
+                if (value < 0) {
+                    throw new IllegalArgumentException("negative limit: " + string);
+                }
+                return value;
+            }
+
+            /**
+             * {@inheritDoc}
+             */
+            @Override
+            public Status checkInput(FilterInfo filterInfo) {
+                if (filterInfo.references() < 0
+                        || filterInfo.depth() < 0
+                        || filterInfo.streamBytes() < 0
+                        || filterInfo.references() > maxReferences
+                        || filterInfo.depth() > maxDepth
+                        || filterInfo.streamBytes() > maxStreamBytes) {
+                    return Status.REJECTED;
+                }
+
+                Class<?> clazz = filterInfo.serialClass();
+                if (clazz != null) {
+                    if (clazz.isArray()) {
+                        if (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > maxArrayLength) {
+                            // array length is too big
+                            return Status.REJECTED;
+                        }
+                        do {
+                            // Arrays are decided based on the component type
+                            clazz = clazz.getComponentType();
+                        } while (clazz.isArray());
+                    }
+
+                    if (clazz.isPrimitive())  {
+                        // Primitive types are undecided; let someone else decide
+                        return Status.UNDECIDED;
+                    } else {
+                        // Find any filter that allowed or rejected the class
+                        final Class<?> cl = clazz;
+                        Optional<Status> status = filters.stream()
+                                .map(f -> f.apply(cl))
+                                .filter(p -> p != Status.UNDECIDED)
+                                .findFirst();
+                        return status.orElse(Status.UNDECIDED);
+                    }
+                }
+                return Status.UNDECIDED;
+            }
+
+            /**
+             * Returns {@code true} if the class is in the package.
+             *
+             * @param c   a class
+             * @param pkg a package name (including the trailing ".")
+             * @return {@code true} if the class is in the package,
+             * otherwise {@code false}
+             */
+            private static boolean matchesPackage(Class<?> c, String pkg) {
+                String n = c.getName();
+                return n.startsWith(pkg) && n.lastIndexOf('.') == pkg.length() - 1;
+            }
+
+            /**
+             * Returns the pattern used to create this filter.
+             * @return the pattern used to create this filter
+             */
+            @Override
+            public String toString() {
+                return pattern;
+            }
+        }
+    }
+}
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Oct 13 09:02:13 2016 -0700
@@ -26,6 +26,7 @@
 package java.io;
 
 import java.io.ObjectStreamClass.WeakClassKey;
+import java.lang.System.Logger;
 import java.lang.ref.ReferenceQueue;
 import java.lang.reflect.Array;
 import java.lang.reflect.Modifier;
@@ -37,10 +38,12 @@
 import java.security.PrivilegedExceptionAction;
 import java.util.Arrays;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+
 import static java.io.ObjectStreamClass.processQueue;
-import jdk.internal.misc.JavaObjectInputStreamAccess;
+
 import jdk.internal.misc.ObjectStreamClassValidator;
 import jdk.internal.misc.SharedSecrets;
 import jdk.internal.misc.Unsafe;
@@ -172,6 +175,16 @@
  * protected) or that there are get and set methods that can be used to restore
  * the state.
  *
+ * <p>The contents of the stream can be filtered during deserialization.
+ * If a {@linkplain #setObjectInputFilter(ObjectInputFilter) filter is set}
+ * on an ObjectInputStream, the {@link ObjectInputFilter} can check that
+ * the classes, array lengths, number of references in the stream, depth, and
+ * number of bytes consumed from the input stream are allowed and
+ * if not, can terminate deserialization.
+ * A {@linkplain ObjectInputFilter.Config#setSerialFilter(ObjectInputFilter) process-wide filter}
+ * can be configured that is applied to each {@code ObjectInputStream} unless replaced
+ * using {@link #setObjectInputFilter(ObjectInputFilter) setObjectInputFilter}.
+ *
  * <p>Any exception that occurs while deserializing an object will be caught by
  * the ObjectInputStream and abort the reading process.
  *
@@ -240,12 +253,32 @@
             new ReferenceQueue<>();
     }
 
+    /*
+     * Separate class to defer initialization of logging until needed.
+     */
+    private static class Logging {
+        /*
+         * Logger for ObjectInputFilter results.
+         * Setup the filter logger if it is set to DEBUG or TRACE.
+         * (Assuming it will not change).
+         */
+        static final System.Logger filterLogger;
+
+        static {
+            Logger filterLog = System.getLogger("java.io.serialization");
+            filterLogger = (filterLog.isLoggable(Logger.Level.DEBUG)
+                    || filterLog.isLoggable(Logger.Level.TRACE)) ? filterLog : null;
+        }
+    }
+
     /** filter stream for handling block data conversion */
     private final BlockDataInputStream bin;
     /** validation callback list */
     private final ValidationList vlist;
     /** recursion depth */
-    private int depth;
+    private long depth;
+    /** Total number of references to any type of object, class, enum, proxy, etc. */
+    private long totalObjectRefs;
     /** whether stream is closed */
     private boolean closed;
 
@@ -269,11 +302,20 @@
     private SerialCallbackContext curContext;
 
     /**
+     * Filter of class descriptors and classes read from the stream;
+     * may be null.
+     */
+    private ObjectInputFilter serialFilter;
+
+    /**
      * Creates an ObjectInputStream that reads from the specified InputStream.
      * A serialization stream header is read from the stream and verified.
      * This constructor will block until the corresponding ObjectOutputStream
      * has written and flushed the header.
      *
+     * <p>The serialization filter is initialized to the value of
+     * {@linkplain ObjectInputFilter.Config#getSerialFilter() the process-wide filter}.
+     *
      * <p>If a security manager is installed, this constructor will check for
      * the "enableSubclassImplementation" SerializablePermission when invoked
      * directly or indirectly by the constructor of a subclass which overrides
@@ -295,6 +337,7 @@
         bin = new BlockDataInputStream(in);
         handles = new HandleTable(10);
         vlist = new ValidationList();
+        serialFilter = ObjectInputFilter.Config.getSerialFilter();
         enableOverride = false;
         readStreamHeader();
         bin.setBlockDataMode(true);
@@ -305,6 +348,9 @@
      * ObjectInputStream to not have to allocate private data just used by this
      * implementation of ObjectInputStream.
      *
+     * <p>The serialization filter is initialized to the value of
+     * {@linkplain ObjectInputFilter.Config#getSerialFilter() the process-wide filter}.
+     *
      * <p>If there is a security manager installed, this method first calls the
      * security manager's <code>checkPermission</code> method with the
      * <code>SerializablePermission("enableSubclassImplementation")</code>
@@ -325,6 +371,7 @@
         bin = null;
         handles = null;
         vlist = null;
+        serialFilter = ObjectInputFilter.Config.getSerialFilter();
         enableOverride = true;
     }
 
@@ -332,7 +379,7 @@
      * Read an object from the ObjectInputStream.  The class of the object, the
      * signature of the class, and the values of the non-transient and
      * non-static fields of the class and all of its supertypes are read.
-     * Default deserializing for a class can be overriden using the writeObject
+     * Default deserializing for a class can be overridden using the writeObject
      * and readObject methods.  Objects referenced by this object are read
      * transitively so that a complete equivalent graph of objects is
      * reconstructed by readObject.
@@ -343,6 +390,10 @@
      * priorities. The callbacks are registered by objects (in the readObject
      * special methods) as they are individually restored.
      *
+     * <p>The serialization filter, when not {@code null}, is invoked for
+     * each object (regular or class) read to reconstruct the root object.
+     * See {@link #setObjectInputFilter(ObjectInputFilter) setObjectInputFilter} for details.
+     *
      * <p>Exceptions are thrown for problems with the InputStream and for
      * classes that should not be deserialized.  All exceptions are fatal to
      * the InputStream and leave it in an indeterminate state; it is up to the
@@ -438,6 +489,10 @@
      * invocation of readObject or readUnshared on the ObjectInputStream,
      * even if the underlying data stream has been manipulated.
      *
+     * <p>The serialization filter, when not {@code null}, is invoked for
+     * each object (regular or class) read to reconstruct the root object.
+     * See {@link #setObjectInputFilter(ObjectInputFilter) setObjectInputFilter} for details.
+     *
      * <p>ObjectInputStream subclasses which override this method can only be
      * constructed in security contexts possessing the
      * "enableSubclassImplementation" SerializablePermission; any attempt to
@@ -1094,6 +1149,134 @@
     }
 
     /**
+     * Returns the serialization filter for this stream.
+     * The serialization filter is the most recent filter set in
+     * {@link #setObjectInputFilter setObjectInputFilter} or
+     * the initial process-wide filter from
+     * {@link ObjectInputFilter.Config#getSerialFilter() ObjectInputFilter.Config.getSerialFilter}.
+     *
+     * @return the serialization filter for the stream; may be null
+     * @since 9
+     */
+    public final ObjectInputFilter getObjectInputFilter() {
+        return serialFilter;
+    }
+
+    /**
+     * Set the serialization filter for the stream.
+     * The filter's {@link ObjectInputFilter#checkInput checkInput} method is called
+     * for each class and reference in the stream.
+     * The filter can check any or all of the class, the array length, the number
+     * of references, the depth of the graph, and the size of the input stream.
+     * <p>
+     * If the filter returns {@link ObjectInputFilter.Status#REJECTED Status.REJECTED},
+     * {@code null} or throws a {@link RuntimeException},
+     * the active {@code readObject} or {@code readUnshared}
+     * throws {@link InvalidClassException}, otherwise deserialization
+     * continues uninterrupted.
+     * <p>
+     * The serialization filter is initialized to the value of
+     * {@link ObjectInputFilter.Config#getSerialFilter() ObjectInputFilter.Config.getSerialFilter}
+     * when the {@code  ObjectInputStream} is constructed and can be set
+     * to a custom filter only once.
+     *
+     * @implSpec
+     * The filter, when not {@code null}, is invoked during {@link #readObject readObject}
+     * and {@link #readUnshared readUnshared} for each object
+     * (regular or class) in the stream including the following:
+     * <ul>
+     *     <li>each object reference previously deserialized from the stream
+     *     (class is {@code null}, arrayLength is -1),
+     *     <li>each regular class (class is not {@code null}, arrayLength is -1),
+     *     <li>each interface of a dynamic proxy and the dynamic proxy class itself
+     *     (class is not {@code null}, arrayLength is -1),
+     *     <li>each array is filtered using the array type and length of the array
+     *     (class is the array type, arrayLength is the requested length),
+     *     <li>each object replaced by its class' {@code readResolve} method
+     *         is filtered using the replacement object's class, if not {@code null},
+     *         and if it is an array, the arrayLength, otherwise -1,
+     *     <li>and each object replaced by {@link #resolveObject resolveObject}
+     *         is filtered using the replacement object's class, if not {@code null},
+     *         and if it is an array, the arrayLength, otherwise -1.
+     * </ul>
+     *
+     * When the {@link ObjectInputFilter#checkInput checkInput} method is invoked
+     * it is given access to the current class, the array length,
+     * the current number of references already read from the stream,
+     * the depth of nested calls to {@link #readObject readObject} or
+     * {@link #readUnshared readUnshared},
+     * and the implementation dependent number of bytes consumed from the input stream.
+     * <p>
+     * Each call to {@link #readObject readObject} or
+     * {@link #readUnshared readUnshared} increases the depth by 1
+     * before reading an object and decreases by 1 before returning
+     * normally or exceptionally.
+     * The depth starts at {@code 1} and increases for each nested object and
+     * decrements when each nested call returns.
+     * The count of references in the stream starts at {@code 1} and
+     * is increased before reading an object.
+     *
+     * @param filter the filter, may be null
+     * @throws SecurityException if there is security manager and the
+     *       {@code SerializablePermission("serialFilter")} is not granted
+     * @throws IllegalStateException if the {@linkplain #getObjectInputFilter() current filter}
+     *       is not {@code null} and is not the process-wide filter
+     * @since 9
+     */
+    public final void setObjectInputFilter(ObjectInputFilter filter) {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(ObjectStreamConstants.SERIAL_FILTER_PERMISSION);
+        }
+        // Allow replacement of the process-wide filter if not already set
+        if (serialFilter != null &&
+                serialFilter != ObjectInputFilter.Config.getSerialFilter()) {
+            throw new IllegalStateException("filter can not be set more than once");
+        }
+        this.serialFilter = filter;
+    }
+
+    /**
+     * Invoke the serialization filter if non-null.
+     * If the filter rejects or an exception is thrown, throws InvalidClassException.
+     *
+     * @param clazz the class; may be null
+     * @param arrayLength the array length requested; use {@code -1} if not creating an array
+     * @throws InvalidClassException if it rejected by the filter or
+     *        a {@link RuntimeException} is thrown
+     */
+    private void filterCheck(Class<?> clazz, int arrayLength)
+            throws InvalidClassException {
+        if (serialFilter != null) {
+            RuntimeException ex = null;
+            ObjectInputFilter.Status status;
+            try {
+                status = serialFilter.checkInput(new FilterValues(clazz, arrayLength,
+                        totalObjectRefs, depth, bin.getBytesRead()));
+            } catch (RuntimeException e) {
+                // Preventive interception of an exception to log
+                status = ObjectInputFilter.Status.REJECTED;
+                ex = e;
+            }
+            if (Logging.filterLogger != null) {
+                // Debug logging of filter checks that fail; Tracing for those that succeed
+                Logging.filterLogger.log(status == null || status == ObjectInputFilter.Status.REJECTED
+                                ? Logger.Level.DEBUG
+                                : Logger.Level.TRACE,
+                        "ObjectInputFilter {0}: {1}, array length: {2}, nRefs: {3}, depth: {4}, bytes: {5}, ex: {6}",
+                        status, clazz, arrayLength, totalObjectRefs, depth, bin.getBytesRead(),
+                        Objects.toString(ex, "n/a"));
+            }
+            if (status == null ||
+                    status == ObjectInputFilter.Status.REJECTED) {
+                InvalidClassException ice = new InvalidClassException("filter status: " + status);
+                ice.initCause(ex);
+                throw ice;
+            }
+        }
+    }
+
+    /**
      * Provide access to the persistent fields read from the input stream.
      */
     public abstract static class GetField {
@@ -1280,7 +1463,7 @@
      */
     private static Boolean auditSubclass(Class<?> subcl) {
         return AccessController.doPrivileged(
-            new PrivilegedAction<>() {
+            new PrivilegedAction<Boolean>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectInputStream.class;
@@ -1340,6 +1523,7 @@
         }
 
         depth++;
+        totalObjectRefs++;
         try {
             switch (tc) {
                 case TC_NULL:
@@ -1416,6 +1600,15 @@
         }
         Object rep = resolveObject(obj);
         if (rep != obj) {
+            // The type of the original object has been filtered but resolveObject
+            // may have replaced it;  filter the replacement's type
+            if (rep != null) {
+                if (rep.getClass().isArray()) {
+                    filterCheck(rep.getClass(), Array.getLength(rep));
+                } else {
+                    filterCheck(rep.getClass(), -1);
+                }
+            }
             handles.setObject(passHandle, rep);
         }
         return rep;
@@ -1486,6 +1679,7 @@
             throw new InvalidObjectException(
                 "cannot read back reference to unshared object");
         }
+        filterCheck(null, -1);       // just a check for number of references, depth, no class
         return obj;
     }
 
@@ -1590,6 +1784,10 @@
                 ReflectUtil.checkProxyPackageAccess(
                         getClass().getClassLoader(),
                         cl.getInterfaces());
+                // Filter the interfaces
+                for (Class<?> clazz : cl.getInterfaces()) {
+                    filterCheck(clazz, -1);
+                }
             }
         } catch (ClassNotFoundException ex) {
             resolveEx = ex;
@@ -1598,6 +1796,9 @@
 
         desc.initProxy(cl, resolveEx, readClassDesc(false));
 
+        // Call filterCheck on the definition
+        filterCheck(desc.forClass(), -1);
+
         handles.finish(descHandle);
         passHandle = descHandle;
         return desc;
@@ -1645,8 +1846,12 @@
 
         desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false));
 
+        // Call filterCheck on the definition
+        filterCheck(desc.forClass(), -1);
+
         handles.finish(descHandle);
         passHandle = descHandle;
+
         return desc;
     }
 
@@ -1687,6 +1892,8 @@
         ObjectStreamClass desc = readClassDesc(false);
         int len = bin.readInt();
 
+        filterCheck(desc.forClass(), len);
+
         Object array = null;
         Class<?> cl, ccl = null;
         if ((cl = desc.forClass()) != null) {
@@ -1835,6 +2042,14 @@
                 rep = cloneArray(rep);
             }
             if (rep != obj) {
+                // Filter the replacement object
+                if (rep != null) {
+                    if (rep.getClass().isArray()) {
+                        filterCheck(rep.getClass(), Array.getLength(rep));
+                    } else {
+                        filterCheck(rep.getClass(), -1);
+                    }
+                }
                 handles.setObject(passHandle, obj = rep);
             }
         }
@@ -2360,7 +2575,7 @@
             try {
                 while (list != null) {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<>()
+                        new PrivilegedExceptionAction<Void>()
                     {
                         public Void run() throws InvalidObjectException {
                             list.obj.validateObject();
@@ -2384,6 +2599,51 @@
     }
 
     /**
+     * Hold a snapshot of values to be passed to an ObjectInputFilter.
+     */
+    static class FilterValues implements ObjectInputFilter.FilterInfo {
+        final Class<?> clazz;
+        final long arrayLength;
+        final long totalObjectRefs;
+        final long depth;
+        final long streamBytes;
+
+        public FilterValues(Class<?> clazz, long arrayLength, long totalObjectRefs,
+                            long depth, long streamBytes) {
+            this.clazz = clazz;
+            this.arrayLength = arrayLength;
+            this.totalObjectRefs = totalObjectRefs;
+            this.depth = depth;
+            this.streamBytes = streamBytes;
+        }
+
+        @Override
+        public Class<?> serialClass() {
+            return clazz;
+        }
+
+        @Override
+        public long arrayLength() {
+            return arrayLength;
+        }
+
+        @Override
+        public long references() {
+            return totalObjectRefs;
+        }
+
+        @Override
+        public long depth() {
+            return depth;
+        }
+
+        @Override
+        public long streamBytes() {
+            return streamBytes;
+        }
+    }
+
+    /**
      * Input stream supporting single-byte peek operations.
      */
     private static class PeekInputStream extends InputStream {
@@ -2392,6 +2652,8 @@
         private final InputStream in;
         /** peeked byte */
         private int peekb = -1;
+        /** total bytes read from the stream */
+        private long totalBytesRead = 0;
 
         /**
          * Creates new PeekInputStream on top of given underlying stream.
@@ -2405,7 +2667,12 @@
          * that it does not consume the read value.
          */
         int peek() throws IOException {
-            return (peekb >= 0) ? peekb : (peekb = in.read());
+            if (peekb >= 0) {
+                return peekb;
+            }
+            peekb = in.read();
+            totalBytesRead += peekb >= 0 ? 1 : 0;
+            return peekb;
         }
 
         public int read() throws IOException {
@@ -2414,21 +2681,27 @@
                 peekb = -1;
                 return v;
             } else {
-                return in.read();
+                int nbytes = in.read();
+                totalBytesRead += nbytes >= 0 ? 1 : 0;
+                return nbytes;
             }
         }
 
         public int read(byte[] b, int off, int len) throws IOException {
+            int nbytes;
             if (len == 0) {
                 return 0;
             } else if (peekb < 0) {
-                return in.read(b, off, len);
+                nbytes = in.read(b, off, len);
+                totalBytesRead += nbytes >= 0 ? nbytes : 0;
+                return nbytes;
             } else {
                 b[off++] = (byte) peekb;
                 len--;
                 peekb = -1;
-                int n = in.read(b, off, len);
-                return (n >= 0) ? (n + 1) : 1;
+                nbytes = in.read(b, off, len);
+                totalBytesRead += nbytes >= 0 ? nbytes : 0;
+                return (nbytes >= 0) ? (nbytes + 1) : 1;
             }
         }
 
@@ -2453,7 +2726,9 @@
                 skipped++;
                 n--;
             }
-            return skipped + in.skip(n);
+            n = skipped + in.skip(n);
+            totalBytesRead += n;
+            return n;
         }
 
         public int available() throws IOException {
@@ -2463,6 +2738,10 @@
         public void close() throws IOException {
             in.close();
         }
+
+        public long getBytesRead() {
+            return totalBytesRead;
+        }
     }
 
     private static final Unsafe UNSAFE = Unsafe.getUnsafe();
@@ -3346,6 +3625,14 @@
                     throw new UTFDataFormatException();
             }
         }
+
+        /**
+         * Returns the number of bytes read from the input stream.
+         * @return the number of bytes read from the input stream
+         */
+        long getBytesRead() {
+            return in.getBytesRead();
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/io/ObjectStreamConstants.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/io/ObjectStreamConstants.java	Thu Oct 13 09:02:13 2016 -0700
@@ -199,6 +199,16 @@
      */
     static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION =
                     new SerializablePermission("enableSubclassImplementation");
+
+    /**
+     * Enable setting the process-wide serial filter.
+     *
+     * @see java.io.ObjectInputFilter.Config#setSerialFilter(ObjectInputFilter)
+     * @since 9
+     */
+    static final SerializablePermission SERIAL_FILTER_PERMISSION =
+            new SerializablePermission("serialFilter");
+
    /**
     * A Stream Protocol Version. <p>
     *
--- a/src/java.base/share/classes/java/io/SerializablePermission.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/io/SerializablePermission.java	Thu Oct 13 09:02:13 2016 -0700
@@ -40,7 +40,7 @@
  * The target name is the name of the Serializable permission (see below).
  *
  * <P>
- * The following table lists all the possible SerializablePermission target names,
+ * The following table lists the standard {@code SerializablePermission} target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
  *
@@ -73,6 +73,13 @@
  * malignant data.</td>
  * </tr>
  *
+ * <tr>
+ *   <td>serialFilter</td>
+ *   <td>Setting a filter for ObjectInputStreams.</td>
+ *   <td>Code could remove a configured filter and remove protections
+ *       already established.</td>
+ * </tr>
+ *
  * </table>
  *
  * @see java.security.BasicPermission
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Oct 13 09:02:13 2016 -0700
@@ -292,9 +292,6 @@
         new ProtectionDomain(new CodeSource(null, (Certificate[]) null),
                              null, this, null);
 
-    // The initiating protection domains for all classes loaded by this loader
-    private final Set<ProtectionDomain> domains;
-
     // Invoked by the VM to record every loaded class with this loader.
     void addClass(Class<?> c) {
         classes.addElement(c);
@@ -349,13 +346,11 @@
         if (ParallelLoaders.isRegistered(this.getClass())) {
             parallelLockMap = new ConcurrentHashMap<>();
             package2certs = new ConcurrentHashMap<>();
-            domains = Collections.synchronizedSet(new HashSet<>());
             assertionLock = new Object();
         } else {
             // no finer-grained lock; lock on the classloader instance
             parallelLockMap = null;
             package2certs = new Hashtable<>();
-            domains = new HashSet<>();
             assertionLock = this;
         }
     }
@@ -640,7 +635,6 @@
                 }, new AccessControlContext(new ProtectionDomain[] {pd}));
             }
         }
-        domains.add(pd);
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/String.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/lang/String.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1516,11 +1516,12 @@
      * @return  a hash code value for this object.
      */
     public int hashCode() {
-        if (hash == 0 && value.length > 0) {
-            hash = isLatin1() ? StringLatin1.hashCode(value)
-                              : StringUTF16.hashCode(value);
+        int h = hash;
+        if (h == 0 && value.length > 0) {
+            hash = h = isLatin1() ? StringLatin1.hashCode(value)
+                                  : StringUTF16.hashCode(value);
         }
-        return hash;
+        return h;
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/module/ModuleFinder.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/lang/module/ModuleFinder.java	Thu Oct 13 09:02:13 2016 -0700
@@ -33,7 +33,6 @@
 import java.security.AccessController;
 import java.security.Permission;
 import java.security.PrivilegedAction;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -333,7 +332,7 @@
      *
      * <p> When locating modules then any exceptions or errors thrown by the
      * {@code find} or {@code findAll} methods of the underlying module finders
-     * will be propogated to the caller of the resulting module finder's
+     * will be propagated to the caller of the resulting module finder's
      * {@code find} or {@code findAll} methods. </p>
      *
      * @param finders
@@ -342,8 +341,8 @@
      * @return A {@code ModuleFinder} that composes a sequence of module finders
      */
     static ModuleFinder compose(ModuleFinder... finders) {
-        final List<ModuleFinder> finderList = Arrays.asList(finders);
-        finderList.forEach(Objects::requireNonNull);
+        // copy the list, also checking for nulls
+        final List<ModuleFinder> finderList = List.of(finders);
 
         return new ModuleFinder() {
             private final Map<String, ModuleReference> nameToModule = new HashMap<>();
--- a/src/java.base/share/classes/java/lang/module/ModulePath.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/lang/module/ModulePath.java	Thu Oct 13 09:02:13 2016 -0700
@@ -56,6 +56,8 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
+import jdk.internal.jmod.JmodFile;
+import jdk.internal.jmod.JmodFile.Section;
 import jdk.internal.module.ConfigurableModuleFinder;
 import jdk.internal.perf.PerfCounter;
 
@@ -294,11 +296,11 @@
 
     // -- jmod files --
 
-    private Set<String> jmodPackages(ZipFile zf) {
-        return zf.stream()
-            .filter(e -> e.getName().startsWith("classes/") &&
-                    e.getName().endsWith(".class"))
-            .map(e -> toPackageName(e.getName().substring(8)))
+    private Set<String> jmodPackages(JmodFile jf) {
+        return jf.stream()
+            .filter(e -> e.section() == Section.CLASSES)
+            .map(JmodFile.Entry::name)
+            .map(this::toPackageName)
             .filter(pkg -> pkg.length() > 0) // module-info
             .collect(Collectors.toSet());
     }
@@ -311,14 +313,10 @@
      * @throws InvalidModuleDescriptorException
      */
     private ModuleReference readJMod(Path file) throws IOException {
-        try (ZipFile zf = new ZipFile(file.toString())) {
-            ZipEntry ze = zf.getEntry("classes/" + MODULE_INFO);
-            if (ze == null) {
-                throw new IOException(MODULE_INFO + " is missing: " + file);
-            }
+        try (JmodFile jf = new JmodFile(file)) {
             ModuleDescriptor md;
-            try (InputStream in = zf.getInputStream(ze)) {
-                md = ModuleDescriptor.read(in, () -> jmodPackages(zf));
+            try (InputStream in = jf.getInputStream(Section.CLASSES, MODULE_INFO)) {
+                md = ModuleDescriptor.read(in, () -> jmodPackages(jf));
             }
             return ModuleReferences.newJModModule(md, file);
         }
--- a/src/java.base/share/classes/java/net/CookieManager.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/net/CookieManager.java	Thu Oct 13 09:02:13 2016 -0700
@@ -81,7 +81,7 @@
  *   <li>
  *     Currently, only CookieStore.add(URI, HttpCookie) and CookieStore.get(URI)
  *     are used by CookieManager. Others are for completeness and might be needed
- *     by a more sophisticated CookieStore implementation, e.g. a NetscapeCookieSotre.
+ *     by a more sophisticated CookieStore implementation, e.g. a NetscapeCookieStore.
  *   </li>
  * </ul>
  * </blockquote>
@@ -201,10 +201,9 @@
             throw new IllegalArgumentException("Argument is null");
         }
 
-        Map<String, List<String>> cookieMap = new java.util.HashMap<>();
         // if there's no default CookieStore, no way for us to get any cookie
         if (cookieJar == null)
-            return Collections.unmodifiableMap(cookieMap);
+            return Map.of();
 
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
         List<HttpCookie> cookies = new java.util.ArrayList<>();
@@ -244,8 +243,7 @@
         // apply sort rule (RFC 2965 sec. 3.3.4)
         List<String> cookieHeader = sortByPath(cookies);
 
-        cookieMap.put("Cookie", cookieHeader);
-        return Collections.unmodifiableMap(cookieMap);
+        return Map.of("Cookie", cookieHeader);
     }
 
     public void
--- a/src/java.base/share/classes/java/net/MulticastSocket.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/net/MulticastSocket.java	Thu Oct 13 09:02:13 2016 -0700
@@ -93,23 +93,19 @@
     /**
      * Create a multicast socket.
      *
-     * <p>If there is a security manager,
-     * its {@code checkListen} method is first called
-     * with 0 as its argument to ensure the operation is allowed.
-     * This could result in a SecurityException.
+     * <p>
+     * If there is a security manager, its {@code checkListen} method is first
+     * called with 0 as its argument to ensure the operation is allowed. This
+     * could result in a SecurityException.
      * <p>
      * When the socket is created the
-     * {@link DatagramSocket#setReuseAddress(boolean)} method is
-     * called to enable the SO_REUSEADDR socket option. When
-     * {@link StandardSocketOptions#SO_REUSEPORT SO_REUSEPORT} is
-     * supported then
-     * {@link DatagramSocketImpl#setOption(SocketOption, Object)}
-     * is called to enable the socket option.
+     * {@link DatagramSocket#setReuseAddress(boolean)} method is called to
+     * enable the SO_REUSEADDR socket option.
      *
-     * @exception IOException if an I/O exception occurs
-     * while creating the MulticastSocket
-     * @exception  SecurityException  if a security manager exists and its
-     *             {@code checkListen} method doesn't allow the operation.
+     * @exception IOException if an I/O exception occurs while creating the
+     * MulticastSocket
+     * @exception SecurityException if a security manager exists and its
+     * {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      * @see java.net.DatagramSocketImpl#setOption(SocketOption, Object)
@@ -174,17 +170,13 @@
         // Enable SO_REUSEADDR before binding
         setReuseAddress(true);
 
-        // Enable SO_REUSEPORT if supported before binding
-        if (supportedOptions().contains(StandardSocketOptions.SO_REUSEPORT)) {
-            this.setOption(StandardSocketOptions.SO_REUSEPORT, true);
-        }
-
         if (bindaddr != null) {
             try {
                 bind(bindaddr);
             } finally {
-                if (!isBound())
+                if (!isBound()) {
                     close();
+                }
             }
         }
     }
--- a/src/java.base/share/classes/java/net/URLPermission.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/net/URLPermission.java	Thu Oct 13 09:02:13 2016 -0700
@@ -217,7 +217,7 @@
      * where method-names is the list of methods separated by commas
      * and header-names is the list of permitted headers separated by commas.
      * There is no white space in the returned String. If header-names is empty
-     * then the colon separator will not be present.
+     * then the colon separator may not be present.
      */
     public String getActions() {
         return actions;
--- a/src/java.base/share/classes/java/nio/file/FileTreeIterator.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/nio/file/FileTreeIterator.java	Thu Oct 13 09:02:13 2016 -0700
@@ -31,11 +31,10 @@
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.util.Objects;
 import java.nio.file.FileTreeWalker.Event;
 
 /**
- * An {@code Iterator to iterate over the nodes of a file tree.
+ * An {@code Iterator} to iterate over the nodes of a file tree.
  *
  * <pre>{@code
  *     try (FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options)) {
@@ -62,7 +61,7 @@
      * @throws  SecurityException
      *          if the security manager denies access to the starting file
      * @throws  NullPointerException
-     *          if {@code start} or {@code options} is {@ocde null} or
+     *          if {@code start} or {@code options} is {@code null} or
      *          the options array contains a {@code null} element
      */
     FileTreeIterator(Path start, int maxDepth, FileVisitOption... options)
--- a/src/java.base/share/classes/java/nio/file/FileTreeWalker.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/nio/file/FileTreeWalker.java	Thu Oct 13 09:02:13 2016 -0700
@@ -171,7 +171,7 @@
      *          if {@code options} contains an element that is not a
      *          {@code FileVisitOption}
      * @throws  NullPointerException
-     *          if {@code options} is {@ocde null} or the options
+     *          if {@code options} is {@code null} or the options
      *          array contains a {@code null} element
      */
     FileTreeWalker(Collection<FileVisitOption> options, int maxDepth) {
--- a/src/java.base/share/classes/java/security/AccessControlContext.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/security/AccessControlContext.java	Thu Oct 13 09:02:13 2016 -0700
@@ -27,7 +27,9 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import sun.security.util.Debug;
+import sun.security.util.FilePermCompat;
 import sun.security.util.SecurityConstants;
 
 
@@ -175,7 +177,7 @@
 
     /**
      * package private to allow calls from ProtectionDomain without performing
-     * the security check for {@linkplain SecurityConstants.CREATE_ACC_PERMISSION}
+     * the security check for {@linkplain SecurityConstants#CREATE_ACC_PERMISSION}
      * permission
      */
     AccessControlContext(AccessControlContext acc,
@@ -253,7 +255,8 @@
                 if (perms[i].getClass() == AllPermission.class) {
                     parent = null;
                 }
-                tmp[i] = perms[i];
+                // Add altPath into permission for compatibility.
+                tmp[i] = FilePermCompat.newPermPlusAltPath(perms[i]);
             }
         }
 
@@ -443,7 +446,7 @@
         }
 
         for (int i=0; i< context.length; i++) {
-            if (context[i] != null &&  !context[i].implies(perm)) {
+            if (context[i] != null && !context[i].impliesWithAltFilePerm(perm)) {
                 if (dumpDebug) {
                     debug.println("access denied " + perm);
                 }
--- a/src/java.base/share/classes/java/security/KeyStoreSpi.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/security/KeyStoreSpi.java	Thu Oct 13 09:02:13 2016 -0700
@@ -479,6 +479,10 @@
             } else if (engineIsKeyEntry(alias)) {
                 KeyStore.PasswordProtection pp =
                         (KeyStore.PasswordProtection)protParam;
+                if (pp.getProtectionAlgorithm() != null) {
+                    throw new KeyStoreException(
+                        "unsupported password protection algorithm");
+                }
                 char[] password = pp.getPassword();
 
                 Key key = engineGetKey(alias, password);
@@ -524,6 +528,10 @@
         KeyStore.PasswordProtection pProtect = null;
         if (protParam != null) {
             pProtect = (KeyStore.PasswordProtection)protParam;
+            if (pProtect.getProtectionAlgorithm() != null) {
+                throw new KeyStoreException(
+                    "unsupported password protection algorithm");
+            }
         }
 
         // set entry
--- a/src/java.base/share/classes/java/security/MessageDigest.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/security/MessageDigest.java	Thu Oct 13 09:02:13 2016 -0700
@@ -32,10 +32,13 @@
 import java.io.PrintStream;
 import java.io.InputStream;
 import java.io.ByteArrayInputStream;
-
+import java.security.InvalidKeyException;
 import java.nio.ByteBuffer;
 
 import sun.security.util.Debug;
+import sun.security.util.MessageDigestSpi2;
+
+import javax.crypto.SecretKey;
 
 /**
  * This MessageDigest class provides applications the functionality of a
@@ -548,7 +551,7 @@
      * and its original parent (Object).
      */
 
-    static class Delegate extends MessageDigest {
+    static class Delegate extends MessageDigest implements MessageDigestSpi2 {
 
         // The provider implementation (delegate)
         private MessageDigestSpi digestSpi;
@@ -601,6 +604,14 @@
             digestSpi.engineUpdate(input);
         }
 
+        public void engineUpdate(SecretKey key) throws InvalidKeyException {
+            if (digestSpi instanceof MessageDigestSpi2) {
+                ((MessageDigestSpi2)digestSpi).engineUpdate(key);
+            } else {
+                throw new UnsupportedOperationException
+                ("Digest does not support update of SecretKey object");
+            }
+        }
         protected byte[] engineDigest() {
             return digestSpi.engineDigest();
         }
--- a/src/java.base/share/classes/java/security/ProtectionDomain.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/security/ProtectionDomain.java	Thu Oct 13 09:02:13 2016 -0700
@@ -32,13 +32,14 @@
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.List;
-import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import jdk.internal.misc.JavaSecurityAccess;
 import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
 import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
 import jdk.internal.misc.SharedSecrets;
+import sun.security.provider.PolicyFile;
 import sun.security.util.Debug;
+import sun.security.util.FilePermCompat;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -303,14 +304,74 @@
         }
 
         if (!staticPermissions &&
-            Policy.getPolicyNoCheck().implies(this, perm))
+            Policy.getPolicyNoCheck().implies(this, perm)) {
             return true;
-        if (permissions != null)
+        }
+        if (permissions != null) {
             return permissions.implies(perm);
+        }
 
         return false;
     }
 
+    /**
+     * This method has the same logic flow as {@link #implies} except that
+     * when the {@link FilePermCompat#compat} flag is on it ensures
+     * FilePermission compatibility after JDK-8164705. {@code implies()}
+     * is called when compat flag is not on or user has extended
+     * {@code ProtectionDomain}.
+     *
+     * This method is called by {@link AccessControlContext#checkPermission}
+     * and not intended to be called by an application.
+     */
+    boolean impliesWithAltFilePerm(Permission perm) {
+
+        // If this is a subclass of ProtectionDomain. Call the old method.
+        if (!FilePermCompat.compat || getClass() != ProtectionDomain.class) {
+            return implies(perm);
+        }
+
+        if (hasAllPerm) {
+            // internal permission collection already has AllPermission -
+            // no need to go to policy
+            return true;
+        }
+
+        Permission p2 = null;
+        boolean p2Calculated = false;
+
+        if (!staticPermissions) {
+            Policy policy = Policy.getPolicyNoCheck();
+            if (policy instanceof PolicyFile) {
+                // The PolicyFile implementation supports compatibility
+                // inside and it also covers the static permissions.
+                return policy.implies(this, perm);
+            } else {
+                if (policy.implies(this, perm)) {
+                    return true;
+                }
+                p2 = FilePermCompat.newPermUsingAltPath(perm);
+                p2Calculated = true;
+                if (p2 != null && policy.implies(this, p2)) {
+                    return true;
+                }
+            }
+        }
+        if (permissions != null) {
+            if (permissions.implies(perm)) {
+                return true;
+            } else {
+                if (!p2Calculated) {
+                    p2 = FilePermCompat.newPermUsingAltPath(perm);
+                }
+                if (p2 != null) {
+                    return permissions.implies(p2);
+                }
+            }
+        }
+        return false;
+    }
+
     // called by the VM -- do not remove
     boolean impliesCreateAccessControlContext() {
         return implies(SecurityConstants.CREATE_ACC_PERMISSION);
--- a/src/java.base/share/classes/java/security/Signature.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/security/Signature.java	Thu Oct 13 09:02:13 2016 -0700
@@ -37,7 +37,6 @@
 import java.security.Provider.Service;
 
 import javax.crypto.Cipher;
-import javax.crypto.CipherSpi;
 import javax.crypto.IllegalBlockSizeException;
 import javax.crypto.BadPaddingException;
 import javax.crypto.NoSuchPaddingException;
@@ -180,15 +179,12 @@
     private static final String RSA_CIPHER = "RSA/ECB/PKCS1Padding";
 
     // all the services we need to lookup for compatibility with Cipher
-    private static final List<ServiceId> rsaIds = Arrays.asList(
-        new ServiceId[] {
-            new ServiceId("Signature", "NONEwithRSA"),
-            new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"),
-            new ServiceId("Cipher", "RSA/ECB"),
-            new ServiceId("Cipher", "RSA//PKCS1Padding"),
-            new ServiceId("Cipher", "RSA"),
-        }
-    );
+    private static final List<ServiceId> rsaIds = List.of(
+        new ServiceId("Signature", "NONEwithRSA"),
+        new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"),
+        new ServiceId("Cipher", "RSA/ECB"),
+        new ServiceId("Cipher", "RSA//PKCS1Padding"),
+        new ServiceId("Cipher", "RSA"));
 
     /**
      * Returns a Signature object that implements the specified signature
--- a/src/java.base/share/classes/java/text/DecimalFormat.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/text/DecimalFormat.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, 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
@@ -968,7 +968,7 @@
      *     Decimal  : min = 0. max = 3.
      *
      */
-    private void checkAndSetFastPathStatus() {
+    private boolean checkAndSetFastPathStatus() {
 
         boolean fastPathWasOn = isFastPath;
 
@@ -998,12 +998,27 @@
         } else
             isFastPath = false;
 
+        resetFastPathData(fastPathWasOn);
+        fastPathCheckNeeded = false;
+
+        /*
+         * Returns true after successfully checking the fast path condition and
+         * setting the fast path data. The return value is used by the
+         * fastFormat() method to decide whether to call the resetFastPathData
+         * method to reinitialize fast path data or is it already initialized
+         * in this method.
+         */
+        return true;
+    }
+
+    private void resetFastPathData(boolean fastPathWasOn) {
         // Since some instance properties may have changed while still falling
         // in the fast-path case, we need to reinitialize fastPathData anyway.
         if (isFastPath) {
             // We need to instantiate fastPathData if not already done.
-            if (fastPathData == null)
+            if (fastPathData == null) {
                 fastPathData = new FastPathData();
+            }
 
             // Sets up the locale specific constants used when formatting.
             // '0' is our default representation of zero.
@@ -1011,22 +1026,27 @@
             fastPathData.groupingChar = symbols.getGroupingSeparator();
 
             // Sets up fractional constants related to currency/decimal pattern.
-            fastPathData.fractionalMaxIntBound = (isCurrencyFormat) ? 99 : 999;
-            fastPathData.fractionalScaleFactor = (isCurrencyFormat) ? 100.0d : 1000.0d;
+            fastPathData.fractionalMaxIntBound = (isCurrencyFormat)
+                    ? 99 : 999;
+            fastPathData.fractionalScaleFactor = (isCurrencyFormat)
+                    ? 100.0d : 1000.0d;
 
             // Records the need for adding prefix or suffix
-            fastPathData.positiveAffixesRequired =
-                (positivePrefix.length() != 0) || (positiveSuffix.length() != 0);
-            fastPathData.negativeAffixesRequired =
-                (negativePrefix.length() != 0) || (negativeSuffix.length() != 0);
+            fastPathData.positiveAffixesRequired
+                    = (positivePrefix.length() != 0)
+                        || (positiveSuffix.length() != 0);
+            fastPathData.negativeAffixesRequired
+                    = (negativePrefix.length() != 0)
+                        || (negativeSuffix.length() != 0);
 
             // Creates a cached char container for result, with max possible size.
             int maxNbIntegralDigits = 10;
             int maxNbGroups = 3;
-            int containerSize =
-                Math.max(positivePrefix.length(), negativePrefix.length()) +
-                maxNbIntegralDigits + maxNbGroups + 1 + maximumFractionDigits +
-                Math.max(positiveSuffix.length(), negativeSuffix.length());
+            int containerSize
+                    = Math.max(positivePrefix.length(), negativePrefix.length())
+                    + maxNbIntegralDigits + maxNbGroups + 1
+                    + maximumFractionDigits
+                    + Math.max(positiveSuffix.length(), negativeSuffix.length());
 
             fastPathData.fastPathContainer = new char[containerSize];
 
@@ -1038,17 +1058,18 @@
 
             // Sets up fixed index positions for integral and fractional digits.
             // Sets up decimal point in cached result container.
-            int longestPrefixLength =
-                Math.max(positivePrefix.length(), negativePrefix.length());
-            int decimalPointIndex =
-                maxNbIntegralDigits + maxNbGroups + longestPrefixLength;
-
-            fastPathData.integralLastIndex    = decimalPointIndex - 1;
+            int longestPrefixLength
+                    = Math.max(positivePrefix.length(),
+                            negativePrefix.length());
+            int decimalPointIndex
+                    = maxNbIntegralDigits + maxNbGroups + longestPrefixLength;
+
+            fastPathData.integralLastIndex = decimalPointIndex - 1;
             fastPathData.fractionalFirstIndex = decimalPointIndex + 1;
-            fastPathData.fastPathContainer[decimalPointIndex] =
-                isCurrencyFormat ?
-                symbols.getMonetaryDecimalSeparator() :
-                symbols.getDecimalSeparator();
+            fastPathData.fastPathContainer[decimalPointIndex]
+                    = isCurrencyFormat
+                            ? symbols.getMonetaryDecimalSeparator()
+                            : symbols.getDecimalSeparator();
 
         } else if (fastPathWasOn) {
             // Previous state was fast-path and is no more.
@@ -1059,8 +1080,6 @@
             fastPathData.charsPositivePrefix = null;
             fastPathData.charsNegativePrefix = null;
         }
-
-        fastPathCheckNeeded = false;
     }
 
     /**
@@ -1554,9 +1573,11 @@
      * @return the formatted result for {@code d} as a string.
      */
     String fastFormat(double d) {
+        boolean isDataSet = false;
         // (Re-)Evaluates fast-path status if needed.
-        if (fastPathCheckNeeded)
-            checkAndSetFastPathStatus();
+        if (fastPathCheckNeeded) {
+            isDataSet = checkAndSetFastPathStatus();
+        }
 
         if (!isFastPath )
             // DecimalFormat instance is not in a fast-path state.
@@ -1580,9 +1601,21 @@
         if (d > MAX_INT_AS_DOUBLE)
             // Filters out values that are outside expected fast-path range
             return null;
-        else
+        else {
+            if (!isDataSet) {
+                /*
+                 * If the fast path data is not set through
+                 * checkAndSetFastPathStatus() and fulfil the
+                 * fast path conditions then reset the data
+                 * directly through resetFastPathData()
+                 */
+                resetFastPathData(isFastPath);
+            }
             fastDoubleFormat(d, negative);
 
+        }
+
+
         // Returns a new string from updated fastPathContainer.
         return new String(fastPathData.fastPathContainer,
                           fastPathData.firstUsedIndex,
--- a/src/java.base/share/classes/java/time/Duration.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/Duration.java	Thu Oct 13 09:02:13 2016 -0700
@@ -88,8 +88,6 @@
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 import java.util.regex.Matcher;
@@ -578,8 +576,7 @@
      * the simple initialization in Duration.
      */
     private static class DurationUnits {
-        static final List<TemporalUnit> UNITS =
-                Collections.unmodifiableList(Arrays.<TemporalUnit>asList(SECONDS, NANOS));
+        static final List<TemporalUnit> UNITS = List.of(SECONDS, NANOS);
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/Period.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/Period.java	Thu Oct 13 09:02:13 2016 -0700
@@ -83,8 +83,6 @@
 import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 import java.util.regex.Matcher;
@@ -152,8 +150,7 @@
     /**
      * The set of supported units.
      */
-    private static final List<TemporalUnit> SUPPORTED_UNITS =
-            Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
+    private static final List<TemporalUnit> SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
 
     /**
      * The number of years.
--- a/src/java.base/share/classes/java/time/ZoneId.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/ZoneId.java	Thu Oct 13 09:02:13 2016 -0700
@@ -76,14 +76,14 @@
 import java.time.zone.ZoneRules;
 import java.time.zone.ZoneRulesException;
 import java.time.zone.ZoneRulesProvider;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
 import java.util.TimeZone;
 
+import static java.util.Map.entry;
+
 /**
  * A time-zone ID, such as {@code Europe/Paris}.
  * <p>
@@ -220,39 +220,36 @@
      * </ul>
      * The map is unmodifiable.
      */
-    public static final Map<String, String> SHORT_IDS;
-    static {
-        Map<String, String> map = new HashMap<>(64);
-        map.put("ACT", "Australia/Darwin");
-        map.put("AET", "Australia/Sydney");
-        map.put("AGT", "America/Argentina/Buenos_Aires");
-        map.put("ART", "Africa/Cairo");
-        map.put("AST", "America/Anchorage");
-        map.put("BET", "America/Sao_Paulo");
-        map.put("BST", "Asia/Dhaka");
-        map.put("CAT", "Africa/Harare");
-        map.put("CNT", "America/St_Johns");
-        map.put("CST", "America/Chicago");
-        map.put("CTT", "Asia/Shanghai");
-        map.put("EAT", "Africa/Addis_Ababa");
-        map.put("ECT", "Europe/Paris");
-        map.put("IET", "America/Indiana/Indianapolis");
-        map.put("IST", "Asia/Kolkata");
-        map.put("JST", "Asia/Tokyo");
-        map.put("MIT", "Pacific/Apia");
-        map.put("NET", "Asia/Yerevan");
-        map.put("NST", "Pacific/Auckland");
-        map.put("PLT", "Asia/Karachi");
-        map.put("PNT", "America/Phoenix");
-        map.put("PRT", "America/Puerto_Rico");
-        map.put("PST", "America/Los_Angeles");
-        map.put("SST", "Pacific/Guadalcanal");
-        map.put("VST", "Asia/Ho_Chi_Minh");
-        map.put("EST", "-05:00");
-        map.put("MST", "-07:00");
-        map.put("HST", "-10:00");
-        SHORT_IDS = Collections.unmodifiableMap(map);
-    }
+    public static final Map<String, String> SHORT_IDS = Map.ofEntries(
+        entry("ACT", "Australia/Darwin"),
+        entry("AET", "Australia/Sydney"),
+        entry("AGT", "America/Argentina/Buenos_Aires"),
+        entry("ART", "Africa/Cairo"),
+        entry("AST", "America/Anchorage"),
+        entry("BET", "America/Sao_Paulo"),
+        entry("BST", "Asia/Dhaka"),
+        entry("CAT", "Africa/Harare"),
+        entry("CNT", "America/St_Johns"),
+        entry("CST", "America/Chicago"),
+        entry("CTT", "Asia/Shanghai"),
+        entry("EAT", "Africa/Addis_Ababa"),
+        entry("ECT", "Europe/Paris"),
+        entry("IET", "America/Indiana/Indianapolis"),
+        entry("IST", "Asia/Kolkata"),
+        entry("JST", "Asia/Tokyo"),
+        entry("MIT", "Pacific/Apia"),
+        entry("NET", "Asia/Yerevan"),
+        entry("NST", "Pacific/Auckland"),
+        entry("PLT", "Asia/Karachi"),
+        entry("PNT", "America/Phoenix"),
+        entry("PRT", "America/Puerto_Rico"),
+        entry("PST", "America/Los_Angeles"),
+        entry("SST", "Pacific/Guadalcanal"),
+        entry("VST", "Asia/Ho_Chi_Minh"),
+        entry("EST", "-05:00"),
+        entry("MST", "-07:00"),
+        entry("HST", "-10:00")
+    );
     /**
      * Serialization version.
      */
--- a/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java	Thu Oct 13 09:02:13 2016 -0700
@@ -77,8 +77,6 @@
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 
@@ -105,8 +103,7 @@
     /**
      * The set of supported units.
      */
-    private static final List<TemporalUnit> SUPPORTED_UNITS =
-            Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
+    private static final List<TemporalUnit> SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
 
     /**
      * The chronology.
--- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Thu Oct 13 09:02:13 2016 -0700
@@ -59,10 +59,7 @@
 
 import static java.time.temporal.ChronoField.EPOCH_DAY;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.FilePermission;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
@@ -83,7 +80,6 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Properties;
 
 import sun.util.logging.PlatformLogger;
@@ -512,7 +508,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(HijrahEra.values());
+        return List.of(HijrahEra.values());
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/chrono/IsoChronology.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/IsoChronology.java	Thu Oct 13 09:02:13 2016 -0700
@@ -90,7 +90,6 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.ValueRange;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -492,7 +491,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(IsoEra.values());
+        return List.of(IsoEra.values());
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java	Thu Oct 13 09:02:13 2016 -0700
@@ -81,7 +81,6 @@
 import java.time.temporal.TemporalField;
 import java.time.temporal.UnsupportedTemporalTypeException;
 import java.time.temporal.ValueRange;
-import java.util.Arrays;
 import java.util.Calendar;
 import java.util.List;
 import java.util.Locale;
@@ -379,7 +378,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(JapaneseEra.values());
+        return List.of(JapaneseEra.values());
     }
 
     JapaneseEra getCurrentEra() {
--- a/src/java.base/share/classes/java/time/chrono/MinguoChronology.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/MinguoChronology.java	Thu Oct 13 09:02:13 2016 -0700
@@ -72,7 +72,6 @@
 import java.time.temporal.TemporalAccessor;
 import java.time.temporal.TemporalField;
 import java.time.temporal.ValueRange;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -306,7 +305,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(MinguoEra.values());
+        return List.of(MinguoEra.values());
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Thu Oct 13 09:02:13 2016 -0700
@@ -342,7 +342,7 @@
 
     @Override
     public List<Era> eras() {
-        return Arrays.<Era>asList(ThaiBuddhistEra.values());
+        return List.of(ThaiBuddhistEra.values());
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1685,6 +1685,7 @@
     public DateTimeFormatter withResolverFields(TemporalField... resolverFields) {
         Set<TemporalField> fields = null;
         if (resolverFields != null) {
+            // Set.of cannot be used because it is hostile to nulls and duplicate elements
             fields = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(resolverFields)));
         }
         if (Objects.equals(this.resolverFields, fields)) {
--- a/src/java.base/share/classes/java/time/format/ZoneName.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/format/ZoneName.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, 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
@@ -25,11 +25,8 @@
 package java.time.format;
 
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
 
 /**
  * A helper class to map a zone name to metazone and back to the
@@ -335,6 +332,7 @@
         "America/Eirunepe", "Amazon", "America/Manaus",
         "Africa/Nairobi", "Africa_Eastern", "Africa/Nairobi",
         "Asia/Yakutsk", "Yakutsk", "Asia/Yakutsk",
+        "Asia/Yangon", "Myanmar", "Asia/Rangoon",
         "America/Goose_Bay", "Atlantic", "America/Halifax",
         "Africa/Maseru", "Africa_Southern", "Africa/Johannesburg",
         "America/Swift_Current", "America_Central", "America/Chicago",
@@ -770,6 +768,7 @@
         "America/Indianapolis", "America/Indiana/Indianapolis",
         "Europe/Belfast", "Europe/London",
         "America/Kralendijk", "America/Curacao",
+        "Asia/Rangoon", "Asia/Yangon",
     };
 
     private static final Map<String, String> zidToMzone = new HashMap<>();
--- a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java	Thu Oct 13 09:02:13 2016 -0700
@@ -387,9 +387,9 @@
      */
     List<ZoneOffset> getValidOffsets() {
         if (isGap()) {
-            return Collections.emptyList();
+            return List.of();
         }
-        return Arrays.asList(getOffsetBefore(), getOffsetAfter());
+        return List.of(getOffsetBefore(), getOffsetAfter());
     }
 
     //-----------------------------------------------------------------------
--- a/src/java.base/share/classes/java/time/zone/ZoneRules.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/time/zone/ZoneRules.java	Thu Oct 13 09:02:13 2016 -0700
@@ -303,7 +303,6 @@
      * Creates an instance of ZoneRules that has fixed zone rules.
      *
      * @param offset  the offset this fixed zone rules is based on, not null
-     * @return the zone rules, not null
      * @see #isFixedOffset()
      */
     private ZoneRules(ZoneOffset offset) {
@@ -970,7 +969,7 @@
      * @return an immutable list of transition rules, not null
      */
     public List<ZoneOffsetTransitionRule> getTransitionRules() {
-        return Collections.unmodifiableList(Arrays.asList(lastRules));
+        return List.of(lastRules);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/ArrayList.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/ArrayList.java	Thu Oct 13 09:02:13 2016 -0700
@@ -876,6 +876,7 @@
         int lastRet = -1; // index of last element returned; -1 if no such
         int expectedModCount = modCount;
 
+        // prevent creating a synthetic constructor
         Itr() {}
 
         public boolean hasNext() {
--- a/src/java.base/share/classes/java/util/Locale.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/Locale.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1027,7 +1027,7 @@
      * not contain ALL valid codes that can be used to create Locales.
      * </ul>
      *
-     * @return Am array of ISO 639 two-letter language codes.
+     * @return An array of ISO 639 two-letter language codes.
      */
     public static String[] getISOLanguages() {
         if (isoLanguages == null) {
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Thu Oct 13 09:02:13 2016 -0700
@@ -2491,34 +2491,29 @@
         /**
          * The default format <code>List</code>, which contains the strings
          * <code>"java.class"</code> and <code>"java.properties"</code>, in
-         * this order. This <code>List</code> is {@linkplain
-         * Collections#unmodifiableList(List) unmodifiable}.
+         * this order. This <code>List</code> is unmodifiable.
          *
          * @see #getFormats(String)
          */
         public static final List<String> FORMAT_DEFAULT
-            = Collections.unmodifiableList(Arrays.asList("java.class",
-                                                         "java.properties"));
+            = List.of("java.class", "java.properties");
 
         /**
          * The class-only format <code>List</code> containing
-         * <code>"java.class"</code>. This <code>List</code> is {@linkplain
-         * Collections#unmodifiableList(List) unmodifiable}.
+         * <code>"java.class"</code>. This <code>List</code> is unmodifiable.
          *
          * @see #getFormats(String)
          */
-        public static final List<String> FORMAT_CLASS
-            = Collections.unmodifiableList(Arrays.asList("java.class"));
+        public static final List<String> FORMAT_CLASS = List.of("java.class");
 
         /**
          * The properties-only format <code>List</code> containing
-         * <code>"java.properties"</code>. This <code>List</code> is
-         * {@linkplain Collections#unmodifiableList(List) unmodifiable}.
+         * <code>"java.properties"</code>. This <code>List</code> is unmodifiable.
          *
          * @see #getFormats(String)
          */
         public static final List<String> FORMAT_PROPERTIES
-            = Collections.unmodifiableList(Arrays.asList("java.properties"));
+            = List.of("java.properties");
 
         /**
          * The time-to-live constant for not caching loaded resource bundle
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Thu Oct 13 09:02:13 2016 -0700
@@ -108,10 +108,18 @@
      * if the current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
         return VALUE.weakCompareAndSetPlain(this,
                                             (expectedValue ? 1 : 0),
@@ -119,6 +127,22 @@
     }
 
     /**
+     * Possibly atomically sets the value to {@code newValue}
+     * if the current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public boolean weakCompareAndSetPlain(boolean expectedValue, boolean newValue) {
+        return VALUE.weakCompareAndSetPlain(this,
+                                            (expectedValue ? 1 : 0),
+                                            (newValue ? 1 : 0));
+    }
+
+    /**
      * Sets the value to {@code newValue},
      * with memory effects as specified by {@link VarHandle#setVolatile}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Thu Oct 13 09:02:13 2016 -0700
@@ -148,15 +148,37 @@
      * if the current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(int expectedValue, int newValue) {
         return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the value to {@code newValue}
+     * if the current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(int expectedValue, int newValue) {
+        return U.weakCompareAndSwapInt(this, VALUE, expectedValue, newValue);
+    }
+
+    /**
      * Atomically increments the current value,
      * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Thu Oct 13 09:02:13 2016 -0700
@@ -151,16 +151,39 @@
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param i the index
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
         return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the element at index {@code i} to
+     * {@code newValue} if the element's current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param i the index
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(int i, int expectedValue, int newValue) {
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
+    }
+
+    /**
      * Atomically increments the value of the element at index {@code i},
      * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Thu Oct 13 09:02:13 2016 -0700
@@ -164,15 +164,37 @@
      * if the current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(long expectedValue, long newValue) {
         return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the value to {@code newValue}
+     * if the current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(long expectedValue, long newValue) {
+        return U.weakCompareAndSwapLong(this, VALUE, expectedValue, newValue);
+    }
+
+    /**
      * Atomically increments the current value,
      * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Thu Oct 13 09:02:13 2016 -0700
@@ -151,16 +151,39 @@
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param i the index
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
         return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the element at index {@code i} to
+     * {@code newValue} if the element's current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param i the index
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(int i, long expectedValue, long newValue) {
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
+    }
+
+    /**
      * Atomically increments the value of the element at index {@code i},
      * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Thu Oct 13 09:02:13 2016 -0700
@@ -127,15 +127,37 @@
      * if the current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(V expectedValue, V newValue) {
         return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the value to {@code newValue}
+     * if the current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(V expectedValue, V newValue) {
+        return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
+    }
+
+    /**
      * Atomically sets the value to {@code newValue} and returns the old value,
      * with memory effects as specified by {@link VarHandle#getAndSet}.
      *
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Thu Oct 13 09:02:13 2016 -0700
@@ -157,16 +157,39 @@
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
+     * @deprecated This method has plain memory effects but the method
+     * name implies volatile memory effects (see methods such as
+     * {@link #compareAndExchange} and {@link #compareAndSet}).  To avoid
+     * confusion over plain or volatile memory effects it is recommended that
+     * the method {@link #weakCompareAndSetPlain} be used instead.
+     *
      * @param i the index
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
+     * @see #weakCompareAndSetPlain
      */
+    @Deprecated(since="9")
     public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
         return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
+     * Possibly atomically sets the element at index {@code i} to
+     * {@code newValue} if the element's current value {@code == expectedValue},
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
+     *
+     * @param i the index
+     * @param expectedValue the expected value
+     * @param newValue the new value
+     * @return {@code true} if successful
+     * @since 9
+     */
+    public final boolean weakCompareAndSetPlain(int i, E expectedValue, E newValue) {
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
+    }
+
+    /**
      * Atomically updates the element at index {@code i} with the results
      * of applying the given function, returning the previous value. The
      * function should be side-effect-free, since it may be re-applied
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/java/util/spi/ToolProvider.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.util.spi;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.ServiceLoader;
+import java.util.stream.StreamSupport;
+
+/**
+ * An interface for command-line tools to provide a way to
+ * be invoked without necessarily starting a new VM.
+ *
+ * <p>Tool providers are normally located using the service-provider
+ * loading facility defined by {@link ServiceLoader}.
+ * Each provider must provide a name, and a method to run
+ * an instance of the corresponding tool. When a tool is run,
+ * it will be provided with an array of string arguments, and a
+ * pair of streams: one for normal (or expected) output and the other
+ * for reporting any errors that may occur.
+ * The interpretation of the string arguments will normally be defined by
+ * each individual tool provider, but will generally correspond to the
+ * arguments that could be provided to the tool when invoking the tool
+ * from the command line.
+ *
+ * @since 9
+ */
+public interface ToolProvider {
+    /**
+     * Returns the name of this tool provider.
+     *
+     * @apiNote It is recommended that the name be the same as would be
+     * used on the command line: for example, "javac", "jar", "jlink".
+     *
+     * @return the name of this tool provider
+     */
+    String name();
+
+    /**
+     * Runs an instance of the tool, returning zero for a successful run.
+     * Any non-zero return value indicates a tool-specific error during the
+     * execution.
+     *
+     * Two streams should be provided, for "expected" output, and for any
+     * error messages. If it is not necessary to distinguish the output,
+     * the same stream may be used for both.
+     *
+     * @apiNote The interpretation of the arguments will be specific to
+     * each tool.
+     *
+     * @param out a stream to which "expected" output should be written
+     *
+     * @param err a stream to which any error messages should be written
+     *
+     * @param args the command-line arguments for the tool
+     *
+     * @return the result of executing the tool.
+     *         A return value of 0 means the tool did not encounter any errors;
+     *         any other value indicates that at least one error occurred
+     *         during execution.
+     *
+     * @throws NullPointerException if any of the arguments are {@code null},
+     *         or if there are any {@code null} values in the {@code args}
+     *         array
+     */
+    int run(PrintWriter out, PrintWriter err, String... args);
+
+    /**
+     * Runs an instance of the tool, returning zero for a successful run.
+     * Any non-zero return value indicates a tool-specific error during the
+     * execution.
+     *
+     * Two streams should be provided, for "expected" output, and for any
+     * error messages. If it is not necessary to distinguish the output,
+     * the same stream may be used for both.
+     *
+     * @apiNote The interpretation of the arguments will be specific to
+     * each tool.
+     *
+     * @implNote This implementation wraps the {@code out} and {@code err}
+     * streams within {@link PrintWriter}s, and then calls
+     * {@link #run(PrintWriter, PrintWriter, String[])}.
+     *
+     * @param out a stream to which "expected" output should be written
+     *
+     * @param err a stream to which any error messages should be written
+     *
+     * @param args the command-line arguments for the tool
+     *
+     * @return the result of executing the tool.
+     *         A return value of 0 means the tool did not encounter any errors;
+     *         any other value indicates that at least one error occurred
+     *         during execution.
+     *
+     * @throws NullPointerException if any of the arguments are {@code null},
+     *         or if there are any {@code null} values in the {@code args}
+     *         array
+     */
+    default int run(PrintStream out, PrintStream err, String... args) {
+        Objects.requireNonNull(out);
+        Objects.requireNonNull(err);
+        for (String arg : args) {
+            Objects.requireNonNull(args);
+        }
+
+        PrintWriter outWriter = new PrintWriter(out);
+        PrintWriter errWriter = new PrintWriter(err);
+        try {
+            try {
+                return run(outWriter, errWriter, args);
+            } finally {
+                outWriter.flush();
+            }
+        } finally {
+            errWriter.flush();
+        }
+    }
+
+    /**
+     * Returns the first instance of a {@code ToolProvider} with the given name,
+     * as loaded by {@link ServiceLoader} using the system class loader.
+     *
+     * @param name the name of the desired tool provider
+     *
+     * @return an {@code Optional<ToolProvider>} of the first instance found
+     *
+     * @throws NullPointerException if {@code name} is {@code null}
+     */
+    static Optional<ToolProvider> findFirst(String name) {
+        Objects.requireNonNull(name);
+        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
+        return AccessController.doPrivileged(
+            (PrivilegedAction<Optional<ToolProvider>>) () -> {
+                ServiceLoader<ToolProvider> sl =
+                    ServiceLoader.load(ToolProvider.class, systemClassLoader);
+                return StreamSupport.stream(sl.spliterator(), false)
+                    .filter(p -> p.name().equals(name))
+                    .findFirst();
+            });
+    }
+}
+
--- a/src/java.base/share/classes/java/util/stream/Collectors.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/java/util/stream/Collectors.java	Thu Oct 13 09:02:13 2016 -0700
@@ -27,7 +27,6 @@
 import java.util.AbstractMap;
 import java.util.AbstractSet;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
@@ -1720,12 +1719,12 @@
 
         @Override
         public Set<Map.Entry<Boolean, T>> entrySet() {
-            return new AbstractSet<Map.Entry<Boolean, T>>() {
+            return new AbstractSet<>() {
                 @Override
                 public Iterator<Map.Entry<Boolean, T>> iterator() {
                     Map.Entry<Boolean, T> falseEntry = new SimpleImmutableEntry<>(false, forFalse);
                     Map.Entry<Boolean, T> trueEntry = new SimpleImmutableEntry<>(true, forTrue);
-                    return Arrays.asList(falseEntry, trueEntry).iterator();
+                    return List.of(falseEntry, trueEntry).iterator();
                 }
 
                 @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.jmod;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.stream.Stream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * Helper class to read JMOD file
+ */
+public class JmodFile implements AutoCloseable {
+    // jmod magic number and version number
+    public static final int JMOD_MAJOR_VERSION = 0x01;
+    public static final int JMOD_MINOR_VERSION = 0x00;
+    public static final byte[] JMOD_MAGIC_NUMBER = {
+        0x4A, 0x4D, /* JM */
+        JMOD_MAJOR_VERSION, JMOD_MINOR_VERSION, /* version 1.0 */
+    };
+
+    public static void checkMagic(Path file) throws IOException {
+        try (InputStream in = Files.newInputStream(file);
+             BufferedInputStream bis = new BufferedInputStream(in)) {
+            // validate the header
+            byte[] magic = new byte[4];
+            bis.read(magic);
+            if (magic[0] != JMOD_MAGIC_NUMBER[0] ||
+                magic[1] != JMOD_MAGIC_NUMBER[1]) {
+                throw new IOException("Invalid jmod file: " + file.toString());
+            }
+            if (magic[2] > JMOD_MAJOR_VERSION ||
+                (magic[2] == JMOD_MAJOR_VERSION && magic[3] > JMOD_MINOR_VERSION)) {
+                throw new IOException("Unsupported jmod version: " +
+                    magic[2] + "." + magic[3] + " in " + file.toString());
+            }
+        }
+    }
+
+    /**
+     * JMOD sections
+     */
+    public static enum Section {
+        NATIVE_LIBS("native"),
+        NATIVE_CMDS("bin"),
+        CLASSES("classes"),
+        CONFIG("conf");
+
+        private final String jmodDir;
+        private Section(String jmodDir) {
+            this.jmodDir = jmodDir;
+        }
+
+        /**
+         * Returns the directory name in the JMOD file corresponding to
+         * this section
+         */
+        public String jmodDir() { return jmodDir; }
+
+    }
+
+    /**
+     * JMOD file entry.
+     *
+     * Each entry corresponds to a ZipEntry whose name is:
+     *   Section::jmodDir + '/' + name
+     */
+    public static class Entry {
+        private final ZipEntry zipEntry;
+        private final Section section;
+        private final String name;
+
+        private Entry(ZipEntry e) {
+            String name = e.getName();
+            int i = name.indexOf('/');
+            if (i <= 1) {
+                throw new RuntimeException("invalid jmod entry: " + name);
+            }
+
+            this.zipEntry = e;
+            this.section = section(name);
+            this.name = name.substring(i+1);
+        }
+
+        /**
+         * Returns the section of this entry.
+         */
+        public Section section() {
+            return section;
+        }
+
+        /**
+         * Returns the name of this entry.
+         */
+        public String name() {
+            return name;
+        }
+
+        /**
+         * Returns the size of this entry.
+         */
+        public long size() {
+            return zipEntry.getSize();
+        }
+
+        public ZipEntry zipEntry() {
+            return zipEntry;
+        }
+
+        @Override
+        public String toString() {
+            return section.jmodDir() + "/" + name;
+        }
+
+        static Section section(String name) {
+            int i = name.indexOf('/');
+            String s = name.substring(0, i);
+            switch (s) {
+                case "native":
+                    return Section.NATIVE_LIBS;
+                case "bin":
+                    return Section.NATIVE_CMDS;
+                case "classes":
+                    return Section.CLASSES;
+                case "conf":
+                    return Section.CONFIG;
+                default:
+                    throw new IllegalArgumentException("invalid section: " + s);
+            }
+        }
+    }
+
+    private final Path file;
+    private final ZipFile zipfile;
+
+    /**
+     * Constructs a {@code JmodFile} from a given path.
+     */
+    public JmodFile(Path file) throws IOException {
+        checkMagic(file);
+        this.file = file;
+        this.zipfile = new ZipFile(file.toFile());
+    }
+
+    /**
+     * Opens an {@code InputStream} for reading the named entry of the given
+     * section in this jmod file.
+     *
+     * @throws IOException if the named entry is not found, or I/O error
+     *         occurs when reading it
+     */
+    public InputStream getInputStream(Section section, String name)
+        throws IOException
+    {
+
+        String entry = section.jmodDir() + "/" + name;
+        ZipEntry e = zipfile.getEntry(entry);
+        if (e == null) {
+            throw new IOException(name + " not found: " + file);
+        }
+        return zipfile.getInputStream(e);
+    }
+
+    /**
+     * Returns a stream of non-directory entries in this jmod file.
+     */
+    public Stream<Entry> stream() {
+        return zipfile.stream()
+                      .filter(e -> !e.isDirectory())
+                      .map(Entry::new);
+    }
+
+    @Override
+    public void close() throws IOException {
+        if (zipfile != null) {
+            zipfile.close();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/misc/JavaIOFilePermissionAccess.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.misc;
+
+import java.io.FilePermission;
+
+public interface JavaIOFilePermissionAccess {
+
+    /**
+     * Returns a new FilePermission plus an alternative path.
+     *
+     * @param input the input
+     * @return the new FilePermission plus the alt path (as npath2)
+     *         or the input itself if no alt path is available.
+     */
+    FilePermission newPermPlusAltPath(FilePermission input);
+
+    /**
+     * Returns a new FilePermission using an alternative path.
+     *
+     * @param input the input
+     * @return the new FilePermission using the alt path (as npath)
+     *         or null if no alt path is available
+     */
+    FilePermission newPermUsingAltPath(FilePermission input);
+}
--- a/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Oct 13 09:02:13 2016 -0700
@@ -29,6 +29,7 @@
 import java.util.jar.JarFile;
 import java.io.Console;
 import java.io.FileDescriptor;
+import java.io.FilePermission;
 import java.io.ObjectInputStream;
 import java.io.RandomAccessFile;
 import java.security.ProtectionDomain;
@@ -58,6 +59,7 @@
     private static JavaNetSocketAccess javaNetSocketAccess;
     private static JavaNioAccess javaNioAccess;
     private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
+    private static JavaIOFilePermissionAccess javaIOFilePermissionAccess;
     private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
     private static JavaSecurityAccess javaSecurityAccess;
     private static JavaUtilZipFileAccess javaUtilZipFileAccess;
@@ -201,6 +203,17 @@
         javaIOFileDescriptorAccess = jiofda;
     }
 
+    public static JavaIOFilePermissionAccess getJavaIOFilePermissionAccess() {
+        if (javaIOFilePermissionAccess == null)
+            unsafe.ensureClassInitialized(FilePermission.class);
+
+        return javaIOFilePermissionAccess;
+    }
+
+    public static void setJavaIOFilePermissionAccess(JavaIOFilePermissionAccess jiofpa) {
+        javaIOFilePermissionAccess = jiofpa;
+    }
+
     public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
         if (javaIOFileDescriptorAccess == null)
             unsafe.ensureClassInitialized(FileDescriptor.class);
--- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Thu Oct 13 09:02:13 2016 -0700
@@ -430,22 +430,23 @@
             // the key is $MODULE
             String mn = e.getKey();
             Optional<Module> om = bootLayer.findModule(mn);
-            if (!om.isPresent())
-                fail("Unknown module: " + mn);
+            if (!om.isPresent()) {
+                warn("Unknown module: " + mn);
+                continue;
+            }
             Module m = om.get();
 
             // the value is the set of other modules (by name)
             for (String name : e.getValue()) {
-
-                Module other;
                 if (ALL_UNNAMED.equals(name)) {
                     Modules.addReadsAllUnnamed(m);
                 } else {
                     om = bootLayer.findModule(name);
-                    if (!om.isPresent())
-                        fail("Unknown module: " + name);
-                    other = om.get();
-                    Modules.addReads(m, other);
+                    if (om.isPresent()) {
+                        Modules.addReads(m, om.get());
+                    } else {
+                        warn("Unknown module: " + name);
+                    }
                 }
 
             }
@@ -472,14 +473,24 @@
 
             String mn = s[0];
             String pn = s[1];
+            if (mn.isEmpty() || pn.isEmpty())
+                fail("Module and package name must be specified:" + key);
 
             // The exporting module is in the boot layer
             Module m;
             Optional<Module> om = bootLayer.findModule(mn);
-            if (!om.isPresent())
-                fail("Unknown module: " + mn);
+            if (!om.isPresent()) {
+                warn("Unknown module: " + mn);
+                continue;
+            }
+
             m = om.get();
 
+            if (!m.getDescriptor().packages().contains(pn)) {
+                warn("package " + pn + " not in " + mn);
+                continue;
+            }
+
             // the value is the set of modules to export to (by name)
             for (String name : e.getValue()) {
                 boolean allUnnamed = false;
@@ -491,10 +502,10 @@
                     if (om.isPresent()) {
                         other = om.get();
                     } else {
-                        fail("Unknown module: " + name);
+                        warn("Unknown module: " + name);
+                        continue;
                     }
                 }
-
                 if (allUnnamed) {
                     Modules.addExportsToAllUnnamed(m, pn);
                 } else {
@@ -534,13 +545,7 @@
             if (rhs.isEmpty())
                 fail("Unable to parse: " + value);
 
-
-            // value is <module>(,<module>)*
-            if (map.containsKey(key))
-                 fail(key + " specified more than once");
-
-            Set<String> values = new HashSet<>();
-            map.put(key, values);
+            Set<String> values = map.computeIfAbsent(key, k -> new HashSet<>());
             for (String s : rhs.split(",")) {
                 if (s.length() > 0) values.add(s);
             }
@@ -566,6 +571,10 @@
         throw new RuntimeException(m);
     }
 
+    static void warn(String m) {
+        System.err.println("WARNING: " + m);
+    }
+
     static class PerfCounters {
 
         static PerfCounter systemModulesTime
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java	Thu Oct 13 09:02:13 2016 -0700
@@ -163,6 +163,16 @@
      * be discarded.
      */
     public void write(OutputStream out) throws IOException {
+        // emit to the output stream
+        out.write(toByteArray());
+    }
+
+    /**
+     * Returns the bytes of the modified module-info.class.
+     * Once this method has been called then the Extender object should
+     * be discarded.
+     */
+    public byte[] toByteArray() throws IOException {
         ClassWriter cw
             = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
 
@@ -197,8 +207,7 @@
         // add any attributes that didn't replace previous attributes
         cv.finish();
 
-        // emit to the output stream
-        out.write(cw.toByteArray());
+        return cw.toByteArray();
     }
 
     /**
--- a/src/java.base/share/classes/module-info.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/module-info.java	Thu Oct 13 09:02:13 2016 -0700
@@ -108,6 +108,7 @@
     uses java.util.spi.ResourceBundleControlProvider;
     uses java.util.spi.ResourceBundleProvider;
     uses java.util.spi.TimeZoneNameProvider;
+    uses java.util.spi.ToolProvider;
     uses javax.security.auth.spi.LoginModule;
 
 
@@ -124,6 +125,9 @@
         jdk.jlink;
     exports jdk.internal.jimage.decompressor to
         jdk.jlink;
+    exports jdk.internal.jmod to
+        jdk.compiler,
+        jdk.jlink;
     exports jdk.internal.logger to
         java.logging;
     exports jdk.internal.org.objectweb.asm to
@@ -150,7 +154,6 @@
     exports jdk.internal.module to
         java.instrument,
         java.management,
-        jdk.dynalink,
         jdk.jartool,
         jdk.jlink;
     exports jdk.internal.misc to
--- a/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java	Thu Oct 13 09:02:13 2016 -0700
@@ -41,10 +41,6 @@
 import java.util.*;
 import java.text.SimpleDateFormat;
 
-import sun.security.action.GetPropertyAction;
-import sun.security.action.GetIntegerAction;
-import sun.security.action.GetBooleanAction;
-
 public class FileURLConnection extends URLConnection {
 
     static String CONTENT_LENGTH = "content-length";
@@ -224,8 +220,13 @@
             if (File.separatorChar == '/') {
                 permission = new FilePermission(decodedPath, "read");
             } else {
+                // decode could return /c:/x/y/z.
+                if (decodedPath.length() > 2 && decodedPath.charAt(0) == '/'
+                        && decodedPath.charAt(2) == ':') {
+                    decodedPath = decodedPath.substring(1);
+                }
                 permission = new FilePermission(
-                        decodedPath.replace('/',File.separatorChar), "read");
+                        decodedPath.replace('/', File.separatorChar), "read");
             }
         }
         return permission;
--- a/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Thu Oct 13 09:02:13 2016 -0700
@@ -45,11 +45,7 @@
 import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
 import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
 import jdk.internal.misc.SharedSecrets;
-import sun.security.util.PolicyUtil;
-import sun.security.util.PropertyExpander;
-import sun.security.util.Debug;
-import sun.security.util.ResourcesMgr;
-import sun.security.util.SecurityConstants;
+import sun.security.util.*;
 import sun.net.www.ParseUtil;
 
 /**
@@ -534,8 +530,6 @@
     /**
      * Reads a policy configuration into the Policy object using a
      * Reader object.
-     *
-     * @param policyFile the policy Reader object.
      */
     private boolean init(URL policy, PolicyInfo newInfo, boolean defPolicy) {
 
@@ -1099,7 +1093,7 @@
             synchronized (pc) {
                 Enumeration<Permission> e = pc.elements();
                 while (e.hasMoreElements()) {
-                    perms.add(e.nextElement());
+                    perms.add(FilePermCompat.newPermPlusAltPath(e.nextElement()));
                 }
             }
         }
@@ -1127,7 +1121,7 @@
      * object with additional permissions granted to the specified
      * ProtectionDomain.
      *
-     * @param perm the Permissions to populate
+     * @param perms the Permissions to populate
      * @param pd the ProtectionDomain associated with the caller.
      *
      * @return the set of Permissions according to the policy.
@@ -1157,8 +1151,8 @@
      * object with additional permissions granted to the specified
      * CodeSource.
      *
-     * @param permissions the permissions to populate
-     * @param codesource the codesource associated with the caller.
+     * @param perms the permissions to populate
+     * @param cs the codesource associated with the caller.
      * This encapsulates the original location of the code (where the code
      * came from) and the public key(s) of its signer.
      *
@@ -1386,7 +1380,7 @@
                         accPs,
                         perms);
             } else {
-                perms.add(p);
+                perms.add(FilePermCompat.newPermPlusAltPath(p));
             }
         }
     }
@@ -1458,9 +1452,9 @@
         }
         try {
             // first try to instantiate the permission
-            perms.add(getInstance(sp.getSelfType(),
+            perms.add(FilePermCompat.newPermPlusAltPath(getInstance(sp.getSelfType(),
                                   sb.toString(),
-                                  sp.getSelfActions()));
+                                  sp.getSelfActions())));
         } catch (ClassNotFoundException cnfe) {
             // ok, the permission is not in the bootclasspath.
             // before we add an UnresolvedPermission, check to see
--- a/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java	Thu Oct 13 09:02:13 2016 -0700
@@ -282,7 +282,7 @@
     private static int getPreferredCurve(int[] curves,
                 AlgorithmConstraints constraints) {
         for (int curveId : curves) {
-            if (constraints.permits(
+            if (isSupported(curveId) && constraints.permits(
                     EnumSet.of(CryptoPrimitive.KEY_AGREEMENT),
                                 "EC", idToParams.get(curveId))) {
                 return curveId;
--- a/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Thu Oct 13 09:02:13 2016 -0700
@@ -49,6 +49,7 @@
 import sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.PRF.*;
 import sun.security.util.KeyUtil;
+import sun.security.util.MessageDigestSpi2;
 import sun.security.provider.certpath.OCSPResponse;
 
 /**
@@ -2124,63 +2125,14 @@
         md.update(temp);
     }
 
-    private static final Class<?> delegate;
-    private static final Field spiField;
-
-    static {
-        try {
-            delegate = Class.forName("java.security.MessageDigest$Delegate");
-            spiField = delegate.getDeclaredField("digestSpi");
-        } catch (Exception e) {
-            throw new RuntimeException("Reflection failed", e);
-        }
-        makeAccessible(spiField);
-    }
-
-    private static void makeAccessible(final AccessibleObject o) {
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
-            @Override
-            public Object run() {
-                o.setAccessible(true);
-                return null;
-            }
-        });
-    }
-
-    // ConcurrentHashMap does not allow null values, use this marker object
-    private static final Object NULL_OBJECT = new Object();
-
-    // cache Method objects per Spi class
-    // Note that this will prevent the Spi classes from being GC'd. We assume
-    // that is not a problem.
-    private static final Map<Class<?>,Object> methodCache =
-                                        new ConcurrentHashMap<>();
-
     private static void digestKey(MessageDigest md, SecretKey key) {
         try {
-            // Verify that md is implemented via MessageDigestSpi, not
-            // via JDK 1.1 style MessageDigest subclassing.
-            if (md.getClass() != delegate) {
-                throw new Exception("Digest is not a MessageDigestSpi");
-            }
-            MessageDigestSpi spi = (MessageDigestSpi)spiField.get(md);
-            Class<?> clazz = spi.getClass();
-            Object r = methodCache.get(clazz);
-            if (r == null) {
-                try {
-                    r = clazz.getDeclaredMethod("implUpdate", SecretKey.class);
-                    makeAccessible((Method)r);
-                } catch (NoSuchMethodException e) {
-                    r = NULL_OBJECT;
-                }
-                methodCache.put(clazz, r);
-            }
-            if (r == NULL_OBJECT) {
+            if (md instanceof MessageDigestSpi2) {
+                ((MessageDigestSpi2)md).engineUpdate(key);
+            } else {
                 throw new Exception(
                     "Digest does not support implUpdate(SecretKey)");
             }
-            Method update = (Method)r;
-            update.invoke(spi, key);
         } catch (Exception e) {
             throw new RuntimeException(
                 "Could not obtain encoded key and "
--- a/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1172,11 +1172,18 @@
             if (trySetCipherSuite(suite) == false) {
                 continue;
             }
+
+            if (debug != null && Debug.isOn("handshake")) {
+                System.out.println("Standard ciphersuite chosen: " + suite);
+            }
             return;
         }
 
         for (CipherSuite suite : legacySuites) {
             if (trySetCipherSuite(suite)) {
+                if (debug != null && Debug.isOn("handshake")) {
+                    System.out.println("Legacy ciphersuite chosen: " + suite);
+                }
                 return;
             }
         }
--- a/src/java.base/share/classes/sun/security/util/AnchorCertificates.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/util/AnchorCertificates.java	Thu Oct 13 09:02:13 2016 -0700
@@ -31,8 +31,10 @@
 import java.security.KeyStore;
 import java.security.PrivilegedAction;
 import java.security.cert.X509Certificate;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashSet;
+import java.util.Set;
 
 import sun.security.x509.X509CertImpl;
 
@@ -44,7 +46,7 @@
 
     private static final Debug debug = Debug.getInstance("certpath");
     private static final String HASH = "SHA-256";
-    private static HashSet<String> certs;
+    private static Set<String> certs = Collections.emptySet();
 
     static  {
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Thu Oct 13 09:02:13 2016 -0700
@@ -543,7 +543,7 @@
      private static class DenyAfterConstraint extends Constraint {
          private Date denyAfterDate;
          private static final SimpleDateFormat dateFormat =
-                 new SimpleDateFormat("EEE, MMM d HH:mm:ss z YYYY");
+                 new SimpleDateFormat("EEE, MMM d HH:mm:ss z yyyy");
 
          DenyAfterConstraint(String algo, int year, int month, int day) {
              Calendar c;
@@ -593,13 +593,17 @@
          public void permits(CertConstraintParameters cp)
                  throws CertPathValidatorException {
              Date currentDate;
+             String errmsg;
 
              if (cp.getJARTimestamp() != null) {
                  currentDate = cp.getJARTimestamp().getTimestamp();
+                 errmsg = "JAR Timestamp date: ";
              } else if (cp.getPKIXParamDate() != null) {
                  currentDate = cp.getPKIXParamDate();
+                 errmsg = "PKIXParameter date: ";
              } else {
                  currentDate = new Date();
+                 errmsg = "Certificate date: ";
              }
 
              if (!denyAfterDate.after(currentDate)) {
@@ -609,10 +613,9 @@
                  throw new CertPathValidatorException(
                          "denyAfter constraint check failed.  " +
                                  "Constraint date: " +
-                                 dateFormat.format(denyAfterDate) +
-                                 "; Cert date: " +
-                                 dateFormat.format(currentDate),
-                          null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
+                                 dateFormat.format(denyAfterDate) + "; "
+                                 + errmsg + dateFormat.format(currentDate),
+                         null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
              }
          }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/sun/security/util/FilePermCompat.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.util;
+
+import sun.security.action.GetPropertyAction;
+
+import java.io.FilePermission;
+import java.security.Permission;
+import jdk.internal.misc.SharedSecrets;
+
+/**
+ * Take care of FilePermission compatibility after JDK-8164705.
+ */
+public class FilePermCompat {
+    /**
+     * New behavior? Keep compatibility? Both default true.
+     */
+    public static final boolean nb;
+    public static final boolean compat;
+
+    static {
+        String flag = GetPropertyAction.privilegedGetProperty(
+                "jdk.io.permissionsUseCanonicalPath", "false");
+        switch (flag) {
+            case "true":
+                nb = false;
+                compat = false;
+                break;
+            case "false":
+                nb = true;
+                compat = true;
+                break;
+            default:
+                throw new RuntimeException(
+                        "Invalid jdk.io.permissionsUseCanonicalPath: " + flag);
+        }
+    }
+
+    public static Permission newPermPlusAltPath(Permission input) {
+        if (compat && input instanceof FilePermission) {
+            return SharedSecrets.getJavaIOFilePermissionAccess()
+                    .newPermPlusAltPath((FilePermission) input);
+        }
+        return input;
+    }
+
+    public static Permission newPermUsingAltPath(Permission input) {
+        if (input instanceof FilePermission) {
+            return SharedSecrets.getJavaIOFilePermissionAccess()
+                    .newPermUsingAltPath((FilePermission) input);
+        }
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/sun/security/util/MessageDigestSpi2.java	Thu Oct 13 09:02:13 2016 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2016, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.util;
+
+import java.security.InvalidKeyException;
+import javax.crypto.SecretKey;
+
+/**
+ * Special interface for additional MessageDigestSpi method(s).
+ */
+public interface MessageDigestSpi2 {
+
+    /**
+     * Updates the digest using the specified key.
+     * This is used for SSL 3.0 only, we may deprecate and remove the support
+     * of this in the future
+     *
+     * @param key  the key whose value is to be digested.
+     */
+    void engineUpdate(SecretKey key) throws InvalidKeyException;
+}
--- a/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Thu Oct 13 09:02:13 2016 -0700
@@ -188,6 +188,9 @@
         String MHT[] = new String[] {"Marshall Islands Time", "MHT",
                                      "Marshall Islands Summer Time", "MHST",
                                      "Marshall Islands Time", "MHT"};
+        String MMT[] = new String[] {"Myanmar Time", "MMT",
+                                     "Myanmar Summer Time", "MMST",
+                                     "Myanmar Time", "MMT"};
         String MSK[] = new String[] {"Moscow Standard Time", "MSK",
                                      "Moscow Daylight Time", "MSD",
                                      "Moscow Time", "MT"};
@@ -683,9 +686,7 @@
             {"Asia/Qyzylorda", new String[] {"Qyzylorda Time", "QYZT",
                                              "Qyzylorda Summer Time", "QYZST",
                                              "Qyzylorda Time", "QYZT"}},
-            {"Asia/Rangoon", new String[] {"Myanmar Time", "MMT",
-                                           "Myanmar Summer Time", "MMST",
-                                           "Myanmar Time", "MMT"}},
+            {"Asia/Rangoon", MMT},
             {"Asia/Riyadh", ARAST},
             {"Asia/Saigon", ICT},
             {"Asia/Sakhalin", new String[] {"Sakhalin Time", "SAKT",
@@ -718,6 +719,7 @@
                                                "Vladivostok Summer Time", "VLAST",
                                                "Vladivostok Time", "VLAT"}},
             {"Asia/Yakutsk", YAKT},
+            {"Asia/Yangon", MMT},
             {"Asia/Yekaterinburg", new String[] {"Yekaterinburg Time", "YEKT",
                                                  "Yekaterinburg Summer Time", "YEKST",
                                                  "Yekaterinburg Time", "YEKT"}},
--- a/src/java.base/share/conf/security/java.policy	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/conf/security/java.policy	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,18 @@
+//
+// This system policy file grants a set of default permissions to all domains
+// and can be configured to grant additional permissions to modules and other
+// code sources. The code source URL scheme for modules linked into a
+// run-time image is "jrt".
+//
+// For example, to grant permission to read the "foo" property to the module
+// "com.greetings", the grant entry is:
+//
+// grant codeBase "jrt:/com.greetings" {
+//     permission java.util.PropertyPermission "foo", "read";
+// };
+//
+
 // default permissions granted to all domains
-
 grant {
     // allows anyone to listen on dynamic ports
     permission java.net.SocketPermission "localhost:0", "listen";
--- a/src/java.base/share/conf/security/java.security	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/conf/security/java.security	Thu Oct 13 09:02:13 2016 -0700
@@ -894,3 +894,44 @@
     disallowReferenceUriSchemes file http https,\
     noDuplicateIds,\
     noRetrievalMethodLoops
+
+#
+# Serialization process-wide filter
+#
+# A filter, if configured, is used by java.io.ObjectInputStream during
+# deserialization to check the contents of the stream.
+# A filter is configured as a sequence of patterns, each pattern is either
+# matched against the name of a class in the stream or defines a limit.
+# Patterns are separated by ";" (semicolon).
+# Whitespace is significant and is considered part of the pattern.
+#
+# If a pattern includes a "=", it sets a limit.
+# If a limit appears more than once the last value is used.
+# Limits are checked before classes regardless of the order in the sequence of patterns.
+# If any of the limits are exceeded, the filter status is REJECTED.
+#
+#   maxdepth=value - the maximum depth of a graph
+#   maxrefs=value  - the maximum number of internal references
+#   maxbytes=value - the maximum number of bytes in the input stream
+#   maxarray=value - the maximum array length allowed
+#
+# Other patterns, from left to right, match the class or package name as
+# returned from Class.getName.
+# If the class is an array type, the class or package to be matched is the element type.
+# Arrays of any number of dimensions are treated the same as the element type.
+# For example, a pattern of "!example.Foo", rejects creation of any instance or
+# array of example.Foo.
+#
+# If the pattern starts with "!", the status is REJECTED if the remaining pattern
+#   is matched; otherwise the status is ALLOWED if the pattern matches.
+# If the pattern contains "/", the non-empty prefix up to the "/" is the module name;
+#   if the module name matches the module name of the class then
+#   the remaining pattern is matched with the class name.
+#   If there is no "/", the module name is not compared.
+# If the pattern ends with ".**" it matches any class in the package and all subpackages.
+# If the pattern ends with ".*" it matches any class in the package.
+# If the pattern ends with "*", it matches any class with the pattern as a prefix.
+# If the pattern is equal to the class name, it matches.
+# Otherwise, the status is UNDECIDED.
+#
+#jdk.serialFilter=pattern;pattern
--- a/src/java.base/share/native/libnet/net_util.h	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/share/native/libnet/net_util.h	Thu Oct 13 09:02:13 2016 -0700
@@ -42,6 +42,10 @@
 #define NET_ERROR(env, ex, msg) \
 { if (!(*env)->ExceptionOccurred(env)) JNU_ThrowByName(env, ex, msg); }
 
+#define NET_WAIT_READ    0x01
+#define NET_WAIT_WRITE   0x02
+#define NET_WAIT_CONNECT 0x04
+
 /************************************************************************
  * Cached field IDs
  *
@@ -133,9 +137,6 @@
 
 JNIEXPORT jint JNICALL reuseport_available() ;
 
-void
-NET_AllocSockaddr(struct sockaddr **him, int *len);
-
 JNIEXPORT int JNICALL
 NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him, int *len, jboolean v4MappedAddress);
 
@@ -196,4 +197,6 @@
 
 unsigned short in_cksum(unsigned short *addr, int len);
 
+jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
+
 #endif /* NET_UTILS_H */
--- a/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, 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
@@ -116,7 +116,7 @@
         synchronized (this) {
             if (iterator != null)
                 throw new IllegalStateException("Iterator already obtained");
-            iterator = new UnixDirectoryIterator(ds);
+            iterator = new UnixDirectoryIterator();
             return iterator;
         }
     }
@@ -130,17 +130,14 @@
      * Iterator implementation
      */
     private class UnixDirectoryIterator implements Iterator<Path> {
-        private final DirectoryStream<Path> stream;
-
         // true when at EOF
         private boolean atEof;
 
         // next entry to return
         private Path nextEntry;
 
-        UnixDirectoryIterator(DirectoryStream<Path> stream) {
+        UnixDirectoryIterator() {
             atEof = false;
-            this.stream = stream;
         }
 
         // Return true if file name is "." or ".."
--- a/src/java.base/unix/native/libnet/Inet4AddressImpl.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/Inet4AddressImpl.c	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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
@@ -788,9 +788,9 @@
         case ENETUNREACH: /* Network Unreachable */
         case EAFNOSUPPORT: /* Address Family not supported */
         case EADDRNOTAVAIL: /* address is not available on  the  remote machine */
-#ifdef __linux__
+#if defined(__linux__) || defined(_AIX)
         case EINVAL:
-        case EHOSTUNREACH:
+        case EHOSTUNREACH: /* No route to host */
           /*
            * On some Linux versions, when a socket is bound to the loopback
            * interface, connect will fail and errno will be set to EINVAL
--- a/src/java.base/unix/native/libnet/Inet6AddressImpl.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/Inet6AddressImpl.c	Thu Oct 13 09:02:13 2016 -0700
@@ -775,9 +775,9 @@
         case ENETUNREACH: /* Network Unreachable */
         case EAFNOSUPPORT: /* Address Family not supported */
         case EADDRNOTAVAIL: /* address is not available on  the  remote machine */
-#ifdef __linux__
+#if defined(__linux__) || defined(_AIX)
         case EINVAL:
-        case EHOSTUNREACH:
+        case EHOSTUNREACH: /* No route to host */
           /*
            * On some Linux versions, when  a socket is bound to the
            * loopback interface, connect will fail and errno will
@@ -804,7 +804,7 @@
                          &optlen) <0) {
             connect_rv = errno;
           }
-          if (connect_rv == 0 || ECONNREFUSED) {
+          if (connect_rv == 0 || connect_rv == ECONNREFUSED) {
             close(fd);
             return JNI_TRUE;
           }
--- a/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Thu Oct 13 09:02:13 2016 -0700
@@ -193,8 +193,8 @@
     /* fd is an int field on fdObj */
     int fd;
     int len = 0;
-    SOCKADDR him;
-    socklen_t slen = sizeof(him);
+    SOCKETADDRESS him;
+    socklen_t slen = sizeof(SOCKETADDRESS);
 
     if (IS_NULL(fdObj)) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
@@ -210,12 +210,12 @@
     }
 
     /* bind */
-    if (NET_InetAddressToSockaddr(env, iaObj, localport, (struct sockaddr *)&him, &len, JNI_TRUE) != 0) {
+    if (NET_InetAddressToSockaddr(env, iaObj, localport, &him.sa, &len, JNI_TRUE) != 0) {
       return;
     }
-    setDefaultScopeID(env, (struct sockaddr *)&him);
+    setDefaultScopeID(env, &him.sa);
 
-    if (NET_Bind(fd, (struct sockaddr *)&him, len) < 0)  {
+    if (NET_Bind(fd, &him.sa, len) < 0)  {
         if (errno == EADDRINUSE || errno == EADDRNOTAVAIL ||
             errno == EPERM || errno == EACCES) {
             NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "BindException",
@@ -232,13 +232,13 @@
         /* Now that we're a connected socket, let's extract the port number
          * that the system chose for us and store it in the Socket object.
          */
-        if (getsockname(fd, (struct sockaddr *)&him, &slen) == -1) {
+        if (getsockname(fd, &him.sa, &slen) == -1) {
             JNU_ThrowByNameWithMessageAndLastError
                 (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
             return;
         }
 
-        localport = NET_GetPortFromSockaddr((struct sockaddr *)&him);
+        localport = NET_GetPortFromSockaddr(&him.sa);
 
         (*env)->SetIntField(env, this, pdsi_localPortID, localport);
     } else {
@@ -259,7 +259,7 @@
     /* The fdObj'fd */
     jint fd;
     /* The packetAddress address, family and port */
-    SOCKADDR rmtaddr;
+    SOCKETADDRESS rmtaddr;
     int len = 0;
 
     if (IS_NULL(fdObj)) {
@@ -274,18 +274,16 @@
         return;
     }
 
-    if (NET_InetAddressToSockaddr(env, address, port, (struct sockaddr *)&rmtaddr, &len, JNI_TRUE) != 0) {
+    if (NET_InetAddressToSockaddr(env, address, port, &rmtaddr.sa, &len, JNI_TRUE) != 0) {
       return;
     }
 
-    setDefaultScopeID(env, (struct sockaddr *)&rmtaddr);
+    setDefaultScopeID(env, &rmtaddr.sa);
 
-    if (NET_Connect(fd, (struct sockaddr *)&rmtaddr, len) == -1) {
+    if (NET_Connect(fd, &rmtaddr.sa, len) == -1) {
         NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException",
                         "Connect failed");
-        return;
     }
-
 }
 
 /*
@@ -301,7 +299,7 @@
     jint fd;
 
 #if defined(__linux__) || defined(_ALLBSD_SOURCE)
-    SOCKADDR addr;
+    SOCKETADDRESS addr;
     socklen_t len;
 #endif
 
@@ -314,36 +312,34 @@
         memset(&addr, 0, sizeof(addr));
 #ifdef AF_INET6
         if (ipv6_available()) {
-            struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr;
-            him6->sin6_family = AF_UNSPEC;
+            addr.sa6.sin6_family = AF_UNSPEC;
             len = sizeof(struct sockaddr_in6);
         } else
 #endif
         {
-            struct sockaddr_in *him4 = (struct sockaddr_in*)&addr;
-            him4->sin_family = AF_UNSPEC;
+            addr.sa4.sin_family = AF_UNSPEC;
             len = sizeof(struct sockaddr_in);
         }
-        NET_Connect(fd, (struct sockaddr *)&addr, len);
+        NET_Connect(fd, &addr.sa, len);
 
 #ifdef __linux__
         int localPort = 0;
-        if (getsockname(fd, (struct sockaddr *)&addr, &len) == -1)
+        if (getsockname(fd, &addr.sa, &len) == -1)
             return;
 
-        localPort = NET_GetPortFromSockaddr((struct sockaddr *)&addr);
+        localPort = NET_GetPortFromSockaddr(&addr.sa);
         if (localPort == 0) {
             localPort = (*env)->GetIntField(env, this, pdsi_localPortID);
 #ifdef AF_INET6
-            if (((struct sockaddr*)&addr)->sa_family == AF_INET6) {
-                ((struct sockaddr_in6*)&addr)->sin6_port = htons(localPort);
+            if (addr.sa.sa_family == AF_INET6) {
+                addr.sa6.sin6_port = htons(localPort);
             } else
 #endif /* AF_INET6 */
             {
-                ((struct sockaddr_in*)&addr)->sin_port = htons(localPort);
+                addr.sa4.sin_port = htons(localPort);
             }
 
-            NET_Bind(fd, (struct sockaddr *)&addr, len);
+            NET_Bind(fd, &addr.sa, len);
         }
 
 #endif
@@ -376,7 +372,7 @@
     /* The fdObj'fd */
     jint fd;
 
-    SOCKADDR rmtaddr, *rmtaddrP=&rmtaddr;
+    SOCKETADDRESS rmtaddr, *rmtaddrP = &rmtaddr;
     int len;
 
     if (IS_NULL(fdObj)) {
@@ -409,11 +405,11 @@
         rmtaddrP = 0;
     } else {
         packetPort = (*env)->GetIntField(env, packet, dp_portID);
-        if (NET_InetAddressToSockaddr(env, packetAddress, packetPort, (struct sockaddr *)&rmtaddr, &len, JNI_TRUE) != 0) {
-          return;
+        if (NET_InetAddressToSockaddr(env, packetAddress, packetPort, &rmtaddr.sa, &len, JNI_TRUE) != 0) {
+            return;
         }
     }
-    setDefaultScopeID(env, (struct sockaddr *)&rmtaddr);
+    setDefaultScopeID(env, &rmtaddr.sa);
 
     if (packetBufferLen > MAX_BUFFER_LEN) {
         /* When JNI-ifying the JDK's IO routines, we turned
@@ -449,7 +445,7 @@
                                (jbyte *)fullPacket);
 #ifdef AF_INET6
     if (trafficClass != 0 && ipv6_available()) {
-        NET_SetTrafficClass((struct sockaddr *)&rmtaddr, trafficClass);
+        NET_SetTrafficClass(&rmtaddr.sa, trafficClass);
     }
 #endif /* AF_INET6 */
 
@@ -492,8 +488,8 @@
     jint timeout = (*env)->GetIntField(env, this, pdsi_timeoutID);
     jint fd;
     ssize_t n;
-    SOCKADDR remote_addr;
-    socklen_t slen = SOCKADDR_LEN;
+    SOCKETADDRESS rmtaddr;
+    socklen_t slen = sizeof(SOCKETADDRESS);
     char buf[1];
     jint family;
     jobject iaObj;
@@ -527,7 +523,7 @@
         }
     }
 
-    n = NET_RecvFrom(fd, buf, 1, MSG_PEEK, (struct sockaddr *)&remote_addr, &slen);
+    n = NET_RecvFrom(fd, buf, 1, MSG_PEEK, &rmtaddr.sa, &slen);
 
     if (n == -1) {
 
@@ -552,7 +548,7 @@
         return 0;
     }
 
-    iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port);
+    iaObj = NET_SockaddrToInetAddress(env, &rmtaddr.sa, &port);
 #ifdef AF_INET6
     family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6;
 #else
@@ -574,16 +570,13 @@
     int mallocedPacket = JNI_FALSE;
     jobject fdObj = (*env)->GetObjectField(env, this, pdsi_fdID);
     jint timeout = (*env)->GetIntField(env, this, pdsi_timeoutID);
-
     jbyteArray packetBuffer;
     jint packetBufferOffset, packetBufferLen;
-
     int fd;
-
     int n;
-    SOCKADDR remote_addr;
-    socklen_t slen = SOCKADDR_LEN;
-    int port;
+    SOCKETADDRESS rmtaddr;
+    socklen_t slen = sizeof(SOCKETADDRESS);
+    int port = -1;
 
     if (IS_NULL(fdObj)) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
@@ -661,7 +654,7 @@
     }
 
     n = NET_RecvFrom(fd, fullPacket, packetBufferLen, MSG_PEEK,
-                     (struct sockaddr *)&remote_addr, &slen);
+                     &rmtaddr.sa, &slen);
     /* truncate the data if the packet's length is too small */
     if (n > packetBufferLen) {
         n = packetBufferLen;
@@ -706,18 +699,18 @@
          */
         packetAddress = (*env)->GetObjectField(env, packet, dp_addressID);
         if (packetAddress != NULL) {
-            if (!NET_SockaddrEqualsInetAddress(env, (struct sockaddr *)&remote_addr, packetAddress)) {
+            if (!NET_SockaddrEqualsInetAddress(env, &rmtaddr.sa, packetAddress)) {
                 /* force a new InetAddress to be created */
                 packetAddress = NULL;
             }
         }
         if (packetAddress == NULL) {
-            packetAddress = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port);
+            packetAddress = NET_SockaddrToInetAddress(env, &rmtaddr.sa, &port);
             /* stuff the new Inetaddress in the packet */
             (*env)->SetObjectField(env, packet, dp_addressID, packetAddress);
         } else {
             /* only get the new port number */
-            port = NET_GetPortFromSockaddr((struct sockaddr *)&remote_addr);
+            port = NET_GetPortFromSockaddr(&rmtaddr.sa);
         }
         /* and fill in the data, remote address/port and such */
         (*env)->SetByteArrayRegion(env, packetBuffer, packetBufferOffset, n,
@@ -753,8 +746,8 @@
     int fd;
 
     int n;
-    SOCKADDR remote_addr;
-    socklen_t slen = SOCKADDR_LEN;
+    SOCKETADDRESS rmtaddr;
+    socklen_t slen = sizeof(SOCKETADDRESS);
     jboolean retry;
 #ifdef __linux__
     jboolean connected = JNI_FALSE;
@@ -849,7 +842,7 @@
         }
 
         n = NET_RecvFrom(fd, fullPacket, packetBufferLen, 0,
-                         (struct sockaddr *)&remote_addr, &slen);
+                         &rmtaddr.sa, &slen);
         /* truncate the data if the packet's length is too small */
         if (n > packetBufferLen) {
             n = packetBufferLen;
@@ -887,18 +880,18 @@
              */
             packetAddress = (*env)->GetObjectField(env, packet, dp_addressID);
             if (packetAddress != NULL) {
-                if (!NET_SockaddrEqualsInetAddress(env, (struct sockaddr *)&remote_addr, packetAddress)) {
+                if (!NET_SockaddrEqualsInetAddress(env, &rmtaddr.sa, packetAddress)) {
                     /* force a new InetAddress to be created */
                     packetAddress = NULL;
                 }
             }
             if (packetAddress == NULL) {
-                packetAddress = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port);
+                packetAddress = NET_SockaddrToInetAddress(env, &rmtaddr.sa, &port);
                 /* stuff the new Inetaddress in the packet */
                 (*env)->SetObjectField(env, packet, dp_addressID, packetAddress);
             } else {
                 /* only get the new port number */
-                port = NET_GetPortFromSockaddr((struct sockaddr *)&remote_addr);
+                port = NET_GetPortFromSockaddr(&rmtaddr.sa);
             }
             /* and fill in the data, remote address/port and such */
             (*env)->SetByteArrayRegion(env, packetBuffer, packetBufferOffset, n,
@@ -1729,19 +1722,17 @@
      */
     if (opt == java_net_SocketOptions_SO_BINDADDR) {
         /* find out local IP address */
-        SOCKADDR him;
-        socklen_t len = 0;
+        SOCKETADDRESS him;
+        socklen_t len = sizeof(SOCKETADDRESS);
         int port;
         jobject iaObj;
 
-        len = SOCKADDR_LEN;
-
-        if (getsockname(fd, (struct sockaddr *)&him, &len) == -1) {
+        if (getsockname(fd, &him.sa, &len) == -1) {
             JNU_ThrowByNameWithMessageAndLastError
                 (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
             return NULL;
         }
-        iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port);
+        iaObj = NET_SockaddrToInetAddress(env, &him.sa, &port);
 
         return iaObj;
     }
--- a/src/java.base/unix/native/libnet/PlainSocketImpl.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/PlainSocketImpl.c	Thu Oct 13 09:02:13 2016 -0700
@@ -274,7 +274,7 @@
     /* fd is an int field on iaObj */
     jint fd;
 
-    SOCKADDR him;
+    SOCKETADDRESS him;
     /* The result of the connection */
     int connect_rv = -1;
 
@@ -290,18 +290,18 @@
     }
 
     /* connect */
-    if (NET_InetAddressToSockaddr(env, iaObj, port, (struct sockaddr *)&him, &len, JNI_TRUE) != 0) {
-      return;
+    if (NET_InetAddressToSockaddr(env, iaObj, port, &him.sa, &len, JNI_TRUE) != 0) {
+        return;
     }
-    setDefaultScopeID(env, (struct sockaddr *)&him);
+    setDefaultScopeID(env, &him.sa);
 
 #ifdef AF_INET6
     if (trafficClass != 0 && ipv6_available()) {
-        NET_SetTrafficClass((struct sockaddr *)&him, trafficClass);
+        NET_SetTrafficClass(&him.sa, trafficClass);
     }
 #endif /* AF_INET6 */
     if (timeout <= 0) {
-        connect_rv = NET_Connect(fd, (struct sockaddr *)&him, len);
+        connect_rv = NET_Connect(fd, &him.sa, len);
 #ifdef __solaris__
         if (connect_rv == -1 && errno == EINPROGRESS ) {
 
@@ -350,7 +350,7 @@
         SET_NONBLOCKING(fd);
 
         /* no need to use NET_Connect as non-blocking */
-        connect_rv = connect(fd, (struct sockaddr *)&him, len);
+        connect_rv = connect(fd, &him.sa, len);
 
         /* connection not established immediately */
         if (connect_rv != 0) {
@@ -497,12 +497,12 @@
         /* Now that we're a connected socket, let's extract the port number
          * that the system chose for us and store it in the Socket object.
          */
-        socklen_t slen = SOCKADDR_LEN;
-        if (getsockname(fd, (struct sockaddr *)&him, &slen) == -1) {
+        socklen_t slen = sizeof(SOCKETADDRESS);
+        if (getsockname(fd, &him.sa, &slen) == -1) {
             JNU_ThrowByNameWithMessageAndLastError
                 (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
         } else {
-            localport = NET_GetPortFromSockaddr((struct sockaddr *)&him);
+            localport = NET_GetPortFromSockaddr(&him.sa);
             (*env)->SetIntField(env, this, psi_localportID, localport);
         }
     }
@@ -522,7 +522,7 @@
     /* fd is an int field on fdObj */
     int fd;
     int len;
-    SOCKADDR him;
+    SOCKETADDRESS him;
 
     if (IS_NULL(fdObj)) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
@@ -537,13 +537,13 @@
     }
 
     /* bind */
-    if (NET_InetAddressToSockaddr(env, iaObj, localport, (struct sockaddr *)&him,
+    if (NET_InetAddressToSockaddr(env, iaObj, localport, &him.sa,
                                   &len, JNI_TRUE) != 0) {
         return;
     }
-    setDefaultScopeID(env, (struct sockaddr *)&him);
+    setDefaultScopeID(env, &him.sa);
 
-    if (NET_Bind(fd, (struct sockaddr *)&him, len) < 0) {
+    if (NET_Bind(fd, &him.sa, len) < 0) {
         if (errno == EADDRINUSE || errno == EADDRNOTAVAIL ||
             errno == EPERM || errno == EACCES) {
             NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "BindException",
@@ -560,16 +560,16 @@
 
     /* initialize the local port */
     if (localport == 0) {
-        socklen_t slen = sizeof(him);
+        socklen_t slen = sizeof(SOCKETADDRESS);
         /* Now that we're a connected socket, let's extract the port number
          * that the system chose for us and store it in the Socket object.
          */
-        if (getsockname(fd, (struct sockaddr *)&him, &slen) == -1) {
+        if (getsockname(fd, &him.sa, &slen) == -1) {
             JNU_ThrowByNameWithMessageAndLastError
                 (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
             return;
         }
-        localport = NET_GetPortFromSockaddr((struct sockaddr *)&him);
+        localport = NET_GetPortFromSockaddr(&him.sa);
         (*env)->SetIntField(env, this, psi_localportID, localport);
     } else {
         (*env)->SetIntField(env, this, psi_localportID, localport);
@@ -637,8 +637,8 @@
     /* accepted fd */
     jint newfd;
 
-    SOCKADDR him;
-    socklen_t slen = SOCKADDR_LEN;
+    SOCKETADDRESS him;
+    socklen_t slen = sizeof(SOCKETADDRESS);
 
     if (IS_NULL(fdObj)) {
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
@@ -692,7 +692,7 @@
             return;
         }
 
-        newfd = NET_Accept(fd, (struct sockaddr *)&him, &slen);
+        newfd = NET_Accept(fd, &him.sa, &slen);
 
         /* connection accepted */
         if (newfd >= 0) {
@@ -740,7 +740,7 @@
     /*
      * fill up the remote peer port and address in the new socket structure.
      */
-    socketAddressObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port);
+    socketAddressObj = NET_SockaddrToInetAddress(env, &him.sa, &port);
     if (socketAddressObj == NULL) {
         /* should be pending exception */
         close(newfd);
@@ -975,21 +975,19 @@
      * SO_BINDADDR isn't a socket option
      */
     if (cmd == java_net_SocketOptions_SO_BINDADDR) {
-        SOCKADDR him;
-        socklen_t len = 0;
+        SOCKETADDRESS him;
+        socklen_t len = sizeof(SOCKETADDRESS);
         int port;
         jobject iaObj;
         jclass iaCntrClass;
         jfieldID iaFieldID;
 
-        len = SOCKADDR_LEN;
-
-        if (getsockname(fd, (struct sockaddr *)&him, &len) < 0) {
+        if (getsockname(fd, &him.sa, &len) < 0) {
             JNU_ThrowByNameWithMessageAndLastError
                 (env, JNU_JAVANETPKG "SocketException", "Error getting socket name");
             return -1;
         }
-        iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&him, &port);
+        iaObj = NET_SockaddrToInetAddress(env, &him.sa, &port);
         CHECK_NULL_RETURN(iaObj, -1);
 
         iaCntrClass = (*env)->GetObjectClass(env, iaContainerObj);
--- a/src/java.base/unix/native/libnet/net_util_md.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Thu Oct 13 09:02:13 2016 -0700
@@ -334,8 +334,8 @@
 #ifdef AF_INET6
     int fd;
     void *ipv6_fn;
-    SOCKADDR sa;
-    socklen_t sa_len = sizeof(sa);
+    SOCKETADDRESS sa;
+    socklen_t sa_len = sizeof(SOCKETADDRESS);
 
     fd = socket(AF_INET6, SOCK_STREAM, 0) ;
     if (fd < 0) {
@@ -351,9 +351,8 @@
      * xinetd. If it's a socket then check the family - if it's an
      * IPv4 socket then we need to disable IPv6.
      */
-    if (getsockname(0, (struct sockaddr *)&sa, &sa_len) == 0) {
-        struct sockaddr *saP = (struct sockaddr *)&sa;
-        if (saP->sa_family != AF_INET6) {
+    if (getsockname(0, &sa.sa, &sa_len) == 0) {
+        if (sa.sa.sa_family != AF_INET6) {
             close(fd);
             return JNI_FALSE;
         }
@@ -488,25 +487,8 @@
     }
 }
 
-void
-NET_AllocSockaddr(struct sockaddr **him, int *len) {
-#ifdef AF_INET6
-    if (ipv6_available()) {
-        struct sockaddr_in6 *him6 = (struct sockaddr_in6*)malloc(sizeof(struct sockaddr_in6));
-        *him = (struct sockaddr*)him6;
-        *len = sizeof(struct sockaddr_in6);
-    } else
-#endif /* AF_INET6 */
-        {
-            struct sockaddr_in *him4 = (struct sockaddr_in*)malloc(sizeof(struct sockaddr_in));
-            *him = (struct sockaddr*)him4;
-            *len = sizeof(struct sockaddr_in);
-        }
-}
-
 #if defined(__linux__) && defined(AF_INET6)
 
-
 /* following code creates a list of addresses from the kernel
  * routing table that are routed via the loopback address.
  * We check all destination addresses against this table
--- a/src/java.base/unix/native/libnet/net_util_md.h	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnet/net_util_md.h	Thu Oct 13 09:02:13 2016 -0700
@@ -60,9 +60,9 @@
 void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
                                   const char *defaultDetail);
 
-#define NET_WAIT_READ    0x01
-#define NET_WAIT_WRITE   0x02
-#define NET_WAIT_CONNECT 0x04
+/************************************************************************
+ * Macros and constants
+ */
 
 /* Defines SO_REUSEPORT */
 #ifndef SO_REUSEPORT
@@ -77,12 +77,6 @@
 #endif
 #endif
 
-jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
-
-/************************************************************************
- * Macros and constants
- */
-
 /*
  * On 64-bit JDKs we use a much larger stack and heap buffer.
  */
@@ -95,20 +89,16 @@
 #endif
 
 #ifdef AF_INET6
-
-#define SOCKADDR        union { \
-                            struct sockaddr_in him4; \
-                            struct sockaddr_in6 him6; \
-                        }
-
-#define SOCKADDR_LEN    (ipv6_available() ? sizeof(SOCKADDR) : \
-                         sizeof(struct sockaddr_in))
-
+typedef union {
+    struct sockaddr     sa;
+    struct sockaddr_in  sa4;
+    struct sockaddr_in6 sa6;
+} SOCKETADDRESS;
 #else
-
-#define SOCKADDR        union { struct sockaddr_in him4; }
-#define SOCKADDR_LEN    sizeof(SOCKADDR)
-
+typedef union {
+    struct sockaddr     sa;
+    struct sockaddr_in  sa4;
+} SOCKETADDRESS;
 #endif
 
 /************************************************************************
--- a/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -87,58 +87,50 @@
     jint fd = fdval(env, fdo);
     int rv;
 
-#ifdef __solaris__
+#if defined(__solaris__)
     rv = connect(fd, 0, 0);
-#endif
+#else
+    int len;
+    SOCKETADDRESS sa;
 
-#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
-    {
-        int len;
-        SOCKADDR sa;
-
-        memset(&sa, 0, sizeof(sa));
+    memset(&sa, 0, sizeof(sa));
 
 #ifdef AF_INET6
-        if (isIPv6) {
-            struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&sa;
+    if (isIPv6) {
 #if defined(_ALLBSD_SOURCE)
-            him6->sin6_family = AF_INET6;
+        sa.sa6.sin6_family = AF_INET6;
 #else
-            him6->sin6_family = AF_UNSPEC;
+        sa.sa6.sin6_family = AF_UNSPEC;
 #endif
-            len = sizeof(struct sockaddr_in6);
-        } else
+        len = sizeof(struct sockaddr_in6);
+    } else
 #endif
-        {
-            struct sockaddr_in *him4 = (struct sockaddr_in*)&sa;
+    {
 #if defined(_ALLBSD_SOURCE)
-            him4->sin_family = AF_INET;
+        sa.sa4.sin_family = AF_INET;
 #else
-            him4->sin_family = AF_UNSPEC;
+        sa.sa4.sin_family = AF_UNSPEC;
 #endif
-            len = sizeof(struct sockaddr_in);
-        }
+        len = sizeof(struct sockaddr_in);
+    }
 
-        rv = connect(fd, (struct sockaddr *)&sa, len);
+    rv = connect(fd, &sa.sa, len);
 
 #if defined(_ALLBSD_SOURCE)
-        if (rv < 0 && errno == EADDRNOTAVAIL)
-                rv = errno = 0;
+    if (rv < 0 && errno == EADDRNOTAVAIL)
+        rv = errno = 0;
+#elif defined(_AIX)
+    /* See W. Richard Stevens, "UNIX Network Programming, Volume 1", p. 254:
+     * 'Setting the address family to AF_UNSPEC might return EAFNOSUPPORT
+     * but that is acceptable.
+     */
+    if (rv < 0 && errno == EAFNOSUPPORT)
+        rv = errno = 0;
 #endif
-#if defined(_AIX)
-        /* See W. Richard Stevens, "UNIX Network Programming, Volume 1", p. 254:
-         * 'Setting the address family to AF_UNSPEC might return EAFNOSUPPORT
-         * but that is acceptable.
-         */
-        if (rv < 0 && errno == EAFNOSUPPORT)
-            rv = errno = 0;
-#endif
-    }
 #endif
 
     if (rv < 0)
         handleSocketError(env, errno);
-
 }
 
 JNIEXPORT jint JNICALL
@@ -148,8 +140,8 @@
 {
     jint fd = fdval(env, fdo);
     void *buf = (void *)jlong_to_ptr(address);
-    SOCKADDR sa;
-    socklen_t sa_len = SOCKADDR_LEN;
+    SOCKETADDRESS sa;
+    socklen_t sa_len = sizeof(SOCKETADDRESS);
     jboolean retry = JNI_FALSE;
     jint n = 0;
     jobject senderAddr;
@@ -160,7 +152,7 @@
 
     do {
         retry = JNI_FALSE;
-        n = recvfrom(fd, buf, len, 0, (struct sockaddr *)&sa, &sa_len);
+        n = recvfrom(fd, buf, len, 0, &sa.sa, &sa_len);
         if (n < 0) {
             if (errno == EWOULDBLOCK) {
                 return IOS_UNAVAILABLE;
@@ -189,12 +181,11 @@
      */
     senderAddr = (*env)->GetObjectField(env, this, dci_senderAddrID);
     if (senderAddr != NULL) {
-        if (!NET_SockaddrEqualsInetAddress(env, (struct sockaddr *)&sa,
-                                           senderAddr)) {
+        if (!NET_SockaddrEqualsInetAddress(env, &sa.sa, senderAddr)) {
             senderAddr = NULL;
         } else {
             jint port = (*env)->GetIntField(env, this, dci_senderPortID);
-            if (port != NET_GetPortFromSockaddr((struct sockaddr *)&sa)) {
+            if (port != NET_GetPortFromSockaddr(&sa.sa)) {
                 senderAddr = NULL;
             }
         }
@@ -202,7 +193,7 @@
     if (senderAddr == NULL) {
         jobject isa = NULL;
         int port = 0;
-        jobject ia = NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port);
+        jobject ia = NET_SockaddrToInetAddress(env, &sa.sa, &port);
         if (ia != NULL) {
             isa = (*env)->NewObject(env, isa_class, isa_ctorID, ia, port);
         }
@@ -210,7 +201,7 @@
 
         (*env)->SetObjectField(env, this, dci_senderAddrID, ia);
         (*env)->SetIntField(env, this, dci_senderPortID,
-                            NET_GetPortFromSockaddr((struct sockaddr *)&sa));
+                            NET_GetPortFromSockaddr(&sa.sa));
         (*env)->SetObjectField(env, this, dci_senderID, isa);
     }
     return n;
@@ -223,21 +214,20 @@
 {
     jint fd = fdval(env, fdo);
     void *buf = (void *)jlong_to_ptr(address);
-    SOCKADDR sa;
-    int sa_len = SOCKADDR_LEN;
+    SOCKETADDRESS sa;
+    int sa_len = sizeof(SOCKETADDRESS);
     jint n = 0;
 
     if (len > MAX_PACKET_LEN) {
         len = MAX_PACKET_LEN;
     }
 
-    if (NET_InetAddressToSockaddr(env, destAddress, destPort,
-                                  (struct sockaddr *)&sa,
+    if (NET_InetAddressToSockaddr(env, destAddress, destPort, &sa.sa,
                                   &sa_len, preferIPv6) != 0) {
       return IOS_THROWN;
     }
 
-    n = sendto(fd, buf, len, 0, (struct sockaddr *)&sa, sa_len);
+    n = sendto(fd, buf, len, 0, &sa.sa, sa_len);
     if (n < 0) {
         if (errno == EAGAIN) {
             return IOS_UNAVAILABLE;
--- a/src/java.base/unix/native/libnio/ch/InheritedChannel.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnio/ch/InheritedChannel.c	Thu Oct 13 09:02:13 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, 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
@@ -57,18 +57,16 @@
 JNIEXPORT jobject JNICALL
 Java_sun_nio_ch_InheritedChannel_peerAddress0(JNIEnv *env, jclass cla, jint fd)
 {
-    struct sockaddr *sa;
-    socklen_t sa_len;
+    SOCKETADDRESS sa;
+    socklen_t len = sizeof(SOCKETADDRESS);
     jobject remote_ia = NULL;
     jint remote_port;
 
-    NET_AllocSockaddr(&sa, (int *)&sa_len);
-    if (getpeername(fd, sa, &sa_len) == 0) {
-        if (matchFamily(sa)) {
-            remote_ia = NET_SockaddrToInetAddress(env, sa, (int *)&remote_port);
+    if (getpeername(fd, &sa.sa, &len) == 0) {
+        if (matchFamily(&sa.sa)) {
+            remote_ia = NET_SockaddrToInetAddress(env, &sa.sa, (int *)&remote_port);
         }
     }
-    free((void *)sa);
 
     return remote_ia;
 }
@@ -77,17 +75,15 @@
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_InheritedChannel_peerPort0(JNIEnv *env, jclass cla, jint fd)
 {
-    struct sockaddr *sa;
-    socklen_t sa_len;
+    SOCKETADDRESS sa;
+    socklen_t len = sizeof(SOCKETADDRESS);
     jint remote_port = -1;
 
-    NET_AllocSockaddr(&sa, (int *)&sa_len);
-    if (getpeername(fd, sa, &sa_len) == 0) {
-        if (matchFamily(sa)) {
-            NET_SockaddrToInetAddress(env, sa, (int *)&remote_port);
+    if (getpeername(fd, &sa.sa, &len) == 0) {
+        if (matchFamily(&sa.sa)) {
+            NET_SockaddrToInetAddress(env, &sa.sa, (int *)&remote_port);
         }
     }
-    free((void *)sa);
 
     return remote_port;
 }
--- a/src/java.base/unix/native/libnio/ch/Net.c	Wed Sep 28 11:07:32 2016 +0200
+++ b/src/java.base/unix/native/libnio/ch/Net.c	Thu Oct 13 09:02:13 2016 -0700
@@ -273,15 +273,16 @@
 Java_sun_nio_ch_Net_bind0(JNIEnv *env, jclass clazz, jobject fdo, jboolean preferIPv6,
                           jboolean useExclBind, jobject iao, int port)
 {
-    SOCKADDR sa;
-    int sa_len = SOCKADDR_LEN;
+    SOCKETADDRESS sa;
+    int sa_len = sizeof(SOCKETADDRESS);
     int rv = 0;
 
-    if (NET_InetAddressToSockaddr(env, iao, port, (struct sockaddr *)&sa, &sa_len, preferIPv6) != 0) {
-      return;
+    if (NET_InetAddressToSockaddr(env, iao, port, &sa.sa, &sa_len,
+                                  preferIPv6) != 0) {
+        return;
     }
 
-    rv = NET_Bind(fdval(env, fdo), (struct sockaddr *)&sa, sa_len);
+    rv = NET_Bind(fdval(env, fdo), &sa.sa, sa_len);
     if (rv != 0) {
         handleSocketError(env, errno);
     }
@@ -298,17 +299,16 @@
 Java_sun_nio_ch_Net_connect0(JNIEnv *env, jclass clazz, jboolean preferIPv6,