Merge jdk7-b81
authorlana
Fri, 22 Jan 2010 09:34:17 -0800
changeset 213110b993d417fc
parent 2102 15815a54d930
parent 2130 8339fd49bf6b
child 2132 31ed4132f345
child 2133 b250e6c5a9e5
child 2147 0126effcc249
child 2167 d7c4baff3f96
child 2181 3283bb8c1bcb
Merge
make/java/redist/FILES.gmk
make/sun/nio/FILES_java.gmk
src/solaris/classes/sun/nio/ch/SctpSocketDispatcher.java
     1.1 --- a/make/com/sun/crypto/provider/Makefile	Thu Jan 21 11:12:37 2010 -0800
     1.2 +++ b/make/com/sun/crypto/provider/Makefile	Fri Jan 22 09:34:17 2010 -0800
     1.3 @@ -249,7 +249,7 @@
     1.4  else
     1.5  $(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
     1.6  endif
     1.7 -	$(install-file)
     1.8 +	$(install-non-module-file)
     1.9  
    1.10  ifndef OPENJDK
    1.11  install-prebuilt:
     2.1 --- a/make/com/sun/java/pack/Makefile	Thu Jan 21 11:12:37 2010 -0800
     2.2 +++ b/make/com/sun/java/pack/Makefile	Fri Jan 22 09:34:17 2010 -0800
     2.3 @@ -28,6 +28,7 @@
     2.4  #
     2.5  
     2.6  BUILDDIR = ../../../..
     2.7 +MODULE  = pack200
     2.8  PACKAGE = com.sun.java.util.jar.pack
     2.9  LIBRARY = unpack
    2.10  PRODUCT = sun
    2.11 @@ -123,11 +124,14 @@
    2.12  
    2.13  all: build
    2.14  
    2.15 -build: prop
    2.16 +build: prop pack200-tool
    2.17  
    2.18  prop:
    2.19  	$(MAKE) -C prop
    2.20  
    2.21 +pack200-tool:
    2.22 +	$(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
    2.23 +
    2.24  unpacker:
    2.25  	$(MAKE) $(UNPACK_EXE) STANDALONE=true LDMAPFLAGS_OPT= LDMAPFLAGS_DBG=
    2.26  
    2.27 @@ -151,6 +155,7 @@
    2.28  	$(MT) /manifest $(TEMPDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
    2.29  endif
    2.30  	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
    2.31 +	$(install-module-file)
    2.32  
    2.33  ifeq ($(PLATFORM), windows) 
    2.34  $(RES):: $(VERSIONINFO_RESOURCE)
     3.1 --- a/make/com/sun/java/pack/prop/Makefile	Thu Jan 21 11:12:37 2010 -0800
     3.2 +++ b/make/com/sun/java/pack/prop/Makefile	Fri Jan 22 09:34:17 2010 -0800
     3.3 @@ -29,6 +29,7 @@
     3.4  # to a collision of rules with Classes.gmk and Library.gmk
     3.5  
     3.6  BUILDDIR = ../../../../..
     3.7 +MODULE  = pack200
     3.8  PACKAGE = com.sun.java.util.jar.pack
     3.9  PRODUCT = sun
    3.10  include $(BUILDDIR)/common/Defs.gmk
     4.1 --- a/make/com/sun/jndi/cosnaming/Makefile	Thu Jan 21 11:12:37 2010 -0800
     4.2 +++ b/make/com/sun/jndi/cosnaming/Makefile	Fri Jan 22 09:34:17 2010 -0800
     4.3 @@ -28,6 +28,7 @@
     4.4  #
     4.5  
     4.6  BUILDDIR = ../../../..
     4.7 +MODULE  = jndi-cosnaming
     4.8  PACKAGE = com.sun.jndi.cosnaming
     4.9  PRODUCT = sun
    4.10  include $(BUILDDIR)/common/Defs.gmk
     5.1 --- a/make/com/sun/jndi/dns/Makefile	Thu Jan 21 11:12:37 2010 -0800
     5.2 +++ b/make/com/sun/jndi/dns/Makefile	Fri Jan 22 09:34:17 2010 -0800
     5.3 @@ -28,6 +28,7 @@
     5.4  #
     5.5  
     5.6  BUILDDIR = ../../../..
     5.7 +MODULE  = jndi-dns
     5.8  PACKAGE = com.sun.jndi.dns
     5.9  PRODUCT = sun
    5.10  include $(BUILDDIR)/common/Defs.gmk
     6.1 --- a/make/com/sun/jndi/ldap/Makefile	Thu Jan 21 11:12:37 2010 -0800
     6.2 +++ b/make/com/sun/jndi/ldap/Makefile	Fri Jan 22 09:34:17 2010 -0800
     6.3 @@ -28,6 +28,7 @@
     6.4  #
     6.5  
     6.6  BUILDDIR = ../../../..
     6.7 +MODULE  = jndi-ldap
     6.8  PACKAGE = com.sun.jndi.ldap
     6.9  PRODUCT = sun
    6.10  include $(BUILDDIR)/common/Defs.gmk
     7.1 --- a/make/com/sun/jndi/rmi/registry/Makefile	Thu Jan 21 11:12:37 2010 -0800
     7.2 +++ b/make/com/sun/jndi/rmi/registry/Makefile	Fri Jan 22 09:34:17 2010 -0800
     7.3 @@ -28,6 +28,7 @@
     7.4  #
     7.5  
     7.6  BUILDDIR = ../../../../..
     7.7 +MODULE  = jndi-rmiregistry
     7.8  PACKAGE = com.sun.jndi.rmi.registry
     7.9  PRODUCT = sun
    7.10  include $(BUILDDIR)/common/Defs.gmk
     8.1 --- a/make/com/sun/nio/sctp/FILES_java.gmk	Thu Jan 21 11:12:37 2010 -0800
     8.2 +++ b/make/com/sun/nio/sctp/FILES_java.gmk	Fri Jan 22 09:34:17 2010 -0800
     8.3 @@ -57,8 +57,7 @@
     8.4  	sun/nio/ch/SctpResultContainer.java \
     8.5  	sun/nio/ch/SctpSendFailed.java \
     8.6  	sun/nio/ch/SctpServerChannelImpl.java \
     8.7 -	sun/nio/ch/SctpShutdown.java \
     8.8 -	sun/nio/ch/SctpSocketDispatcher.java
     8.9 +	sun/nio/ch/SctpShutdown.java
    8.10  else
    8.11  FILES_java += \
    8.12  	sun/nio/ch/SctpChannelImpl.java \
     9.1 --- a/make/com/sun/nio/sctp/Makefile	Thu Jan 21 11:12:37 2010 -0800
     9.2 +++ b/make/com/sun/nio/sctp/Makefile	Fri Jan 22 09:34:17 2010 -0800
     9.3 @@ -28,6 +28,7 @@
     9.4  #
     9.5  
     9.6  BUILDDIR = ../../../..
     9.7 +MODULE  = sctp
     9.8  PACKAGE = com.sun.nio.sctp
     9.9  LIBRARY = sctp
    9.10  PRODUCT = sun
    10.1 --- a/make/com/sun/nio/sctp/mapfile-vers	Thu Jan 21 11:12:37 2010 -0800
    10.2 +++ b/make/com/sun/nio/sctp/mapfile-vers	Fri Jan 22 09:34:17 2010 -0800
    10.3 @@ -25,9 +25,14 @@
    10.4  
    10.5  SUNWprivate_1.1 {
    10.6  	global:
    10.7 +		Java_sun_nio_ch_SctpNet_init;
    10.8  		Java_sun_nio_ch_SctpNet_socket0;
    10.9  		Java_sun_nio_ch_SctpNet_bindx;
   10.10  		Java_sun_nio_ch_SctpNet_branch0;
   10.11 +		Java_sun_nio_ch_SctpNet_listen0;
   10.12 +		Java_sun_nio_ch_SctpNet_connect0;
   10.13 +		Java_sun_nio_ch_SctpNet_close0;
   10.14 +		Java_sun_nio_ch_SctpNet_preClose0;
   10.15  		Java_sun_nio_ch_SctpNet_getLocalAddresses0;
   10.16  		Java_sun_nio_ch_SctpNet_getRemoteAddresses0;
   10.17  		Java_sun_nio_ch_SctpNet_getPrimAddrOption0;
    11.1 --- a/make/com/sun/org/apache/xml/Makefile	Thu Jan 21 11:12:37 2010 -0800
    11.2 +++ b/make/com/sun/org/apache/xml/Makefile	Fri Jan 22 09:34:17 2010 -0800
    11.3 @@ -28,6 +28,7 @@
    11.4  #
    11.5  
    11.6  BUILDDIR = ../../../../..
    11.7 +MODULE  = security-xmldsig
    11.8  PACKAGE = com.sun.org.apache.xml
    11.9  PRODUCT = xml
   11.10  include $(BUILDDIR)/common/Defs.gmk
    12.1 --- a/make/com/sun/rowset/Makefile	Thu Jan 21 11:12:37 2010 -0800
    12.2 +++ b/make/com/sun/rowset/Makefile	Fri Jan 22 09:34:17 2010 -0800
    12.3 @@ -28,6 +28,7 @@
    12.4  #
    12.5  
    12.6  BUILDDIR = ../../..
    12.7 +MODULE  = jdbc-enterprise
    12.8  PACKAGE = com.sun.rowset
    12.9  PRODUCT = sun
   12.10  include $(BUILDDIR)/common/Defs.gmk
    13.1 --- a/make/com/sun/script/Makefile	Thu Jan 21 11:12:37 2010 -0800
    13.2 +++ b/make/com/sun/script/Makefile	Fri Jan 22 09:34:17 2010 -0800
    13.3 @@ -25,6 +25,7 @@
    13.4  
    13.5  
    13.6  BUILDDIR = ../../..
    13.7 +MODULE  = scripting-rhino
    13.8  PACKAGE = com.sun.script
    13.9  PRODUCT = sun
   13.10  include $(BUILDDIR)/common/Defs.gmk
    14.1 --- a/make/com/sun/security/auth/module/Makefile	Thu Jan 21 11:12:37 2010 -0800
    14.2 +++ b/make/com/sun/security/auth/module/Makefile	Fri Jan 22 09:34:17 2010 -0800
    14.3 @@ -26,6 +26,7 @@
    14.4  # Makefile for building auth modules.
    14.5  
    14.6  BUILDDIR = ../../../../..
    14.7 +MODULE  = security-auth
    14.8  PACKAGE = com.sun.security.auth.module
    14.9  PRODUCT = sun
   14.10  
    15.1 --- a/make/com/sun/servicetag/Makefile	Thu Jan 21 11:12:37 2010 -0800
    15.2 +++ b/make/com/sun/servicetag/Makefile	Fri Jan 22 09:34:17 2010 -0800
    15.3 @@ -22,6 +22,7 @@
    15.4  # have any questions.
    15.5  
    15.6  BUILDDIR = ../../..
    15.7 +MODULE  = servicetag
    15.8  PACKAGE = com.sun.servicetag
    15.9  PRODUCT = sun
   15.10  include $(BUILDDIR)/common/Defs.gmk
   15.11 @@ -68,7 +69,7 @@
   15.12  
   15.13  $(SERVICETAG_LIBDIR)/jdk_header.png: $(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
   15.14  	$(install-file)
   15.15 -	$(CHMOD) 444 $@
   15.16 +	$(call chmod-file, 444)
   15.17  
   15.18  install-servicetag-lib:
   15.19  	@$(RM) -rf $(SERVICETAG_LIBDIR)
    16.1 --- a/make/com/sun/tools/attach/Makefile	Thu Jan 21 11:12:37 2010 -0800
    16.2 +++ b/make/com/sun/tools/attach/Makefile	Fri Jan 22 09:34:17 2010 -0800
    16.3 @@ -25,6 +25,7 @@
    16.4  
    16.5  
    16.6  BUILDDIR = ../../../..
    16.7 +MODULE  = attach
    16.8  PACKAGE = com.sun.tools.attach
    16.9  LIBRARY = attach
   16.10  PRODUCT = sun
   16.11 @@ -65,6 +66,7 @@
   16.12  	@$(MKDIR) -p $(@D)
   16.13  	@$(RM) $@
   16.14  	@$(CAT) $< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $@
   16.15 +	@$(install-module-file)
   16.16                                                                                                  
   16.17  .PHONY: copy-files
   16.18  
    17.1 --- a/make/common/Defs.gmk	Thu Jan 21 11:12:37 2010 -0800
    17.2 +++ b/make/common/Defs.gmk	Fri Jan 22 09:34:17 2010 -0800
    17.3 @@ -225,12 +225,6 @@
    17.4      endif
    17.5    endif 
    17.6  
    17.7 -  ifeq ($(PLATFORM), windows)
    17.8 -    FREETYPE_LIB = $(FREETYPE_LIB_PATH)/freetype.lib
    17.9 -  else
   17.10 -    FREETYPE_LIB = -L$(FREETYPE_LIB_PATH) -lfreetype
   17.11 -  endif
   17.12 -
   17.13    ifdef ALT_FREETYPE_HEADERS_PATH
   17.14      FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
   17.15    else
   17.16 @@ -313,6 +307,9 @@
   17.17  # for generated class files
   17.18  CLASSBINDIR         = $(OUTPUTDIR)/classes
   17.19  DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
   17.20 +# for modules
   17.21 +MODULES_DIR         = $(OUTPUTDIR)/modules
   17.22 +ABS_MODULES_DIR     = $(ABS_OUTPUTDIR)/modules
   17.23  # for generated tool class files
   17.24  BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
   17.25  # for build tool jar files
   17.26 @@ -388,6 +385,22 @@
   17.27    UNIQUE_LOCATION_STRING += /$(THREADDIR)
   17.28  endif
   17.29  
   17.30 +#
   17.31 +# Build units may or may not define MODULE.  Default to "other".
   17.32 +#
   17.33 +# MODULE variable defines the lowest-level module name that
   17.34 +# might or might not be the name of the modules created in
   17.35 +# the modules build (see make/modules/modules.config and
   17.36 +# modules.group).
   17.37 +#
   17.38 +MODULES_TEMPDIR     = $(OUTPUTDIR)/tmp/modules
   17.39 +ABS_MODULES_TEMPDIR = $(ABS_OUTPUTDIR)/tmp/modules
   17.40 +
   17.41 +ifndef MODULE
   17.42 +  MODULE = other
   17.43 +endif
   17.44 +override MODULE_DEST_DIR = $(MODULES_TEMPDIR)/$(MODULE)
   17.45 +
   17.46  # the use of += above makes a space separated list which we need to 
   17.47  # remove for filespecs.
   17.48  #
   17.49 @@ -498,6 +511,58 @@
   17.50  include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
   17.51  
   17.52  #
   17.53 +# Macros to find the module that $@ belongs to
   17.54 +#
   17.55 +
   17.56 +UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
   17.57 +MODULE_PATH_PATTERN = -e 's%.*\/classes\/%classes\/%' \
   17.58 +		      -e 's%.*\/$(UNIQUE_PATH_PATTERN)\/%classes\/%' \
   17.59 +		      -e 's%.*\/lib\/%lib\/%' \
   17.60 +	              -e 's%.*\/bin\/%bin\/%' \
   17.61 +	              -e 's%.*\/include\/%include\/%' \
   17.62 +		      -e 's%.*\/demo\/%demo\/%' \
   17.63 +		      -e 's%.*\/sample\/%sample\/%'
   17.64 +
   17.65 +# Install a file to its module
   17.66 +define install-module-file
   17.67 +dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
   17.68 +$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
   17.69 +$(CP) -f $@ $(MODULE_DEST_DIR)/$$dest
   17.70 +endef
   17.71 +
   17.72 +# Install all files from the directory to its module
   17.73 +define install-module-dir
   17.74 +dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \
   17.75 +$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \
   17.76 +$(CP) -rf $(@D)/* $(MODULE_DEST_DIR)/$$dest
   17.77 +endef
   17.78 +
   17.79 +# chmod the file in its module
   17.80 +define chmod-module-file
   17.81 +dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
   17.82 +$(CHMOD) $1 $(MODULE_DEST_DIR)/$$dest
   17.83 +endef
   17.84 +
   17.85 +# install a sym link in its module
   17.86 +define install-module-sym-link
   17.87 +dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \
   17.88 +$(LN) -sf $1 $(MODULE_DEST_DIR)/$$dest
   17.89 +endef
   17.90 +
   17.91 +
   17.92 +# Run MAKE $@ for a launcher:
   17.93 +#   $(call make-launcher, name, mainclass, java-args, main-args)
   17.94 +define make-launcher
   17.95 +$(CD) $(BUILDDIR)/launchers && \
   17.96 +$(MAKE) -f Makefile.launcher \
   17.97 +        MODULE=$(MODULE) \
   17.98 +        PROGRAM=$(strip $1) \
   17.99 +        MAIN_CLASS=$(strip $2) \
  17.100 +        MAIN_JAVA_ARGS="$(strip $3)" \
  17.101 +        MAIN_ARGS="$(strip $4)"
  17.102 +endef
  17.103 +
  17.104 +#
  17.105  # Convenient macros
  17.106  #
  17.107  
  17.108 @@ -511,6 +576,28 @@
  17.109  define install-file
  17.110  $(prep-target)
  17.111  $(CP) $< $@
  17.112 +$(install-module-file)
  17.113 +endef
  17.114 +
  17.115 +define chmod-file
  17.116 +$(CHMOD) $1 $@
  17.117 +$(call chmod-module-file, $1)
  17.118 +endef
  17.119 +
  17.120 +define install-sym-link
  17.121 +$(LN) -s $1 $@
  17.122 +$(call install-module-sym-link, $1)
  17.123 +endef
  17.124 +
  17.125 +#
  17.126 +# Marcos for files not belonging to any module 
  17.127 +define install-non-module-file
  17.128 +$(prep-target)
  17.129 +$(CP) $< $@
  17.130 +endef
  17.131 +
  17.132 +define install-manifest-file
  17.133 +$(install-non-module-file)
  17.134  endef
  17.135  
  17.136  # Cleanup rule for after debug java run (hotspot.log file is left around)
  17.137 @@ -712,7 +799,7 @@
  17.138  endif
  17.139  
  17.140  # Install of imported file (JDK_IMPORT_PATH, or some other external location)
  17.141 -define install-import-file
  17.142 +define install-importonly-file
  17.143  @$(ECHO) "ASSEMBLY_IMPORT: $@"
  17.144  $(prep-target)
  17.145  $(CP) $< $@
  17.146 @@ -730,4 +817,9 @@
  17.147  fi
  17.148  endef
  17.149  
  17.150 +define install-import-file
  17.151 +$(install-importonly-file)
  17.152 +$(install-module-file)
  17.153 +endef
  17.154 +
  17.155  .PHONY: all build clean clobber
    18.1 --- a/make/common/Demo.gmk	Thu Jan 21 11:12:37 2010 -0800
    18.2 +++ b/make/common/Demo.gmk	Fri Jan 22 09:34:17 2010 -0800
    18.3 @@ -25,6 +25,8 @@
    18.4  
    18.5  # JDK Demo building jar file.
    18.6    
    18.7 +MODULE = demos
    18.8 +
    18.9  # Some names are defined with LIBRARY inside the Defs.gmk file
   18.10  LIBRARY=$(DEMONAME)
   18.11  OBJDIR=$(TEMPDIR)/$(DEMONAME)
    19.1 --- a/make/common/Library.gmk	Thu Jan 21 11:12:37 2010 -0800
    19.2 +++ b/make/common/Library.gmk	Fri Jan 22 09:34:17 2010 -0800
    19.3 @@ -193,9 +193,18 @@
    19.4  	$(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2
    19.5  endif
    19.6  	$(CP) $(OBJDIR)/$(@F) $@
    19.7 +	$(install-module-file)
    19.8  	$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
    19.9  	$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
   19.10  
   19.11 +$(ACTUAL_LIBRARY):: $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).map $(ACTUAL_LIBRARY_DIR)/$(LIBRARY).pdb
   19.12 +
   19.13 +$(ACTUAL_LIBRARY_DIR)/%.map: FORCE
   19.14 +	$(install-module-file)
   19.15 +
   19.16 +$(ACTUAL_LIBRARY_DIR)/%.pdb: FORCE
   19.17 +	$(install-module-file)
   19.18 +
   19.19  endif # LIBRARY
   19.20  
   19.21  $(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
   19.22 @@ -250,6 +259,7 @@
   19.23  	$(AR) -r $@ $(FILES_o)
   19.24  else # LIBRARY
   19.25  	$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
   19.26 +	$(install-module-file)
   19.27  ifeq ($(WRITE_LIBVERSION),true)
   19.28  	$(MCS) -d -a "$(FULL_VERSION)" $@
   19.29  endif # WRITE_LIBVERSION
   19.30 @@ -353,5 +363,7 @@
   19.31  openjdk:
   19.32  	$(MAKE) OPENJDK=true build
   19.33  
   19.34 +FORCE:
   19.35 +
   19.36  .PHONY: all build debug fastdebug
   19.37  
    20.1 --- a/make/common/Modules.gmk	Thu Jan 21 11:12:37 2010 -0800
    20.2 +++ b/make/common/Modules.gmk	Fri Jan 22 09:34:17 2010 -0800
    20.3 @@ -34,12 +34,10 @@
    20.4  #
    20.5  # Open issues that need further investigation:
    20.6  # 1. Classes in jre/lib/ext/dnsns.jar are currently put in jre/lib/jndi-dns
    20.7 -#    module.
    20.8 +#    module.  META-INF/services file is not installed.
    20.9  # 2. Signed jars
   20.10  #    For JDK build, signed jars are copied to the build.
   20.11  #    All jars in the module image are unsigned.
   20.12 -# 3. jre/lib/security/US_export_policy.jar and local_policy.jar
   20.13 -#    are not included in the module image yet.
   20.14  
   20.15  MODULE_IMAGEBINDIR = bin
   20.16  
   20.17 @@ -63,7 +61,8 @@
   20.18  	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
   20.19  
   20.20  # Order is important here, trim jre after jdk image is created
   20.21 -modules:: sanity-module-images post-sanity-module-images  \
   20.22 +modules:: gen-modules \
   20.23 +	 sanity-module-images post-sanity-module-images  \
   20.24  	 $(INITIAL_MODULE_IMAGE_JRE) $(INITIAL_MODULE_IMAGE_JDK) \
   20.25  	 trim-module-image-jre trim-module-image-jdk \
   20.26  	 process-module-image-jre process-module-image-jdk
   20.27 @@ -122,8 +121,33 @@
   20.28  # JRE Image
   20.29  ######################################################
   20.30  
   20.31 -MODULES_TEMPDIR=$(ABS_TEMPDIR)/modules
   20.32 -MODULES_LIB = $(ABS_OUTPUTDIR)/modules
   20.33 +MODULES_LIST = $(MODULES_TEMPDIR)/classlist/modules.list
   20.34 +
   20.35 +# Modules in the jre/lib/security directory
   20.36 +POLICY_MODULES = US_export_policy local_policy
   20.37 +
   20.38 +# Modules in the modules/ext directory
   20.39 +EXT_MODULES = localedata security-sunec security-sunjce
   20.40 +
   20.41 +# Build PKCS#11 on all platforms except 64-bit Windows.
   20.42 +PKCS11 = security-sunpkcs11
   20.43 +ifeq ($(ARCH_DATA_MODEL), 64)
   20.44 +  ifeq ($(PLATFORM), windows)
   20.45 +    PKCS11 =
   20.46 +  endif
   20.47 +endif
   20.48 +
   20.49 +EXT_MODULES += $(PKCS11)
   20.50 +
   20.51 +# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
   20.52 +ifeq ($(PLATFORM), windows)
   20.53 +  ifneq ($(ARCH_DATA_MODEL), 64)
   20.54 +    EXT_MODULES += security-sunmscapi
   20.55 +  endif
   20.56 +endif
   20.57 +
   20.58 +# Modules for JDK only
   20.59 +JDK_MODULES = tools
   20.60  
   20.61  gen-modules:
   20.62  	$(CD) modules; $(MAKE) all
   20.63 @@ -151,7 +175,6 @@
   20.64  # Construct an initial jre image (initial jdk jre) no trimming or stripping
   20.65  initial-module-image-jre:: initial-module-image-jre-setup \
   20.66  		    $(JRE_LICENSES) $(JRE_MODULE_DOCFILES) \
   20.67 -		    gen-modules \
   20.68  		    $(BUILDMETAINDEX_JARFILE)
   20.69  	@# Copy in bin directory
   20.70  	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_MODULE_IMAGE_DIR)
   20.71 @@ -162,7 +185,21 @@
   20.72  	@#
   20.73  	@# copy modules to jre/lib
   20.74  	@#
   20.75 -	$(CP) -rf $(MODULES_LIB)/jre/lib/* $(JRE_MODULE_IMAGE_DIR)/lib 
   20.76 +	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
   20.77 +	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib ; \
   20.78 +	done
   20.79 +	$(MKDIR) -p $(JRE_MODULE_IMAGE_DIR)/lib/ext
   20.80 +	for m in $(EXT_MODULES) ; do \
   20.81 +           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/ext ; \
   20.82 +        done
   20.83 +	for m in $(POLICY_MODULES) ; do \
   20.84 +           $(MV) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar $(JRE_MODULE_IMAGE_DIR)/lib/security; \
   20.85 +        done
   20.86 +	@# Remove jdk modules
   20.87 +	for m in $(JDK_MODULES) ; do \
   20.88 +           $(RM) $(JRE_MODULE_IMAGE_DIR)/lib/$$m.jar ; \
   20.89 +        done
   20.90 +
   20.91  	@# Make sure all directories are read/execute for everyone
   20.92  	$(CHMOD) a+rx `$(FIND) $(JRE_MODULE_IMAGE_DIR) -type d`
   20.93  	@# Remove some files from the jre area
   20.94 @@ -304,7 +341,9 @@
   20.95  	@# copy jdk modules to jdk/lib
   20.96  	@#
   20.97  	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/lib
   20.98 -	$(CP) -rf $(MODULES_LIB)/lib/* $(JDK_MODULE_IMAGE_DIR)/lib 
   20.99 +	for m in $(JDK_MODULES) ; do \
  20.100 +	    $(CP) $(MODULES_DIR)/$$m/lib/$$m.jar $(JDK_MODULE_IMAGE_DIR)/lib ; \
  20.101 +        done
  20.102    ifeq ($(PLATFORM), windows)
  20.103  	@#
  20.104  	@# lib/
    21.1 --- a/make/common/Program.gmk	Thu Jan 21 11:12:37 2010 -0800
    21.2 +++ b/make/common/Program.gmk	Fri Jan 22 09:34:17 2010 -0800
    21.3 @@ -50,8 +50,6 @@
    21.4  ACTUAL_PROGRAM_DIR  = $(BINDIR)
    21.5  ACTUAL_PROGRAM      = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
    21.6  
    21.7 -JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
    21.8 -
    21.9  # Make sure the default rule is all
   21.10  program_default_rule: all
   21.11  
   21.12 @@ -116,7 +114,7 @@
   21.13  
   21.14  ifeq ($(COMPILE_IT),true)
   21.15  
   21.16 -$(ACTUAL_PROGRAM):: classes $(JVMCFG) $(INIT) 
   21.17 +$(ACTUAL_PROGRAM):: classes $(INIT) 
   21.18  
   21.19  #
   21.20  # Windows only
   21.21 @@ -190,12 +188,13 @@
   21.22  	@$(MKDIR) -p $(TEMPDIR)
   21.23  	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
   21.24  	    $(FILES_o) $(THREADLIBS) $(LDLIBS)
   21.25 +	$(install-module-file)
   21.26  
   21.27  endif # PLATFORM
   21.28  
   21.29  else  # COMPILE_IT
   21.30  
   21.31 -$(ACTUAL_PROGRAM):: $(JVMCFG)
   21.32 +$(ACTUAL_PROGRAM)::
   21.33  
   21.34  # Copies in the file from the JDK_IMPORT_PATH area
   21.35  $(ACTUAL_PROGRAM_DIR)/%: $(JDK_IMPORT_PATH)/jre/bin/%
   21.36 @@ -272,18 +271,6 @@
   21.37  		$(VERSION_DEFINES) $<
   21.38  
   21.39  #
   21.40 -# How to install jvm.cfg. 
   21.41 -#
   21.42 -ifeq ($(ZERO_BUILD), true)
   21.43 -JVMCFG_ARCH = zero
   21.44 -else
   21.45 -JVMCFG_ARCH = $(ARCH)
   21.46 -endif
   21.47 -
   21.48 -$(JVMCFG): $(LAUNCHER_PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg 
   21.49 -	$(install-file)
   21.50 -
   21.51 -#
   21.52  # Default dependencies
   21.53  #
   21.54  
    22.1 --- a/make/common/internal/BinaryPlugs.gmk	Thu Jan 21 11:12:37 2010 -0800
    22.2 +++ b/make/common/internal/BinaryPlugs.gmk	Fri Jan 22 09:34:17 2010 -0800
    22.3 @@ -116,7 +116,7 @@
    22.4  
    22.5  define import-binary-plug-file
    22.6  @$(ECHO) "PLUG IMPORT: $(@F)"
    22.7 -$(install-file)
    22.8 +$(install-non-module-file)
    22.9  endef # import-binary-plug-file
   22.10  
   22.11  # Import classes command
   22.12 @@ -184,7 +184,7 @@
   22.13  
   22.14  define export-binary-plug-file
   22.15  @$(ECHO) "PLUG EXPORT: $(@F)"
   22.16 -$(install-file)
   22.17 +$(install-non-module-file)
   22.18  endef # export-binary-plug-file
   22.19  
   22.20  # OpenJDK Binary Plug License
    23.1 --- a/make/common/internal/Resources.gmk	Thu Jan 21 11:12:37 2010 -0800
    23.2 +++ b/make/common/internal/Resources.gmk	Fri Jan 22 09:34:17 2010 -0800
    23.3 @@ -139,7 +139,7 @@
    23.4  STRIP_PROP_options=$(TEMPDIR)/strip_prop_options
    23.5  define install-properties-file
    23.6  $(install-file)
    23.7 -$(CHMOD) a+rw $@
    23.8 +$(call chmod-file, a+rw)
    23.9  @$(ECHO) "# Adding to strip properties list: $@"
   23.10  $(ECHO) "$@" >> $(STRIP_PROP_options)
   23.11  endef
    24.1 --- a/make/common/shared/Sanity.gmk	Thu Jan 21 11:12:37 2010 -0800
    24.2 +++ b/make/common/shared/Sanity.gmk	Fri Jan 22 09:34:17 2010 -0800
    24.3 @@ -1117,7 +1117,7 @@
    24.4  #    be checked when this represents a full control build (i.e. the
    24.5  #    HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
    24.6  $(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
    24.7 -	@$(install-file)
    24.8 +	@$(install-non-module-file)
    24.9  	@$(RM) $@.IMPORT
   24.10  	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
   24.11  	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
   24.12 @@ -1131,7 +1131,7 @@
   24.13  	fi
   24.14  
   24.15  $(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
   24.16 -	@$(install-file)
   24.17 +	@$(install-non-module-file)
   24.18  	@$(RM) $@.IMPORT
   24.19  	@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
   24.20  	  $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
    25.1 --- a/make/java/awt/Makefile	Thu Jan 21 11:12:37 2010 -0800
    25.2 +++ b/make/java/awt/Makefile	Fri Jan 22 09:34:17 2010 -0800
    25.3 @@ -24,6 +24,7 @@
    25.4  #
    25.5  
    25.6  BUILDDIR = ../..
    25.7 +MODULE  = awt
    25.8  PACKAGE = java.awt
    25.9  PRODUCT = sun
   25.10  include $(BUILDDIR)/common/Defs.gmk
    26.1 --- a/make/java/fdlibm/Makefile	Thu Jan 21 11:12:37 2010 -0800
    26.2 +++ b/make/java/fdlibm/Makefile	Fri Jan 22 09:34:17 2010 -0800
    26.3 @@ -31,6 +31,7 @@
    26.4  #
    26.5  
    26.6  BUILDDIR     = ../..
    26.7 +MODULE       = base
    26.8  LIBRARY      = fdlibm
    26.9  PRODUCT      = java
   26.10  
    27.1 --- a/make/java/hpi/native/Makefile	Thu Jan 21 11:12:37 2010 -0800
    27.2 +++ b/make/java/hpi/native/Makefile	Fri Jan 22 09:34:17 2010 -0800
    27.3 @@ -28,6 +28,7 @@
    27.4  #
    27.5  
    27.6  BUILDDIR     = ../../..
    27.7 +MODULE       = base
    27.8  LIBRARY      = hpi
    27.9  PRODUCT      = java
   27.10  THREADDIR    = native_threads
    28.1 --- a/make/java/hpi/windows/Makefile	Thu Jan 21 11:12:37 2010 -0800
    28.2 +++ b/make/java/hpi/windows/Makefile	Fri Jan 22 09:34:17 2010 -0800
    28.3 @@ -26,8 +26,9 @@
    28.4  #
    28.5  # Makefile for Windows HPI DLL
    28.6  #
    28.7 -BUILDDIR = ../../..
    28.8 -LIBRARY   = hpi
    28.9 +BUILDDIR     = ../../..
   28.10 +MODULE       = base
   28.11 +LIBRARY      = hpi
   28.12  PRODUCT      = java
   28.13  THREADDIR    = windows_threads
   28.14  LIB_LOCATION = $(BINDIR)
    29.1 --- a/make/java/instrument/Makefile	Thu Jan 21 11:12:37 2010 -0800
    29.2 +++ b/make/java/instrument/Makefile	Fri Jan 22 09:34:17 2010 -0800
    29.3 @@ -27,6 +27,7 @@
    29.4  # agent, supporting java.lang.instrument
    29.5  
    29.6  BUILDDIR = ../..
    29.7 +MODULE  = instrument
    29.8  PACKAGE = sun.instrument
    29.9  LIBRARY = instrument
   29.10  PRODUCT = sun
    30.1 --- a/make/java/java/Makefile	Thu Jan 21 11:12:37 2010 -0800
    30.2 +++ b/make/java/java/Makefile	Fri Jan 22 09:34:17 2010 -0800
    30.3 @@ -29,6 +29,7 @@
    30.4  #
    30.5  
    30.6  BUILDDIR = ../..
    30.7 +MODULE  = base
    30.8  PACKAGE = java.lang
    30.9  LIBRARY = java
   30.10  PRODUCT = java
   30.11 @@ -241,7 +242,7 @@
   30.12  
   30.13  $(GENSRCDIR)/java/lang/UNIXProcess.java: \
   30.14      $(PLATFORM_SRC)/classes/java/lang/UNIXProcess.java.$(PLATFORM)
   30.15 -	$(install-file)
   30.16 +	$(install-non-module-file)
   30.17  
   30.18  clean:: 
   30.19  	$(RM) $(GENSRCDIR)/java/lang/UNIXProcess.java
   30.20 @@ -285,7 +286,7 @@
   30.21  
   30.22  $(TZMAP): $(TZMAPFILE)
   30.23  	$(install-file)
   30.24 -	$(CHMOD) 444 $@
   30.25 +	$(call chmod-file, 444)
   30.26  endif
   30.27  
   30.28  build: $(LIBDIR)/$(PROPS) $(LIBDIR)/$(CAL_PROPS) $(TZMAP)
   30.29 @@ -315,7 +316,8 @@
   30.30  	$(BOOT_JAVA_CMD) -jar $(GENERATECURRENCYDATA_JARFILE) -o $@.temp \
   30.31  		< $(SHARE_SRC)/classes/java/util/CurrencyData.properties
   30.32  	$(MV) $@.temp $@
   30.33 -	$(CHMOD) 444 $@
   30.34 +	$(install-module-file)
   30.35 +	$(call chmod-file, 444)
   30.36  
   30.37  clean:: 
   30.38  	$(RM) $(CURDATA)
   30.39 @@ -369,7 +371,7 @@
   30.40  		-usecharforbyte 11 4 1
   30.41  
   30.42  $(GENSRCDIR)/java/lang/%.java : $(CHARACTERDATA)/%.java.template
   30.43 -	$(install-file)
   30.44 +	$(install-non-module-file)
   30.45  
   30.46  clean::
   30.47  	$(RM) $(GENSRCDIR)/java/lang/CharacterDataLatin1.java 
    31.1 --- a/make/java/java_crw_demo/Makefile	Thu Jan 21 11:12:37 2010 -0800
    31.2 +++ b/make/java/java_crw_demo/Makefile	Fri Jan 22 09:34:17 2010 -0800
    31.3 @@ -24,6 +24,8 @@
    31.4  #
    31.5  
    31.6  BUILDDIR = ../..
    31.7 +
    31.8 +MODULE  = demos
    31.9  LIBRARY = java_crw_demo
   31.10  PRODUCT = sun
   31.11  LIBRARY_OUTPUT = java_crw_demo
    32.1 --- a/make/java/java_hprof_demo/Makefile	Thu Jan 21 11:12:37 2010 -0800
    32.2 +++ b/make/java/java_hprof_demo/Makefile	Fri Jan 22 09:34:17 2010 -0800
    32.3 @@ -24,6 +24,7 @@
    32.4  #
    32.5  
    32.6  BUILDDIR = ../..
    32.7 +MODULE  = instrument
    32.8  LIBRARY = hprof
    32.9  PRODUCT = sun
   32.10  LIBRARY_OUTPUT = hprof_jvmti
    33.1 --- a/make/java/jli/Makefile	Thu Jan 21 11:12:37 2010 -0800
    33.2 +++ b/make/java/jli/Makefile	Fri Jan 22 09:34:17 2010 -0800
    33.3 @@ -30,6 +30,7 @@
    33.4  # its manifestations (java, javaw, javac, ...).
    33.5  #
    33.6  BUILDDIR = ../..
    33.7 +MODULE  = base
    33.8  LIBRARY = jli
    33.9  PRODUCT = java
   33.10  
    34.1 --- a/make/java/jvm/Makefile	Thu Jan 21 11:12:37 2010 -0800
    34.2 +++ b/make/java/jvm/Makefile	Fri Jan 22 09:34:17 2010 -0800
    34.3 @@ -24,6 +24,8 @@
    34.4  #
    34.5  
    34.6  BUILDDIR = ../..
    34.7 +MODULE   = base
    34.8 +
    34.9  include $(BUILDDIR)/common/Defs.gmk
   34.10  
   34.11  #
   34.12 @@ -36,15 +38,29 @@
   34.13  	  $(INCLUDEDIR)/classfile_constants.h
   34.14  
   34.15  $(INCLUDEDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
   34.16 -	$(install-file)
   34.17 +	$(install-non-module-file)
   34.18  
   34.19  $(PLATFORM_INCLUDE)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
   34.20 +	$(install-non-module-file)
   34.21 +
   34.22 +JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg
   34.23 +
   34.24 +#
   34.25 +# How to install jvm.cfg.
   34.26 +#
   34.27 +ifeq ($(ZERO_BUILD), true)
   34.28 +JVMCFG_ARCH = zero
   34.29 +else
   34.30 +JVMCFG_ARCH = $(ARCH)
   34.31 +endif
   34.32 +
   34.33 +$(JVMCFG): $(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg
   34.34  	$(install-file)
   34.35  
   34.36  all: build
   34.37  
   34.38 -build: $(FILES_h)
   34.39 +build: $(FILES_h) $(JVMCFG)
   34.40  
   34.41  clean clobber:: 
   34.42 -	$(RM) $(FILES_h)
   34.43 +	$(RM) $(FILES_h) $(JVMCFG)
   34.44  
    35.1 --- a/make/java/logging/Makefile	Thu Jan 21 11:12:37 2010 -0800
    35.2 +++ b/make/java/logging/Makefile	Fri Jan 22 09:34:17 2010 -0800
    35.3 @@ -24,6 +24,7 @@
    35.4  #
    35.5  
    35.6  BUILDDIR = ../..
    35.7 +MODULE  = logging
    35.8  PACKAGE = java.util.logging
    35.9  PRODUCT = java
   35.10  include $(BUILDDIR)/common/Defs.gmk
    36.1 --- a/make/java/main/java/Makefile	Thu Jan 21 11:12:37 2010 -0800
    36.2 +++ b/make/java/main/java/Makefile	Fri Jan 22 09:34:17 2010 -0800
    36.3 @@ -24,6 +24,7 @@
    36.4  #
    36.5  
    36.6  BUILDDIR = ../../..
    36.7 +MODULE  = base
    36.8  PROGRAM = java
    36.9  PRODUCT = java
   36.10  
    37.1 --- a/make/java/main/javaw/Makefile	Thu Jan 21 11:12:37 2010 -0800
    37.2 +++ b/make/java/main/javaw/Makefile	Fri Jan 22 09:34:17 2010 -0800
    37.3 @@ -28,6 +28,7 @@
    37.4  #
    37.5  
    37.6  BUILDDIR = ../../..
    37.7 +MODULE  = base
    37.8  PROGRAM = javaw
    37.9  PRODUCT = java
   37.10  
    38.1 --- a/make/java/management/Makefile	Thu Jan 21 11:12:37 2010 -0800
    38.2 +++ b/make/java/management/Makefile	Fri Jan 22 09:34:17 2010 -0800
    38.3 @@ -24,6 +24,7 @@
    38.4  #
    38.5  
    38.6  BUILDDIR = ../..
    38.7 +MODULE  = management
    38.8  PACKAGE = java.lang.management
    38.9  LIBRARY = management
   38.10  PRODUCT = java
   38.11 @@ -99,7 +100,7 @@
   38.12  	@$(java-vm-cleanup)
   38.13  
   38.14  $(TEMPDIR)/manifest: $(MANIFEST)
   38.15 -	$(install-file)
   38.16 +	$(install-manifest-file)
   38.17  
   38.18  build: $(AGENTJAR)
   38.19  
    39.1 --- a/make/java/net/Makefile	Thu Jan 21 11:12:37 2010 -0800
    39.2 +++ b/make/java/net/Makefile	Fri Jan 22 09:34:17 2010 -0800
    39.3 @@ -24,6 +24,7 @@
    39.4  #
    39.5  
    39.6  BUILDDIR = ../..
    39.7 +MODULE  = base
    39.8  PACKAGE = java.net
    39.9  LIBRARY = net
   39.10  PRODUCT = sun
   39.11 @@ -111,8 +112,7 @@
   39.12  MISC_FILES = $(LIBDIR) $(LIBDIR)/net.properties
   39.13  
   39.14  $(LIBDIR)/net.properties: $(SHARE_SRC)/lib/net.properties
   39.15 -	@$(RM) $@
   39.16 -	$(CP) $< $@
   39.17 +	$(install-file)
   39.18  
   39.19  # 
   39.20  # SDP configuration template
    40.1 --- a/make/java/nio/Makefile	Thu Jan 21 11:12:37 2010 -0800
    40.2 +++ b/make/java/nio/Makefile	Fri Jan 22 09:34:17 2010 -0800
    40.3 @@ -28,6 +28,7 @@
    40.4  #
    40.5  
    40.6  BUILDDIR = ../..
    40.7 +MODULE  = nio
    40.8  PACKAGE = java.nio
    40.9  LIBRARY = nio
   40.10  PRODUCT = java
   40.11 @@ -816,7 +817,7 @@
   40.12  	$(NAWK) '/^.*Copyright.*Sun/ { print $$3 }') 
   40.13  
   40.14  $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
   40.15 -	$(install-file)
   40.16 +	$(install-non-module-file)
   40.17  
   40.18  $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
   40.19  	$(prep-target)
    41.1 --- a/make/java/npt/Makefile	Thu Jan 21 11:12:37 2010 -0800
    41.2 +++ b/make/java/npt/Makefile	Fri Jan 22 09:34:17 2010 -0800
    41.3 @@ -24,6 +24,9 @@
    41.4  #
    41.5  
    41.6  BUILDDIR = ../..
    41.7 +
    41.8 +# It's currently used by jpda and hprof.  Put it in base module for now.
    41.9 +MODULE  = base
   41.10  LIBRARY = npt
   41.11  PRODUCT = sun
   41.12  LIBRARY_OUTPUT = npt
    42.1 --- a/make/java/redist/FILES.gmk	Thu Jan 21 11:12:37 2010 -0800
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,56 +0,0 @@
    42.4 -#
    42.5 -# Copyright 1998-2003 Sun Microsystems, Inc.  All Rights Reserved.
    42.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    42.7 -#
    42.8 -# This code is free software; you can redistribute it and/or modify it
    42.9 -# under the terms of the GNU General Public License version 2 only, as
   42.10 -# published by the Free Software Foundation.  Sun designates this
   42.11 -# particular file as subject to the "Classpath" exception as provided
   42.12 -# by Sun in the LICENSE file that accompanied this code.
   42.13 -#
   42.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   42.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   42.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   42.17 -# version 2 for more details (a copy is included in the LICENSE file that
   42.18 -# accompanied this code).
   42.19 -#
   42.20 -# You should have received a copy of the GNU General Public License version
   42.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   42.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   42.23 -#
   42.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   42.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   42.26 -# have any questions.
   42.27 -#
   42.28 -
   42.29 -#
   42.30 -# List of lucida font files that we redistribute.
   42.31 -#
   42.32 -
   42.33 -SHARED_FONTFILES =					\
   42.34 -	$(LIBDIR)/fonts/LucidaTypewriterRegular.ttf	\
   42.35 -	$(LIBDIR)/fonts/LucidaTypewriterBold.ttf        \
   42.36 -	$(LIBDIR)/fonts/LucidaBrightRegular.ttf         \
   42.37 -	$(LIBDIR)/fonts/LucidaBrightDemiBold.ttf        \
   42.38 -	$(LIBDIR)/fonts/LucidaBrightItalic.ttf          \
   42.39 -	$(LIBDIR)/fonts/LucidaBrightDemiItalic.ttf	\
   42.40 -	$(LIBDIR)/fonts/LucidaSansRegular.ttf       	\
   42.41 -	$(LIBDIR)/fonts/LucidaSansDemiBold.ttf       	\
   42.42 -
   42.43 -ifeq ($(PLATFORM), linux)
   42.44 -
   42.45 -# The oblique versions of the font are derived from the base versions
   42.46 -# and since 2D can do this derivation on the fly at run time there is no
   42.47 -# need to redistribute the fonts. An exception to this is on Linux.
   42.48 -# The reason is that the Lucidas are specified in the font.properties files
   42.49 -# on Linux, and so AWT/Motif components expect to be able to ask the Xserver
   42.50 -# for these oblique fonts, but the Xserver cannot do the same derivation as
   42.51 -# 2D can.
   42.52 -
   42.53 -OBLIQUE_FONTFILES =                                             \
   42.54 -	$(LIBDIR)/oblique-fonts/LucidaTypewriterOblique.ttf     \
   42.55 -	$(LIBDIR)/oblique-fonts/LucidaTypewriterBoldOblique.ttf \
   42.56 -	$(LIBDIR)/oblique-fonts/LucidaSansOblique.ttf       	\
   42.57 -	$(LIBDIR)/oblique-fonts/LucidaSansDemiOblique.ttf       \
   42.58 -
   42.59 -endif
    43.1 --- a/make/java/redist/Makefile	Thu Jan 21 11:12:37 2010 -0800
    43.2 +++ b/make/java/redist/Makefile	Fri Jan 22 09:34:17 2010 -0800
    43.3 @@ -35,6 +35,7 @@
    43.4  # 
    43.5  
    43.6  BUILDDIR = ../..
    43.7 +MODULE   = base
    43.8  PRODUCT  = java
    43.9  include $(BUILDDIR)/common/Defs.gmk
   43.10  
   43.11 @@ -61,7 +62,11 @@
   43.12  # Needed to do file copy
   43.13  ABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
   43.14  
   43.15 -all: build
   43.16 +SUBDIRS = fonts sajdi
   43.17 +all clean clobber::
   43.18 +	$(SUBDIRS-loop)
   43.19 +
   43.20 +all:: build
   43.21  
   43.22  # List of files created here or coming from BUILDDIR area (this workspace)
   43.23  INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
   43.24 @@ -70,30 +75,6 @@
   43.25  IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
   43.26                $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
   43.27  
   43.28 -# INCLUDE_SA is false on platforms where SA is not supported.
   43.29 -# On platforms where it is supported, we want to allow it to
   43.30 -# not be present, at least temporarily.  So,
   43.31 -# if the SA files (well, just sa-jdi.jar) do not exist 
   43.32 -# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
   43.33 -SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
   43.34 -                          $(ECHO) true; \
   43.35 -                        else \
   43.36 -                          $(ECHO) false; \
   43.37 -                        fi)
   43.38 -
   43.39 -ifeq ($(SA_EXISTS), false)
   43.40 -  INCLUDE_SA := false
   43.41 -endif
   43.42 -
   43.43 -ifeq ($(INCLUDE_SA), true)
   43.44 -  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
   43.45 -                 $(LIB_LOCATION)/$(SALIB_NAME)
   43.46 -  ifeq ($(PLATFORM), windows)
   43.47 -    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
   43.48 -                   $(LIB_LOCATION)/$(SAPDB_NAME)
   43.49 -  endif
   43.50 -endif # INCLUDE_SA
   43.51 -
   43.52  # Hotspot client is only available on 32-bit non-Zero builds
   43.53  ifneq ($(ZERO_BUILD), true)
   43.54  ifeq ($(ARCH_DATA_MODEL), 32)
   43.55 @@ -110,10 +91,10 @@
   43.56  # NOTE: These might actually come from BUILDDIR, depends on the settings.
   43.57  $(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
   43.58  	$(install-import-file)
   43.59 -	$(CHMOD) a+x $@
   43.60 +	$(call chmod-file, a+x)
   43.61  $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
   43.62  	$(install-import-file)
   43.63 -	$(CHMOD) a+x $@
   43.64 +	$(call chmod-file, a+x)
   43.65  
   43.66  # Get the hotspot .map and .pdb files for client and server
   43.67  IMPORT_LIST += \
   43.68 @@ -140,26 +121,32 @@
   43.69  $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
   43.70  	@$(prep-target)
   43.71  	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME)  $@
   43.72 +	@$(install-module-file)
   43.73  
   43.74  $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
   43.75  	@$(prep-target)
   43.76  	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME)  $@
   43.77 +	@$(install-module-file)
   43.78  
   43.79  $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
   43.80  	@$(prep-target)
   43.81  	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
   43.82 +	@$(install-module-file)
   43.83  
   43.84  $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
   43.85  	@$(prep-target)
   43.86  	-$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME)  $@
   43.87 +	@$(install-module-file)
   43.88  
   43.89  $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
   43.90  	@$(prep-target)
   43.91  	-$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME)  $@
   43.92 +	@$(install-module-file)
   43.93  
   43.94  $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): 
   43.95  	@$(prep-target)
   43.96  	-$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
   43.97 +	@$(install-module-file)
   43.98  
   43.99  #  Windows     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Windows
  43.100  else # PLATFORM
  43.101 @@ -220,7 +207,7 @@
  43.102  $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
  43.103  $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
  43.104  	@$(prep-target)
  43.105 -	$(LN) -s ../$(LIBJSIG_NAME) $@
  43.106 +	$(call install-sym-link, ../$(LIBJSIG_NAME))
  43.107  
  43.108  $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
  43.109  	$(install-import-file)
  43.110 @@ -246,28 +233,6 @@
  43.111  $(LIB_LOCATION)/$(KERNEL_LOCATION)/Xusage.txt : $(HOTSPOT_KERNEL_PATH)/Xusage.txt
  43.112  	$(install-file)
  43.113  
  43.114 -ifeq ($(INCLUDE_SA), true)
  43.115 -# The Serviceability Agent is built in the Hotspot workspace.
  43.116 -# It contains two files:
  43.117 -#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
  43.118 -#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
  43.119 -#		        This goes into the same dir as the other
  43.120 -#			shared libs, eg. libjdwp.so.
  43.121 -$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
  43.122 -	$(install-import-file)
  43.123 -
  43.124 -$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
  43.125 -	$(install-import-file)
  43.126 -
  43.127 -ifeq ($(PLATFORM), windows)
  43.128 -$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
  43.129 -	$(install-import-file)
  43.130 -
  43.131 -$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
  43.132 -	$(install-import-file)
  43.133 -endif # windows
  43.134 -endif # INCLUDE_SA
  43.135 -
  43.136  #
  43.137  # Specific to OpenJDK building
  43.138  #
  43.139 @@ -288,7 +253,7 @@
  43.140  
  43.141  $(LIBDIR)/jce.jar: \
  43.142  	    $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
  43.143 -	$(install-file)
  43.144 +	$(install-non-module-file)
  43.145  $(LIBDIR)/security/US_export_policy.jar: \
  43.146  	    $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
  43.147  	$(install-file)
  43.148 @@ -310,46 +275,6 @@
  43.149  	    $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
  43.150  	$(MV) $@.temp $@
  43.151  
  43.152 -ifndef OPENJDK
  43.153 -
  43.154 -# Lucida font files are not included in the OpenJDK distribution.
  43.155 -# Get names of font files
  43.156 -include FILES.gmk
  43.157 -
  43.158 -# Copy font files into OUTPUTDIR area
  43.159 -
  43.160 -FONTFILES = $(SHARED_FONTFILES)
  43.161 -FONTSDIR  = $(LIBDIR)/fonts
  43.162 -FONTSDIRFILE  = $(FONTSDIR)/fonts.dir
  43.163 -INTERNAL_IMPORT_LIST += $(FONTFILES) 
  43.164 -
  43.165 -ifneq ($(PLATFORM), windows)
  43.166 -  INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
  43.167 -endif
  43.168 -
  43.169 -$(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
  43.170 -	$(install-file)
  43.171 -
  43.172 -$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
  43.173 -	$(install-file)
  43.174 -
  43.175 -ifeq ($(PLATFORM), linux)
  43.176 -
  43.177 -# The oblique fonts are only needed/wanted on Linux.
  43.178 -
  43.179 -OBLFONTSDIR  = $(LIBDIR)/oblique-fonts
  43.180 -OBLFONTSDIRFILE	 = $(OBLFONTSDIR)/fonts.dir
  43.181 -INTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
  43.182 -
  43.183 -$(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
  43.184 -	$(install-file)
  43.185 -
  43.186 -$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
  43.187 -	$(install-file)
  43.188 -
  43.189 -endif # linux
  43.190 -endif # !OPENJDK
  43.191 -
  43.192  # Import internal files (ones that are stashed in this source tree)
  43.193  import_internal_files : $(INTERNAL_IMPORT_LIST)
  43.194  
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/make/java/redist/fonts/Makefile	Fri Jan 22 09:34:17 2010 -0800
    44.3 @@ -0,0 +1,111 @@
    44.4 +#
    44.5 +# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    44.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44.7 +#
    44.8 +# This code is free software; you can redistribute it and/or modify it
    44.9 +# under the terms of the GNU General Public License version 2 only, as
   44.10 +# published by the Free Software Foundation.  Sun designates this
   44.11 +# particular file as subject to the "Classpath" exception as provided
   44.12 +# by Sun in the LICENSE file that accompanied this code.
   44.13 +#
   44.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
   44.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   44.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   44.17 +# version 2 for more details (a copy is included in the LICENSE file that
   44.18 +# accompanied this code).
   44.19 +#
   44.20 +# You should have received a copy of the GNU General Public License version
   44.21 +# 2 along with this work; if not, write to the Free Software Foundation,
   44.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   44.23 +#
   44.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   44.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
   44.26 +# have any questions.
   44.27 +#
   44.28 +
   44.29 +BUILDDIR = ../../..
   44.30 +MODULE   = font
   44.31 +PRODUCT  = java
   44.32 +include $(BUILDDIR)/common/Defs.gmk
   44.33 +
   44.34 +
   44.35 +#
   44.36 +# List of lucida font files that we redistribute.
   44.37 +#
   44.38 +
   44.39 +SHARED_FONTFILES =					\
   44.40 +	$(LIBDIR)/fonts/LucidaTypewriterRegular.ttf	\
   44.41 +	$(LIBDIR)/fonts/LucidaTypewriterBold.ttf        \
   44.42 +	$(LIBDIR)/fonts/LucidaBrightRegular.ttf         \
   44.43 +	$(LIBDIR)/fonts/LucidaBrightDemiBold.ttf        \
   44.44 +	$(LIBDIR)/fonts/LucidaBrightItalic.ttf          \
   44.45 +	$(LIBDIR)/fonts/LucidaBrightDemiItalic.ttf	\
   44.46 +	$(LIBDIR)/fonts/LucidaSansRegular.ttf       	\
   44.47 +	$(LIBDIR)/fonts/LucidaSansDemiBold.ttf       	\
   44.48 +
   44.49 +ifeq ($(PLATFORM), linux)
   44.50 +
   44.51 +# The oblique versions of the font are derived from the base versions
   44.52 +# and since 2D can do this derivation on the fly at run time there is no
   44.53 +# need to redistribute the fonts. An exception to this is on Linux.
   44.54 +# The reason is that the Lucidas are specified in the font.properties files
   44.55 +# on Linux, and so AWT/Motif components expect to be able to ask the Xserver
   44.56 +# for these oblique fonts, but the Xserver cannot do the same derivation as
   44.57 +# 2D can.
   44.58 +
   44.59 +OBLIQUE_FONTFILES =                                             \
   44.60 +	$(LIBDIR)/oblique-fonts/LucidaTypewriterOblique.ttf     \
   44.61 +	$(LIBDIR)/oblique-fonts/LucidaTypewriterBoldOblique.ttf \
   44.62 +	$(LIBDIR)/oblique-fonts/LucidaSansOblique.ttf       	\
   44.63 +	$(LIBDIR)/oblique-fonts/LucidaSansDemiOblique.ttf       \
   44.64 +
   44.65 +endif
   44.66 +
   44.67 +ifndef OPENJDK
   44.68 +
   44.69 +# Lucida font files are not included in the OpenJDK distribution.
   44.70 +# Get names of font files
   44.71 +
   44.72 +# Copy font files into OUTPUTDIR area
   44.73 +
   44.74 +FONTFILES = $(SHARED_FONTFILES)
   44.75 +FONTSDIR  = $(LIBDIR)/fonts
   44.76 +FONTSDIRFILE  = $(FONTSDIR)/fonts.dir
   44.77 +INTERNAL_IMPORT_LIST = $(FONTFILES) 
   44.78 +
   44.79 +ifneq ($(PLATFORM), windows)
   44.80 +  INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
   44.81 +endif
   44.82 +
   44.83 +$(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
   44.84 +	$(install-file)
   44.85 +
   44.86 +$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
   44.87 +	$(install-file)
   44.88 +
   44.89 +ifeq ($(PLATFORM), linux)
   44.90 +
   44.91 +# The oblique fonts are only needed/wanted on Linux.
   44.92 +
   44.93 +OBLFONTSDIR  = $(LIBDIR)/oblique-fonts
   44.94 +OBLFONTSDIRFILE	 = $(OBLFONTSDIR)/fonts.dir
   44.95 +INTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
   44.96 +
   44.97 +$(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
   44.98 +	$(install-file)
   44.99 +
  44.100 +$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
  44.101 +	$(install-file)
  44.102 +
  44.103 +endif # linux
  44.104 +
  44.105 +all build : $(INTERNAL_IMPORT_LIST)
  44.106 +
  44.107 +clean clobber::
  44.108 +	$(RM) $(INTERNAL_IMPORT_LIST)
  44.109 +
  44.110 +else 
  44.111 +
  44.112 +all build clean clobber :
  44.113 +
  44.114 +endif # !OPENJDK
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/make/java/redist/sajdi/Makefile	Fri Jan 22 09:34:17 2010 -0800
    45.3 @@ -0,0 +1,87 @@
    45.4 +#
    45.5 +# Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
    45.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    45.7 +#
    45.8 +# This code is free software; you can redistribute it and/or modify it
    45.9 +# under the terms of the GNU General Public License version 2 only, as
   45.10 +# published by the Free Software Foundation.  Sun designates this
   45.11 +# particular file as subject to the "Classpath" exception as provided
   45.12 +# by Sun in the LICENSE file that accompanied this code.
   45.13 +#
   45.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
   45.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   45.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   45.17 +# version 2 for more details (a copy is included in the LICENSE file that
   45.18 +# accompanied this code).
   45.19 +#
   45.20 +# You should have received a copy of the GNU General Public License version
   45.21 +# 2 along with this work; if not, write to the Free Software Foundation,
   45.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   45.23 +#
   45.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   45.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
   45.26 +# have any questions.
   45.27 +#
   45.28 +
   45.29 +BUILDDIR = ../../..
   45.30 +MODULE   = sajdi
   45.31 +PRODUCT  = java
   45.32 +include $(BUILDDIR)/common/Defs.gmk
   45.33 +
   45.34 +ifeq ($(PLATFORM), windows)
   45.35 +  LIB_LOCATION = $(BINDIR)
   45.36 +else
   45.37 +  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
   45.38 +endif
   45.39 +
   45.40 +# INCLUDE_SA is false on platforms where SA is not supported.
   45.41 +# On platforms where it is supported, we want to allow it to
   45.42 +# not be present, at least temporarily.  So,
   45.43 +# if the SA files (well, just sa-jdi.jar) do not exist
   45.44 +# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
   45.45 +SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
   45.46 +                          $(ECHO) true; \
   45.47 +                        else \
   45.48 +                          $(ECHO) false; \
   45.49 +                        fi)
   45.50 +
   45.51 +ifeq ($(SA_EXISTS), false)
   45.52 +  INCLUDE_SA := false
   45.53 +endif
   45.54 +
   45.55 +IMPORT_LIST =
   45.56 +ifeq ($(INCLUDE_SA), true)
   45.57 +  IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
   45.58 +                 $(LIB_LOCATION)/$(SALIB_NAME)
   45.59 +  ifeq ($(PLATFORM), windows)
   45.60 +    IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
   45.61 +                   $(LIB_LOCATION)/$(SAPDB_NAME)
   45.62 +  endif
   45.63 +endif # INCLUDE_SA
   45.64 +
   45.65 +
   45.66 +ifeq ($(INCLUDE_SA), true)
   45.67 +# The Serviceability Agent is built in the Hotspot workspace.
   45.68 +# It contains two files:
   45.69 +#  - sa-jdi.jar:  This goes into the same dir as tools.jar.
   45.70 +#  - a shared library:  sawindbg.dll on windows / libproc.sa on unix
   45.71 +#		        This goes into the same dir as the other
   45.72 +#			shared libs, eg. libjdwp.so.
   45.73 +$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
   45.74 +	$(install-importonly-file)
   45.75 +
   45.76 +$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
   45.77 +	$(install-import-file)
   45.78 +
   45.79 +ifeq ($(PLATFORM), windows)
   45.80 +$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
   45.81 +	$(install-import-file)
   45.82 +
   45.83 +$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
   45.84 +	$(install-import-file)
   45.85 +endif # windows
   45.86 +endif # INCLUDE_SA
   45.87 +
   45.88 +all: $(IMPORT_LIST)
   45.89 +
   45.90 +clean clobber::
    46.1 --- a/make/java/security/Makefile	Thu Jan 21 11:12:37 2010 -0800
    46.2 +++ b/make/java/security/Makefile	Fri Jan 22 09:34:17 2010 -0800
    46.3 @@ -24,6 +24,7 @@
    46.4  #
    46.5  
    46.6  BUILDDIR = ../..
    46.7 +MODULE  = base
    46.8  PACKAGE = java.security
    46.9  PRODUCT = sun
   46.10  include $(BUILDDIR)/common/Defs.gmk
   46.11 @@ -38,11 +39,9 @@
   46.12  #
   46.13  
   46.14  PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security
   46.15 -SUNPKCS11   =
   46.16  
   46.17  ifeq ($(PLATFORM), solaris)
   46.18  PROPS_SRC   = $(TOPDIR)/src/share/lib/security/java.security-solaris
   46.19 -SUNPKCS11   = sunpkcs11
   46.20  
   46.21  else # PLATFORM
   46.22  
   46.23 @@ -57,9 +56,6 @@
   46.24  
   46.25  PROPS_BUILD = $(LIBDIR)/security/java.security
   46.26  
   46.27 -SUNPKCS11_SRC   = $(TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
   46.28 -SUNPKCS11_BUILD = $(LIBDIR)/security/sunpkcs11-solaris.cfg
   46.29 -
   46.30  POLICY_SRC =	$(TOPDIR)/src/share/lib/security/java.policy
   46.31  POLICY_BUILD = $(LIBDIR)/security/java.policy
   46.32  
   46.33 @@ -73,14 +69,12 @@
   46.34  #
   46.35  include $(BUILDDIR)/common/Rules.gmk
   46.36  
   46.37 -build: properties $(SUNPKCS11) policy cacerts
   46.38 +build: properties policy cacerts
   46.39  
   46.40  install: all
   46.41  
   46.42  properties: classes  $(PROPS_BUILD)
   46.43  
   46.44 -sunpkcs11: classes $(SUNPKCS11_BUILD)
   46.45 -
   46.46  policy: classes  $(POLICY_BUILD)
   46.47  
   46.48  cacerts: classes $(CACERTS_BUILD)
   46.49 @@ -88,9 +82,6 @@
   46.50  $(PROPS_BUILD): $(PROPS_SRC)
   46.51  	$(install-file)
   46.52  
   46.53 -$(SUNPKCS11_BUILD): $(SUNPKCS11_SRC)
   46.54 -	$(install-file)
   46.55 -
   46.56  $(POLICY_BUILD): $(POLICY_SRC)
   46.57  	$(install-file)
   46.58  
   46.59 @@ -99,7 +90,7 @@
   46.60  
   46.61  clean clobber:: .delete.classlist
   46.62  	$(RM) -r $(CLASSBINDIR)/java/security
   46.63 -	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(SUNPKCS11_BUILD)
   46.64 +	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD)
   46.65  
   46.66  # Additional Rule for building sun.security.util
   46.67  $(CLASSBINDIR)/%.class: $(SHARE_SRC)/sun/%.java
    47.1 --- a/make/java/sql/Makefile	Thu Jan 21 11:12:37 2010 -0800
    47.2 +++ b/make/java/sql/Makefile	Fri Jan 22 09:34:17 2010 -0800
    47.3 @@ -28,6 +28,7 @@
    47.4  #
    47.5  
    47.6  BUILDDIR = ../..
    47.7 +MODULE  = jdbc-base
    47.8  PACKAGE = java.sql
    47.9  PRODUCT = sun
   47.10  include $(BUILDDIR)/common/Defs.gmk
    48.1 --- a/make/java/text/Makefile	Thu Jan 21 11:12:37 2010 -0800
    48.2 +++ b/make/java/text/Makefile	Fri Jan 22 09:34:17 2010 -0800
    48.3 @@ -24,7 +24,7 @@
    48.4  #
    48.5  
    48.6  BUILDDIR = ../..
    48.7 -
    48.8 +MODULE  = base
    48.9  PACKAGE = java.text
   48.10  PRODUCT = sun
   48.11  
    49.1 --- a/make/java/verify/Makefile	Thu Jan 21 11:12:37 2010 -0800
    49.2 +++ b/make/java/verify/Makefile	Fri Jan 22 09:34:17 2010 -0800
    49.3 @@ -28,6 +28,7 @@
    49.4  #
    49.5  
    49.6  BUILDDIR = ../..
    49.7 +MODULE  = base
    49.8  PRODUCT = java
    49.9  LIBRARY = verify
   49.10  include $(BUILDDIR)/common/Defs.gmk
    50.1 --- a/make/java/zip/Makefile	Thu Jan 21 11:12:37 2010 -0800
    50.2 +++ b/make/java/zip/Makefile	Fri Jan 22 09:34:17 2010 -0800
    50.3 @@ -25,6 +25,7 @@
    50.4  
    50.5  
    50.6  BUILDDIR = ../..
    50.7 +MODULE  = base
    50.8  PACKAGE = java.util.zip
    50.9  LIBRARY = zip
   50.10  PRODUCT = sun
    51.1 --- a/make/javax/crypto/Makefile	Thu Jan 21 11:12:37 2010 -0800
    51.2 +++ b/make/javax/crypto/Makefile	Fri Jan 22 09:34:17 2010 -0800
    51.3 @@ -108,6 +108,7 @@
    51.4  #
    51.5  
    51.6  BUILDDIR = ../..
    51.7 +MODULE  = base
    51.8  PACKAGE = javax.crypto
    51.9  PRODUCT = sun
   51.10  
   51.11 @@ -293,7 +294,7 @@
   51.12  
   51.13  $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
   51.14  	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
   51.15 -	$(install-file)
   51.16 +	$(install-non-module-file)
   51.17  
   51.18  $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
   51.19  	    policy/limited/default_local.policy				\
   51.20 @@ -414,7 +415,7 @@
   51.21  else
   51.22  $(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
   51.23  endif
   51.24 -	$(install-file)
   51.25 +	$(install-non-module-file)
   51.26  
   51.27  #
   51.28  # Install the appropriate policy file, depending on the type of build.
   51.29 @@ -425,7 +426,7 @@
   51.30  INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
   51.31  endif
   51.32  
   51.33 -install-limited: \
   51.34 +install-limited-jars: \
   51.35  	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
   51.36  	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
   51.37  	$(MKDIR) -p $(POLICY_DESTDIR)
   51.38 @@ -433,24 +434,28 @@
   51.39  	    $(POLICY_DESTDIR)/US_export_policy.jar		\
   51.40  	    $(POLICY_DESTDIR)/local_policy.jar
   51.41  	$(CP) $^ $(POLICY_DESTDIR)
   51.42 +
   51.43 +install-limited: install-limited-jars install-module-files
   51.44  ifndef OPENJDK
   51.45  	$(release-warning)
   51.46  endif
   51.47  
   51.48 -install-unlimited: \
   51.49 +install-unlimited-jars: \
   51.50  	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
   51.51 -	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar
   51.52 +	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar 
   51.53  	$(MKDIR) -p $(POLICY_DESTDIR)
   51.54  	$(RM) \
   51.55  	    $(POLICY_DESTDIR)/US_export_policy.jar		\
   51.56  	    $(POLICY_DESTDIR)/local_policy.jar
   51.57  	$(CP) $^ $(POLICY_DESTDIR)
   51.58 +
   51.59 +install-unlimited: install-unlimited-jars install-module-files
   51.60  ifndef OPENJDK
   51.61  	$(release-warning)
   51.62  endif
   51.63  
   51.64  ifndef OPENJDK
   51.65 -install-prebuilt:
   51.66 +install-prebuilt-jars:
   51.67  	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
   51.68  	$(RM) $(JAR_DESTFILE) \
   51.69  	    $(POLICY_DESTDIR)/US_export_policy.jar \
   51.70 @@ -460,8 +465,16 @@
   51.71  	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
   51.72  	    $(PREBUILT_DIR)/jce/local_policy.jar \
   51.73  	    $(POLICY_DESTDIR)
   51.74 +
   51.75 +install-prebuilt: install-prebuilt-jars install-module-files
   51.76  endif
   51.77  
   51.78 +install-module-files: \
   51.79 +	   $(POLICY_DESTDIR)/US_export_policy.jar \
   51.80 +	   $(POLICY_DESTDIR)/local_policy.jar
   51.81 +
   51.82 +$(POLICY_DESTDIR)/%.jar :
   51.83 +	$(install-module-file)
   51.84  
   51.85  # =====================================================
   51.86  # Support routines.
    52.1 --- a/make/javax/imageio/Makefile	Thu Jan 21 11:12:37 2010 -0800
    52.2 +++ b/make/javax/imageio/Makefile	Fri Jan 22 09:34:17 2010 -0800
    52.3 @@ -28,6 +28,7 @@
    52.4  #
    52.5  
    52.6  BUILDDIR = ../..
    52.7 +MODULE  = imageio
    52.8  PACKAGE = javax.imageio
    52.9  PRODUCT = jiio
   52.10  include $(BUILDDIR)/common/Defs.gmk
    53.1 --- a/make/javax/print/Makefile	Thu Jan 21 11:12:37 2010 -0800
    53.2 +++ b/make/javax/print/Makefile	Fri Jan 22 09:34:17 2010 -0800
    53.3 @@ -28,6 +28,7 @@
    53.4  #
    53.5  
    53.6  BUILDDIR = ../..
    53.7 +MODULE  = print
    53.8  PACKAGE = javax.print
    53.9  PRODUCT = sun
   53.10  include $(BUILDDIR)/common/Defs.gmk
    54.1 --- a/make/javax/sound/Makefile	Thu Jan 21 11:12:37 2010 -0800
    54.2 +++ b/make/javax/sound/Makefile	Fri Jan 22 09:34:17 2010 -0800
    54.3 @@ -26,6 +26,7 @@
    54.4  # WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
    54.5  
    54.6  BUILDDIR = ../..
    54.7 +MODULE  = sound
    54.8  PACKAGE = javax.sound
    54.9  LIBRARY = jsound
   54.10  PRODUCT = sun
    55.1 --- a/make/javax/sound/jsoundalsa/Makefile	Thu Jan 21 11:12:37 2010 -0800
    55.2 +++ b/make/javax/sound/jsoundalsa/Makefile	Fri Jan 22 09:34:17 2010 -0800
    55.3 @@ -24,6 +24,7 @@
    55.4  #
    55.5  
    55.6  BUILDDIR = ../../..
    55.7 +MODULE  = sound
    55.8  PACKAGE = javax.sound
    55.9  LIBRARY = jsoundalsa
   55.10  PRODUCT = sun
    56.1 --- a/make/javax/sound/jsoundds/Makefile	Thu Jan 21 11:12:37 2010 -0800
    56.2 +++ b/make/javax/sound/jsoundds/Makefile	Fri Jan 22 09:34:17 2010 -0800
    56.3 @@ -24,6 +24,7 @@
    56.4  #
    56.5  
    56.6  BUILDDIR = ../../..
    56.7 +MODULE  = sound
    56.8  PACKAGE = javax.sound
    56.9  LIBRARY = jsoundds
   56.10  PRODUCT = sun
    57.1 --- a/make/javax/sql/Makefile	Thu Jan 21 11:12:37 2010 -0800
    57.2 +++ b/make/javax/sql/Makefile	Fri Jan 22 09:34:17 2010 -0800
    57.3 @@ -28,6 +28,7 @@
    57.4  #
    57.5  
    57.6  BUILDDIR = ../..
    57.7 +MODULE  = jdbc-enterprise
    57.8  PACKAGE = javax.sql
    57.9  PRODUCT = sun
   57.10  include $(BUILDDIR)/common/Defs.gmk
    58.1 --- a/make/javax/swing/Makefile	Thu Jan 21 11:12:37 2010 -0800
    58.2 +++ b/make/javax/swing/Makefile	Fri Jan 22 09:34:17 2010 -0800
    58.3 @@ -24,6 +24,7 @@
    58.4  #
    58.5  
    58.6  BUILDDIR  = ../..
    58.7 +MODULE    = swing
    58.8  PACKAGE   = javax.swing
    58.9  PRODUCT   = com
   58.10  SWING_SRC = $(SHARE_SRC)/classes/javax/swing
    59.1 --- a/make/javax/swing/plaf/Makefile	Thu Jan 21 11:12:37 2010 -0800
    59.2 +++ b/make/javax/swing/plaf/Makefile	Fri Jan 22 09:34:17 2010 -0800
    59.3 @@ -24,6 +24,7 @@
    59.4  #
    59.5  
    59.6  BUILDDIR  = ../../..
    59.7 +MODULE    = swing
    59.8  PACKAGE   = javax.swing.plaf
    59.9  PRODUCT   = com
   59.10  SWING_SRC = $(SHARE_SRC)/classes/javax/swing
    60.1 --- a/make/jpda/back/Makefile	Thu Jan 21 11:12:37 2010 -0800
    60.2 +++ b/make/jpda/back/Makefile	Fri Jan 22 09:34:17 2010 -0800
    60.3 @@ -28,6 +28,7 @@
    60.4  #
    60.5  
    60.6  BUILDDIR = ../..
    60.7 +MODULE  = debugging
    60.8  LIBRARY = jdwp
    60.9  PRODUCT = jpda
   60.10  
    61.1 --- a/make/jpda/transport/Makefile	Thu Jan 21 11:12:37 2010 -0800
    61.2 +++ b/make/jpda/transport/Makefile	Fri Jan 22 09:34:17 2010 -0800
    61.3 @@ -28,6 +28,7 @@
    61.4  #
    61.5  
    61.6  BUILDDIR = ../..
    61.7 +MODULE  = debugging
    61.8  PRODUCT = jpda
    61.9  include $(BUILDDIR)/common/Defs.gmk
   61.10  
    62.1 --- a/make/jpda/transport/shmem/Makefile	Thu Jan 21 11:12:37 2010 -0800
    62.2 +++ b/make/jpda/transport/shmem/Makefile	Fri Jan 22 09:34:17 2010 -0800
    62.3 @@ -28,6 +28,7 @@
    62.4  #
    62.5  
    62.6  BUILDDIR = ../../..
    62.7 +MODULE   = debugging
    62.8  LIBRARY  = dt_shmem
    62.9  PRODUCT = jbug
   62.10  
    63.1 --- a/make/jpda/transport/socket/Makefile	Thu Jan 21 11:12:37 2010 -0800
    63.2 +++ b/make/jpda/transport/socket/Makefile	Fri Jan 22 09:34:17 2010 -0800
    63.3 @@ -28,6 +28,7 @@
    63.4  #
    63.5  
    63.6  BUILDDIR = ../../..
    63.7 +MODULE  = debugging
    63.8  LIBRARY = dt_socket
    63.9  PRODUCT = jbug
   63.10  
    64.1 --- a/make/jpda/tty/Makefile	Thu Jan 21 11:12:37 2010 -0800
    64.2 +++ b/make/jpda/tty/Makefile	Fri Jan 22 09:34:17 2010 -0800
    64.3 @@ -28,6 +28,7 @@
    64.4  #
    64.5  
    64.6  BUILDDIR = ../..
    64.7 +MODULE  = jdb
    64.8  PACKAGE = com.sun.tools.example.debug.tty
    64.9  PRODUCT = jpda
   64.10  PROGRAM = jdb
    65.1 --- a/make/launchers/Makefile	Thu Jan 21 11:12:37 2010 -0800
    65.2 +++ b/make/launchers/Makefile	Fri Jan 22 09:34:17 2010 -0800
    65.3 @@ -28,33 +28,23 @@
    65.4  #
    65.5  
    65.6  BUILDDIR = ..
    65.7 +MODULE  = tools
    65.8  PACKAGE = launchers
    65.9  PRODUCT = sun
   65.10  include $(BUILDDIR)/common/Defs.gmk
   65.11  
   65.12 -# Run MAKE $@ for a launcher: 
   65.13 +# Run MAKE $@ for a launcher for the corba module:
   65.14  #   $(call make-launcher, name, mainclass, java-args, main-args)
   65.15 -define make-launcher
   65.16 +define make-corba-launcher
   65.17 +$(CD) $(BUILDDIR)/launchers && \
   65.18  $(MAKE) -f Makefile.launcher \
   65.19 -	PROGRAM=$(strip $1) \
   65.20 -	MAIN_CLASS=$(strip $2) \
   65.21 -	MAIN_JAVA_ARGS="$(strip $3)" \
   65.22 -	MAIN_ARGS="$(strip $4)" $@
   65.23 +        MODULE=corba \
   65.24 +        PROGRAM=$(strip $1) \
   65.25 +        MAIN_CLASS=$(strip $2) \
   65.26 +        MAIN_JAVA_ARGS="$(strip $3)" \
   65.27 +        MAIN_ARGS="$(strip $4)"
   65.28  endef
   65.29  
   65.30 -# Run MAKE $@ for all launchers
   65.31 -ifeq ($(PLATFORM),windows)
   65.32 -# Run MAKE $@ for all platform specific launchers
   65.33 -define make-platform-specific-launchers
   65.34 -$(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , )
   65.35 -$(call make-launcher, klist, sun.security.krb5.internal.tools.Klist, , )
   65.36 -$(call make-launcher, ktab, sun.security.krb5.internal.tools.Ktab, , )
   65.37 -endef
   65.38 -else
   65.39 -# Run MAKE $@ for all platform specific launchers
   65.40 -define make-platform-specific-launchers
   65.41 -endef
   65.42 -endif
   65.43  # Run MAKE $@ for all generic launchers
   65.44  define make-all-launchers
   65.45  $(call make-launcher, appletviewer, sun.applet.Main, , )
   65.46 @@ -85,36 +75,29 @@
   65.47    -J-Dsun.jvm.hotspot.debugger.useWindbgDebugger, )
   65.48  $(call make-launcher, jstat, sun.tools.jstat.Jstat, , )
   65.49  $(call make-launcher, jstatd, sun.tools.jstatd.Jstatd, , )
   65.50 -$(call make-launcher, keytool, sun.security.tools.KeyTool, , )
   65.51  $(call make-launcher, native2ascii, sun.tools.native2ascii.Main, , )
   65.52 -$(call make-launcher, orbd, com.sun.corba.se.impl.activation.ORBD, \
   65.53 +$(call make-launcher, rmic, sun.rmi.rmic.Main, , )
   65.54 +$(call make-launcher, schemagen, com.sun.tools.internal.jxc.SchemaGenerator, , )
   65.55 +$(call make-launcher, serialver, sun.tools.serialver.SerialVer, , )
   65.56 +$(call make-launcher, xjc, com.sun.tools.internal.xjc.Driver, , )
   65.57 +$(call make-launcher, wsgen, com.sun.tools.internal.ws.WsGen, , )
   65.58 +$(call make-launcher, wsimport, com.sun.tools.internal.ws.WsImport, , )
   65.59 +$(call make-corba-launcher, orbd, com.sun.corba.se.impl.activation.ORBD, \
   65.60    -J-Dcom.sun.CORBA.activation.DbDir=./orb.db \
   65.61    -J-Dcom.sun.CORBA.activation.Port=1049 \
   65.62    -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
   65.63 -$(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
   65.64 -$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
   65.65 -$(call make-launcher, rmic, sun.rmi.rmic.Main, , )
   65.66 -$(call make-launcher, rmid, sun.rmi.server.Activation, , )
   65.67 -$(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
   65.68 -$(call make-launcher, schemagen, com.sun.tools.internal.jxc.SchemaGenerator, , )
   65.69 -$(call make-launcher, serialver, sun.tools.serialver.SerialVer, , )
   65.70 -$(call make-launcher, servertool, com.sun.corba.se.impl.activation.ServerTool, , )
   65.71 -$(call make-launcher, tnameserv, com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
   65.72 +$(call make-corba-launcher, servertool, com.sun.corba.se.impl.activation.ServerTool, , )
   65.73 +$(call make-corba-launcher, tnameserv, com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
   65.74    -J-Dcom.sun.CORBA.activation.DbDir=./orb.db \
   65.75    -J-Djava.util.logging.LoggingPermission=contol \
   65.76    -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
   65.77 -$(call make-launcher, wsgen, com.sun.tools.internal.ws.WsGen, , )
   65.78 -$(call make-launcher, wsimport, com.sun.tools.internal.ws.WsImport, , )
   65.79 -$(call make-launcher, xjc, com.sun.tools.internal.xjc.Driver, , )
   65.80  endef
   65.81  
   65.82  build:
   65.83  	$(make-all-launchers)
   65.84 -	$(make-platform-specific-launchers)
   65.85  
   65.86  clean clobber::
   65.87  	$(make-all-launchers)
   65.88 -	$(make-platform-specific-launchers)
   65.89  
   65.90  include $(BUILDDIR)/common/Rules.gmk
   65.91  
    66.1 --- a/make/mkdemo/jvmti/Makefile	Thu Jan 21 11:12:37 2010 -0800
    66.2 +++ b/make/mkdemo/jvmti/Makefile	Fri Jan 22 09:34:17 2010 -0800
    66.3 @@ -28,6 +28,7 @@
    66.4  #
    66.5  
    66.6  BUILDDIR = ../..
    66.7 +MODULE  = demos
    66.8  PRODUCT = demos
    66.9  include $(BUILDDIR)/common/Defs.gmk
   66.10  
    67.1 --- a/make/mkdemo/management/Makefile	Thu Jan 21 11:12:37 2010 -0800
    67.2 +++ b/make/mkdemo/management/Makefile	Fri Jan 22 09:34:17 2010 -0800
    67.3 @@ -28,6 +28,7 @@
    67.4  #
    67.5  
    67.6  BUILDDIR = ../..
    67.7 +MODULE  = demos
    67.8  PRODUCT = demos
    67.9  include $(BUILDDIR)/common/Defs.gmk
   67.10  
    68.1 --- a/make/mksample/dtrace/Makefile	Thu Jan 21 11:12:37 2010 -0800
    68.2 +++ b/make/mksample/dtrace/Makefile	Fri Jan 22 09:34:17 2010 -0800
    68.3 @@ -29,6 +29,7 @@
    68.4  
    68.5  BUILDDIR = ../..
    68.6  
    68.7 +MODULE  = samples
    68.8  PRODUCT = java
    68.9  
   68.10  include $(BUILDDIR)/common/Defs.gmk
    69.1 --- a/make/mksample/jmx/jmx-scandir/Makefile	Thu Jan 21 11:12:37 2010 -0800
    69.2 +++ b/make/mksample/jmx/jmx-scandir/Makefile	Fri Jan 22 09:34:17 2010 -0800
    69.3 @@ -29,6 +29,7 @@
    69.4  
    69.5  BUILDDIR = ../../..
    69.6  
    69.7 +MODULE  = samples
    69.8  PRODUCT = java
    69.9  
   69.10  include $(BUILDDIR)/common/Defs.gmk
    70.1 --- a/make/mksample/nbproject/Makefile	Thu Jan 21 11:12:37 2010 -0800
    70.2 +++ b/make/mksample/nbproject/Makefile	Fri Jan 22 09:34:17 2010 -0800
    70.3 @@ -29,6 +29,7 @@
    70.4  
    70.5  BUILDDIR = ../..
    70.6  
    70.7 +MODULE  = samples
    70.8  PRODUCT = java
    70.9  
   70.10  include $(BUILDDIR)/common/Defs.gmk
    71.1 --- a/make/mksample/nio/file/Makefile	Thu Jan 21 11:12:37 2010 -0800
    71.2 +++ b/make/mksample/nio/file/Makefile	Fri Jan 22 09:34:17 2010 -0800
    71.3 @@ -29,6 +29,7 @@
    71.4  
    71.5  BUILDDIR = ../../..
    71.6  
    71.7 +MODULE  = samples
    71.8  PRODUCT = java
    71.9  
   71.10  include $(BUILDDIR)/common/Defs.gmk
    72.1 --- a/make/mksample/nio/multicast/Makefile	Thu Jan 21 11:12:37 2010 -0800
    72.2 +++ b/make/mksample/nio/multicast/Makefile	Fri Jan 22 09:34:17 2010 -0800
    72.3 @@ -29,6 +29,7 @@
    72.4  
    72.5  BUILDDIR = ../../..
    72.6  
    72.7 +MODULE  = samples
    72.8  PRODUCT = java
    72.9  
   72.10  include $(BUILDDIR)/common/Defs.gmk
    73.1 --- a/make/mksample/nio/server/Makefile	Thu Jan 21 11:12:37 2010 -0800
    73.2 +++ b/make/mksample/nio/server/Makefile	Fri Jan 22 09:34:17 2010 -0800
    73.3 @@ -29,6 +29,7 @@
    73.4  
    73.5  BUILDDIR = ../../..
    73.6  
    73.7 +MODULE  = samples
    73.8  PRODUCT = java
    73.9  
   73.10  include $(BUILDDIR)/common/Defs.gmk
    74.1 --- a/make/mksample/scripting/scriptpad/Makefile	Thu Jan 21 11:12:37 2010 -0800
    74.2 +++ b/make/mksample/scripting/scriptpad/Makefile	Fri Jan 22 09:34:17 2010 -0800
    74.3 @@ -29,6 +29,7 @@
    74.4  
    74.5  BUILDDIR = ../../..
    74.6  
    74.7 +MODULE  = samples
    74.8  PRODUCT = java
    74.9  
   74.10  include $(BUILDDIR)/common/Defs.gmk
    75.1 --- a/make/mksample/webservices/EbayClient/Makefile	Thu Jan 21 11:12:37 2010 -0800
    75.2 +++ b/make/mksample/webservices/EbayClient/Makefile	Fri Jan 22 09:34:17 2010 -0800
    75.3 @@ -29,6 +29,7 @@
    75.4  
    75.5  BUILDDIR = ../../..
    75.6  
    75.7 +MODULE  = samples
    75.8  PRODUCT = java
    75.9  
   75.10  include $(BUILDDIR)/common/Defs.gmk
    76.1 --- a/make/mksample/webservices/EbayServer/Makefile	Thu Jan 21 11:12:37 2010 -0800
    76.2 +++ b/make/mksample/webservices/EbayServer/Makefile	Fri Jan 22 09:34:17 2010 -0800
    76.3 @@ -29,6 +29,7 @@
    76.4  
    76.5  BUILDDIR = ../../..
    76.6  
    76.7 +MODULE  = samples
    76.8  PRODUCT = java
    76.9  
   76.10  include $(BUILDDIR)/common/Defs.gmk
    77.1 --- a/make/modules/Makefile	Thu Jan 21 11:12:37 2010 -0800
    77.2 +++ b/make/modules/Makefile	Fri Jan 22 09:34:17 2010 -0800
    77.3 @@ -23,115 +23,106 @@
    77.4  # have any questions.
    77.5  #
    77.6  
    77.7 -#
    77.8 -# Modularizing the JDK
    77.9 -#
   77.10 -
   77.11  BUILDDIR = ..
   77.12  include $(BUILDDIR)/common/Defs.gmk
   77.13  
   77.14 -CLASSANALYZER_JAR=$(BUILDTOOLJARDIR)/classanalyzer.jar
   77.15 -JAVA_FLAGS=$(JAVA_TOOLS_FLAGS) -Xbootclasspath:$(CLASSBINDIR)
   77.16 +#
   77.17 +# Modularizing the JDK
   77.18 +# - Post jdk build process until the source tree is restructured
   77.19 +#   for modules build
   77.20 +# - <outputdir>/modules/<module> will be created for each module.
   77.21 +#
   77.22 +# Steps:
   77.23 +# 0. During jdk build before this makefile is invoked, classes, 
   77.24 +#    resource files, and other non-class files such as native libraries,
   77.25 +#    properties file, images, etc are created.
   77.26 +#
   77.27 +#    Non-class files are copied to <outputdir>/tmp/modules/<MODULE>
   77.28 +#    directory in this step to prepare for the post-build modularization. 
   77.29 +#
   77.30 +#    The MODULE variable defined in other makefiles specifies 
   77.31 +#    the lowest-level module that the non-class files belong to.
   77.32 +#    The name might or might not be the same as the name of the modules 
   77.33 +#    in the resulting <outputdir>/modules directory.
   77.34 +#    
   77.35 +# 1. Unpack all jars in the <builddir>/lib directory to a temporary 
   77.36 +#    location (<outputdir>/tmp/modules/classes) to prepare for modules
   77.37 +#    creation.
   77.38 +#
   77.39 +# 2. Run ClassAnalyzer tool to analyze all jdk classes and generate
   77.40 +#    class list for all modules and also perform dependency analysis. 
   77.41 +#
   77.42 +#    Input configuration files :-
   77.43 +#
   77.44 +#    modules.config : defines the low-level modules and specifies 
   77.45 +#       what classes and resource files each module includes.
   77.46 +#    modules.group  : defines the module groups and its members.
   77.47 +#    jdk7.depconfig : lists the dynamic dependencies including
   77.48 +#       use of reflection Class.forName and JNI FindClass and
   77.49 +#       service provider.
   77.50 +#    optional.depconfig : lists the optional dependencies
   77.51 +#
   77.52 +# 3. Create one directory for each module (<outputdir>/modules/<module>)
   77.53 +#    based on the output files from (2).
   77.54 +#       
   77.55 +#    modules.list lists the modules to be created for the modules
   77.56 +#    build and its members. For each module (m) in modules.list,
   77.57 +#    a. create $m/lib/$m.jar with all classes and resource files
   77.58 +#       listed in $m.classlist and $m.resources respectively.
   77.59 +#    b. copy all non-class files from its members to 
   77.60 +#       <outputdir>/modules/$m.
   77.61  
   77.62 -MODULE_LIB = $(ABS_OUTPUTDIR)/modules
   77.63 +
   77.64  MAINMANIFEST=$(JDK_TOPDIR)/make/tools/manifest.mf
   77.65  MODULE_JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
   77.66  
   77.67 -TMP=$(ABS_TEMPDIR)/modules
   77.68 -MODULE_CLASSLIST = $(TMP)/classlist
   77.69 -MODULE_CLASSES = $(TMP)/classes
   77.70 -MODULE_LIST = $(MODULE_CLASSLIST)/modules.list
   77.71 -
   77.72 -# Modules in the modules/ext directory
   77.73 -EXT_MODULES = localedata security-sunec security-sunjce
   77.74 -
   77.75 -# Build PKCS#11 on all platforms except 64-bit Windows.
   77.76 -# We exclude windows-amd64 because we don't have any
   77.77 -# 64-bit PKCS#11 implementations to test with on that platform.
   77.78 -PKCS11 = security-sunpkcs11
   77.79 -ifeq ($(ARCH_DATA_MODEL), 64)
   77.80 -  ifeq ($(PLATFORM), windows)
   77.81 -    PKCS11 =
   77.82 -  endif
   77.83 -endif
   77.84 -
   77.85 -EXT_MODULES += $(PKCS11)
   77.86 -
   77.87 -# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
   77.88 -ifeq ($(PLATFORM), windows)
   77.89 -  ifneq ($(ARCH_DATA_MODEL), 64)
   77.90 -    EXT_MODULES += security-sunmscapi
   77.91 -  endif
   77.92 -endif
   77.93 -
   77.94 -
   77.95 -JDK_MODULES = tools
   77.96 -
   77.97 -SUBDIRS = tools
   77.98 -all build clean clobber::
   77.99 -	$(SUBDIRS-loop)
  77.100 +TMP = $(ABS_MODULES_TEMPDIR)
  77.101 +MODULE_CLASSLIST = $(ABS_MODULES_TEMPDIR)/classlist
  77.102 +MODULE_CLASSES = $(ABS_MODULES_TEMPDIR)/classes
  77.103 +MODULES_LIST = $(MODULE_CLASSLIST)/modules.list
  77.104  
  77.105  all:: unpack-jars gen-classlist modularize
  77.106  
  77.107 -$(CLASSANALYZER_JAR):
  77.108 -	$(CD) tools && $(MAKE) all
  77.109 -
  77.110 -JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -depth) 
  77.111 +JAR_LIST := $(shell $(FIND) $(ABS_OUTPUTDIR)/lib -name \*.jar -print) 
  77.112  unpack-jars:
  77.113 +	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
  77.114  	$(RM) -rf $(MODULE_CLASSES)
  77.115  	$(MKDIR) -p $(MODULE_CLASSES)
  77.116  	$(CP) -rf $(CLASSBINDIR)/* $(MODULE_CLASSES)
  77.117 -	for jf in  $(JAR_LIST) ; do \
  77.118 +	@for jf in  $(JAR_LIST) ; do \
  77.119  	   $(CD) $(MODULE_CLASSES) && $(BOOT_JAR_CMD) xf $$jf $(BOOT_JAR_JFLAGS);\
  77.120  	done
  77.121 +	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
  77.122  
  77.123 -gen-classlist: $(CLASSANALYZER_JAR)
  77.124 -	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
  77.125 -	@$(RM) -rf $(MODULE_CLASSLIST)
  77.126 -	@$(MKDIR) -p $(MODULE_CLASSLIST)
  77.127 -
  77.128 -	@# Use java in the default tool directory.
  77.129 -	@# OUTPUTDIR for solaris 64-bit doesn't have the tools.
  77.130 -	$(JAVA_TOOLS_DIR)/java $(JAVA_FLAGS) \
  77.131 -		-Dclassanalyzer.debug \
  77.132 -		-jar $(CLASSANALYZER_JAR) \
  77.133 -		-jdkhome $(OUTPUTDIR) \
  77.134 -	        -config modules.config \
  77.135 -	        -config modules.group \
  77.136 -		-depconfig jdk7.depconfig \
  77.137 -		-depconfig optional.depconfig \
  77.138 -		-showdynamic \
  77.139 -		-output $(MODULE_CLASSLIST)
  77.140 -	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
  77.141 +gen-classlist:
  77.142 +	$(CD) tools && $(MAKE) all
  77.143  
  77.144  modularize: $(MODULE_JAR_MANIFEST_FILE)
  77.145  	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
  77.146 -	@$(RM) -rf $(MODULE_LIB)
  77.147 -	@$(MKDIR) -p $(MODULE_LIB)/lib
  77.148 -	@$(MKDIR) -p $(MODULE_LIB)/jre/lib/ext
  77.149 +	@$(RM) -rf $(MODULES_DIR)
  77.150  
  77.151 -	@# create modules
  77.152 -	for m in `$(NAWK) '{print $$1}' $(MODULE_LIST)` ; do \
  77.153 +	@# create jar file for modules and
  77.154 +	@# copy other files from all members of this module 
  77.155 +	for m in `$(NAWK) '{print $$1}' $(MODULES_LIST)` ; do \
  77.156     	   $(ECHO) "Creating module $$m" ; \
  77.157     	   $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.classlist > $(TMP)/tmp.cf ; \
  77.158  	   if [ -f $(MODULE_CLASSLIST)/$$m.resources ] ; then \
  77.159     	       $(SED) -e 's%\\%\/%g' < $(MODULE_CLASSLIST)/$$m.resources >> $(TMP)/tmp.cf ; \
  77.160             fi ; \
  77.161 +           $(MKDIR) -p $(ABS_MODULES_DIR)/$$m/lib; \
  77.162  	   $(CD) $(MODULE_CLASSES) && \
  77.163                 $(BOOT_JAR_CMD) c0mf $(MODULE_JAR_MANIFEST_FILE) \
  77.164 -		   $(MODULE_LIB)/$$m.jar \
  77.165 -		   @$(TMP)/tmp.cf \
  77.166 -                   $(BOOT_JAR_JFLAGS) ; \
  77.167 -	done
  77.168 +		   $(ABS_MODULES_DIR)/$$m/lib/$$m.jar \
  77.169 +	           @$(TMP)/tmp.cf \
  77.170 +                   $(BOOT_JAR_JFLAGS); \
  77.171 +	   for s in `$(GREP) "^$$m" $(MODULES_LIST)` ; do \
  77.172 +               if [ -d $(TMP)/$$s ] ; then \
  77.173 +               	   $(CP) -rf $(TMP)/$$s/*  $(ABS_MODULES_DIR)/$$m; \
  77.174 +		   $(RM) -rf $(ABS_MODULES_DIR)/$$m/classes; \
  77.175 +	       fi \
  77.176 +	   done \
  77.177 +        done
  77.178  	@$(CD) $(MODULE_CLASSES) && $(java-vm-cleanup)
  77.179 -	@# move modules to lib, jre/lib, or jre/lib/ext
  77.180 -	for m in $(EXT_MODULES) ; do \
  77.181 -	   $(MV) $(MODULE_LIB)/$$m.jar $(MODULE_LIB)/jre/lib/ext ; \
  77.182 -	done
  77.183 -	for m in $(JDK_MODULES) ; do \
  77.184 -	   $(MV) $(MODULE_LIB)/$$m.jar $(MODULE_LIB)/lib ; \
  77.185 -	done
  77.186 -	$(MV) $(MODULE_LIB)/*.jar $(MODULE_LIB)/jre/lib
  77.187  	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
  77.188  
  77.189  $(MODULE_JAR_MANIFEST_FILE):
  77.190 @@ -139,7 +130,5 @@
  77.191  
  77.192  clean clobber::
  77.193  	$(RM) -rf $(MODULE_CLASSLIST)
  77.194 -	$(RM) -rf $(MODULE_LIB)
  77.195 -	$(RM) -f $(MODULE_JAR_MANIFEST_FILE)
  77.196 -	$(RM) -f $(CLASSANALYZER_JAR)
  77.197 -
  77.198 +	$(RM) -rf $(MODULES_DIR)
  77.199 +	$(RM) $(MODULE_JAR_MANIFEST_FILE)
    78.1 --- a/make/modules/modules.config	Thu Jan 21 11:12:37 2010 -0800
    78.2 +++ b/make/modules/modules.config	Fri Jan 22 09:34:17 2010 -0800
    78.3 @@ -372,15 +372,19 @@
    78.4  
    78.5  /**************************************************************************/
    78.6  
    78.7 +module tracing {
    78.8 +    // tracing
    78.9 +    include com.sun.tracing.**, sun.tracing.**;
   78.10 +}
   78.11 +
   78.12  module instrument {
   78.13      // java.lang.instrument
   78.14      include java.lang.instrument.*, sun.instrument.*;
   78.15  
   78.16 -    // tracing
   78.17 -    include com.sun.tracing.**, sun.tracing.**;
   78.18 -
   78.19      // HPROF support
   78.20      include com.sun.demo.jvmti.hprof.*;
   78.21 +
   78.22 +    include tracing;
   78.23  }
   78.24  
   78.25  /**************************************************************************/
   78.26 @@ -391,15 +395,17 @@
   78.27              sun.rmi.server.InactiveGroupException;
   78.28  }
   78.29  
   78.30 +module rmic {
   78.31 +    // rmic is included in tools
   78.32 +    include sun.rmi.rmic.**;
   78.33 +}
   78.34 +
   78.35  module rmi {
   78.36      include java.rmi.**, sun.rmi.**, com.sun.rmi.**;
   78.37  
   78.38      // SSL factories are in rmi
   78.39      include javax.rmi.ssl.**;
   78.40  
   78.41 -    // rmic is in tools
   78.42 -    exclude sun.rmi.rmic.**;
   78.43 -
   78.44      // supporting classes in sun.misc and dependencies
   78.45      include sun.misc.GC;
   78.46  }
   78.47 @@ -468,9 +474,14 @@
   78.48      include javax.smartcardio.**, sun.security.smartcardio.**;
   78.49  }
   78.50  
   78.51 +module security-auth {
   78.52 +    include com.sun.security.auth.**, sun.security.util.AuthResources_*;
   78.53 +}
   78.54 +
   78.55  module security-misc {
   78.56 -    include com.sun.security.auth.**, sun.security.util.AuthResources_*,
   78.57 -            sun.security.pkcs.*,
   78.58 +    include security-auth;
   78.59 +
   78.60 +    include sun.security.pkcs.*,
   78.61              sun.security.pkcs12.*;
   78.62  
   78.63      // this class is a candidate to be removed.
   78.64 @@ -500,9 +511,8 @@
   78.65  }
   78.66  
   78.67  module jndi-dns {
   78.68 +    include net-dns;
   78.69      include com.sun.jndi.dns.**, com.sun.jndi.url.dns.**;
   78.70 -    include sun.net.dns.**;                 // to access DNS config.
   78.71 -    include sun.net.spi.nameservice.dns.**; // for DNS-only name service.
   78.72  }
   78.73  
   78.74  module jndi-cosnaming {
   78.75 @@ -677,31 +687,69 @@
   78.76  
   78.77  /**************************************************************************/
   78.78  
   78.79 +module applet {
   78.80 +    include java.applet.**,
   78.81 +            sun.applet.**;
   78.82 +}
   78.83 +
   78.84 +module awt {
   78.85 +    include java.awt.**,
   78.86 +            sun.awt.**,
   78.87 +            com.sun.awt.**;
   78.88 +}
   78.89 +
   78.90 +module font {
   78.91 +    include sun.font.**;
   78.92 +}
   78.93 +
   78.94 +module imageio {
   78.95 +    include javax.imageio.**,
   78.96 +            com.sun.imageio.**;
   78.97 +}
   78.98 +
   78.99 +module java2d {
  78.100 +    include sun.dc.**,
  78.101 +            sun.java2d.**,
  78.102 +            com.sun.image.**;
  78.103 +}
  78.104 +
  78.105 +module media {
  78.106 +    include com.sun.media.**;
  78.107 +}
  78.108 +
  78.109 +module print {
  78.110 +    include javax.print.**,
  78.111 +            sun.print.**;
  78.112 +}
  78.113 +
  78.114 +module sound {
  78.115 +    include javax.sound.**;
  78.116 +}
  78.117 +
  78.118 +module swing {
  78.119 +    include javax.swing.**,
  78.120 +            sun.swing.**,
  78.121 +            // sajdi also contains classes in subpackages of com.sun.java.swing;
  78.122 +            // so use '*' instead of '**' 
  78.123 +            com.sun.java.swing.*,
  78.124 +            com.sun.java.swing.plaf.**,
  78.125 +            com.sun.swing.**;
  78.126 +}
  78.127 +
  78.128  module client {
  78.129 -    include java.applet.**,
  78.130 -            java.awt.**,
  78.131 -            javax.accessibility.*,
  78.132 -            javax.imageio.**,
  78.133 -            javax.print.**,
  78.134 -            javax.sound.**,
  78.135 -            javax.swing.**,
  78.136 -            sun.applet.**,
  78.137 +    include applet,
  78.138 +            awt,
  78.139 +            font,
  78.140 +            imageio,
  78.141 +            java2d,
  78.142 +            media,
  78.143 +            print,
  78.144 +            sound,
  78.145 +            swing;
  78.146 +
  78.147 +    include javax.accessibility.*,
  78.148              sun.audio.**,
  78.149 -            sun.awt.**,
  78.150 -            sun.dc.**,
  78.151 -            sun.font.**,
  78.152 -            sun.java2d.**,
  78.153 -            sun.print.**,
  78.154 -            sun.swing.**,
  78.155 -            com.sun.accessibility.**,
  78.156 -            com.sun.awt.**,
  78.157 -            com.sun.image.**,
  78.158 -            com.sun.imageio.**,
  78.159 -            com.sun.java.swing.*,       // sajdi also contains classes in a subpackage;
  78.160 -                                        // so use '*' instead of '**' 
  78.161 -            com.sun.java.swing.plaf.**,
  78.162 -            com.sun.media.**,
  78.163 -            com.sun.swing.**;
  78.164 +            com.sun.accessibility.**;
  78.165  
  78.166      // Bidi class in client module for now
  78.167      include java.text.Bidi, sun.text.bidi.*;
  78.168 @@ -723,7 +771,13 @@
  78.169  
  78.170  /**************************************************************************/
  78.171  
  78.172 +module jkernel {
  78.173 +    include sun.jkernel.*;
  78.174 +}
  78.175 +
  78.176  module deploy {
  78.177 +    include jkernel;
  78.178 +
  78.179      // For now, all plugin and JNLP
  78.180      include com.sun.java.browser.**,
  78.181              netscape.**,
  78.182 @@ -732,8 +786,7 @@
  78.183              com.sun.deploy.**,
  78.184              com.sun.javaws.**,
  78.185              javax.jnlp.*,
  78.186 -            com.sun.jnlp.*,
  78.187 -            sun.jkernel.*;
  78.188 +            com.sun.jnlp.*;
  78.189  
  78.190      // Hook for http authentication
  78.191      include sun.net.www.protocol.http.AuthCacheBridge;
  78.192 @@ -741,6 +794,11 @@
  78.193  
  78.194  /**************************************************************************/
  78.195  
  78.196 +module net-dns {
  78.197 +    include sun.net.dns.**;                 // to access DNS config.
  78.198 +    include sun.net.spi.nameservice.dns.**; // for DNS-only name service.
  78.199 +}
  78.200 +
  78.201  module net-compat {
  78.202      // NTLM authentication support
  78.203      include sun.net.www.protocol.http.ntlm.*;
  78.204 @@ -824,6 +882,7 @@
  78.205              debugging,
  78.206              jaxws-tools,
  78.207              jdb,
  78.208 +            rmic,
  78.209              sajdi;
  78.210  
  78.211      // include gui-tools in tools module unless the tool binaries
  78.212 @@ -834,8 +893,7 @@
  78.213              com.sun.jarsigner.**,
  78.214              com.sun.javac.**,
  78.215              com.sun.javadoc.**, com.sun.source.**,
  78.216 -            sun.jvmstat.**,
  78.217 -            sun.rmi.rmic.**;
  78.218 +            sun.jvmstat.**;
  78.219  }
  78.220  
  78.221  /**************************************************************************/
  78.222 @@ -853,6 +911,19 @@
  78.223  
  78.224  /**************************************************************************/
  78.225  
  78.226 +// Workaround for US export and local policy files 
  78.227 +// They are currently in signed jars under the jre/lib/security directory
  78.228 +module US_export_policy {
  78.229 +    include default_US_export.policy;
  78.230 +}
  78.231 +
  78.232 +module local_policy {
  78.233 +    include default_local.policy,
  78.234 +            exempt_local.policy;
  78.235 +}
  78.236 +
  78.237 +/**************************************************************************/
  78.238 +
  78.239  module other {
  78.240      include **;
  78.241  }
    79.1 --- a/make/modules/optional.depconfig	Thu Jan 21 11:12:37 2010 -0800
    79.2 +++ b/make/modules/optional.depconfig	Fri Jan 22 09:34:17 2010 -0800
    79.3 @@ -1,3 +1,28 @@
    79.4 +#
    79.5 +# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    79.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    79.7 +#
    79.8 +# This code is free software; you can redistribute it and/or modify it
    79.9 +# under the terms of the GNU General Public License version 2 only, as
   79.10 +# published by the Free Software Foundation.  Sun designates this
   79.11 +# particular file as subject to the "Classpath" exception as provided
   79.12 +# by Sun in the LICENSE file that accompanied this code.
   79.13 +#
   79.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
   79.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   79.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   79.17 +# version 2 for more details (a copy is included in the LICENSE file that
   79.18 +# accompanied this code).
   79.19 +#
   79.20 +# You should have received a copy of the GNU General Public License version
   79.21 +# 2 along with this work; if not, write to the Free Software Foundation,
   79.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   79.23 +#
   79.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   79.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
   79.26 +# have any questions.
   79.27 +#
   79.28 +
   79.29  # public final java.nio.channels.SocketChannel getChannel()
   79.30  @Optional
   79.31    sun.security.ssl.BaseSSLSocketImpl -> java.nio.channels.SocketChannel
    80.1 --- a/make/modules/tools/Makefile	Thu Jan 21 11:12:37 2010 -0800
    80.2 +++ b/make/modules/tools/Makefile	Fri Jan 22 09:34:17 2010 -0800
    80.3 @@ -28,58 +28,128 @@
    80.4  #
    80.5  
    80.6  BUILDDIR = ../..
    80.7 -PACKAGE = com.sun.classanalyzer
    80.8 -PRODUCT = tools
    80.9 -PROGRAM = classanalyzer
   80.10  include $(BUILDDIR)/common/Defs.gmk
   80.11  
   80.12 +PKGDIR = com/sun/classanalyzer
   80.13  BUILDTOOL_SOURCE_ROOT = src
   80.14  BUILDTOOL_MAIN        = $(PKGDIR)/ClassAnalyzer.java
   80.15  BUILTTOOL_MAINCLASS   = $(subst /,.,$(BUILDTOOL_MAIN:%.java=%))
   80.16  
   80.17  BUILDTOOL_MAIN_SOURCE_FILE = $(BUILDTOOL_SOURCE_ROOT)/$(BUILDTOOL_MAIN)
   80.18 -BUILDTOOL_MANIFEST_FILE    = $(BUILDTOOLCLASSDIR)/$(PROGRAM)_manifest.mf
   80.19 -BUILDTOOL_JAR_FILE         = $(BUILDTOOLJARDIR)/$(PROGRAM).jar
   80.20 +BUILDTOOL_MANIFEST_FILE    = $(BUILDTOOLCLASSDIR)/classanalyzer_manifest.mf
   80.21  
   80.22  FILES_java := $(shell $(CD) $(BUILDTOOL_SOURCE_ROOT) \
   80.23 -    && $(FIND) $(PKGDIR) $(SCM_DIRS_prune) -o -type f -print)
   80.24 +    && $(FIND) $(PKGDIR) -type f -print)
   80.25 +
   80.26  FILES_class = $(FILES_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
   80.27  
   80.28 -all build: $(BUILDTOOL_JAR_FILE) tool_info
   80.29 +CLASSANALYZER_JAR_FILE     = $(BUILDTOOLJARDIR)/classanalyzer.jar
   80.30 +
   80.31 +#
   80.32 +# ClassAnalyzer depends on the com.sun.tools.classfile API.
   80.33 +# The tool is compiled with the latest version of the classfile 
   80.34 +# library in the langtools repo to make sure that synchronized
   80.35 +# change is made if the classfile API is changed. 
   80.36 +#
   80.37 +# If langtools repo exists, build its own copy of the
   80.38 +# classfile library and use it for compile time and runtime.
   80.39 +# If not exist (the top level repo is not a forest), use 
   80.40 +# the built jdk tools that imports tools.jar from the latest
   80.41 +# promoted build.
   80.42 +#
   80.43 +# If the classfile API is changed but not yet in a promoted build,
   80.44 +# the build might fail and the tool would need the langtools repo
   80.45 +# to build in that case.
   80.46 +#
   80.47 +ifndef LANGTOOLS_TOPDIR
   80.48 +  LANGTOOLS_TOPDIR=$(JDK_TOPDIR)/../langtools
   80.49 +endif
   80.50 +
   80.51 +LANGTOOLS_TOPDIR_EXISTS := $(shell \
   80.52 +  if [ -d $(LANGTOOLS_TOPDIR) ] ; then \
   80.53 +    echo true; \
   80.54 +  else \
   80.55 +    echo false; \
   80.56 +  fi)
   80.57 +
   80.58 +CLASSFILE_SRC = $(LANGTOOLS_TOPDIR)/src/share/classes
   80.59 +CLASSFILE_PKGDIR = com/sun/tools/classfile
   80.60 +
   80.61 +ifeq ($(LANGTOOLS_TOPDIR_EXISTS), true)
   80.62 +  FILES_classfile_java := $(shell \
   80.63 +       $(CD) $(CLASSFILE_SRC) && \
   80.64 +           $(FIND) $(CLASSFILE_PKGDIR) -name '*.java' -print)
   80.65 +  FILES_classfile_class = $(FILES_classfile_java:%.java=$(BUILDTOOLCLASSDIR)/%.class)
   80.66 +  CLASSFILE_JAR_FILE = $(BUILDTOOLJARDIR)/classfile.jar
   80.67 +  BUILDTOOL_JAVAC    = $(BOOT_JAVAC_CMD) $(JAVAC_JVM_FLAGS) \
   80.68 +                          $(BOOT_JAVACFLAGS) -classpath $(CLASSFILE_JAR_FILE)
   80.69 +  BUILDTOOL_JAVA     = $(BOOT_JAVA_CMD) $(JAVA_TOOLS_FLAGS) \
   80.70 +                          -Xbootclasspath/p:$(CLASSFILE_JAR_FILE)
   80.71 +else
   80.72 +  # if langtools doesn't exist, use tools from the built jdk
   80.73 +  BUILDTOOL_JAVAC = $(BINDIR)/javac $(JAVAC_JVM_FLAGS) \
   80.74 +                       $(BOOT_JAVACFLAGS)
   80.75 +  BUILDTOOL_JAVA  = $(BINDIR)/java $(JAVA_TOOLS_FLAGS)
   80.76 +endif
   80.77 +
   80.78 +# Location of the output modules.list, <module>.classlist
   80.79 +# and other output files generated by the class analyzer tool.
   80.80 +#
   80.81 +MODULE_CLASSLIST = $(MODULES_TEMPDIR)/classlist
   80.82 +
   80.83 +all build: classanalyzer gen-classlist
   80.84 +
   80.85 +classanalyzer: $(CLASSFILE_JAR_FILE) $(CLASSANALYZER_JAR_FILE) 
   80.86 +
   80.87 +gen-classlist:
   80.88 +	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
   80.89 +	@$(RM) -rf $(MODULE_CLASSLIST)
   80.90 +	@$(MKDIR) -p $(MODULE_CLASSLIST)
   80.91 +	$(BUILDTOOL_JAVA) \
   80.92 +                -Dclassanalyzer.debug \
   80.93 +                -jar $(CLASSANALYZER_JAR_FILE) \
   80.94 +                -jdkhome $(OUTPUTDIR) \
   80.95 +                -config ../modules.config \
   80.96 +                -config ../modules.group \
   80.97 +                -depconfig ../jdk7.depconfig \
   80.98 +                -depconfig ../optional.depconfig \
   80.99 +                -showdynamic \
  80.100 +                -output $(MODULE_CLASSLIST)
  80.101 +	@$(ECHO) ">>>Finished making "$@" @ `$(DATE)` ..."
  80.102  
  80.103  $(BUILDTOOL_MANIFEST_FILE): $(BUILDTOOL_MAIN_SOURCE_FILE)
  80.104  	@$(prep-target)
  80.105  	$(ECHO) "Main-Class: $(BUILTTOOL_MAINCLASS)" > $@
  80.106  
  80.107 +$(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)/%.class : $(CLASSFILE_SRC)/$(CLASSFILE_PKGDIR)/%.java
  80.108 +	@$(prep-target)
  80.109 +	@$(BUILDTOOL_JAVAC) \
  80.110 +            -sourcepath $(CLASSFILE_SRC) \
  80.111 +            -d $(BUILDTOOLCLASSDIR) $<
  80.112 +
  80.113  $(BUILDTOOLCLASSDIR)/%.class : $(BUILDTOOL_SOURCE_ROOT)/%.java
  80.114  	@$(prep-target)
  80.115 -	$(JAVAC_CMD) \
  80.116 +	$(BUILDTOOL_JAVAC) \
  80.117              -sourcepath $(BUILDTOOL_SOURCE_ROOT) \
  80.118              -d $(BUILDTOOLCLASSDIR) $<
  80.119  
  80.120 -$(BUILDTOOL_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
  80.121 +$(CLASSANALYZER_JAR_FILE): $(BUILDTOOL_MANIFEST_FILE) $(FILES_class)
  80.122  	@$(prep-target)
  80.123 -	$(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
  80.124 -	    -C $(BUILDTOOLCLASSDIR) $(PKGDIR) \
  80.125 -	    $(BOOT_JAR_JFLAGS) || $(RM) $@
  80.126 -	$(java-vm-cleanup)
  80.127 +	$(CD) $(BUILDTOOLCLASSDIR) && \
  80.128 +	    $(BOOT_JAR_CMD) cfm $@ $(BUILDTOOL_MANIFEST_FILE) \
  80.129 +	       $(PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
  80.130 +	@$(java-vm-cleanup)
  80.131  
  80.132 -# Printing out a build tool information line
  80.133 -define printBuildToolSetting
  80.134 -if [ "$2" != "" ] ; then $(PRINTF) "%-25s %s\n" "$1:" "$2"; fi
  80.135 -endef
  80.136 -
  80.137 -# Print out the build tool information
  80.138 -tool_info:
  80.139 -	@$(ECHO) "========================================================="
  80.140 -	@$(call printBuildToolSetting,BUILDTOOL,$(PROGRAM))
  80.141 -	@$(call printBuildToolSetting,PACKAGE,$(PACKAGE))
  80.142 -	@$(call printBuildToolSetting,BUILDTOOL_SOURCE_ROOT,$(BUILDTOOL_SOURCE_ROOT))
  80.143 -	@$(call printBuildToolSetting,BUILTTOOL_MAINCLASS,$(BUILTTOOL_MAINCLASS))
  80.144 -	@$(call printBuildToolSetting,BUILDTOOL_JAR_FILE,$(BUILDTOOL_JAR_FILE))
  80.145 -	@$(ECHO) "========================================================="
  80.146 +$(BUILDTOOLJARDIR)/classfile.jar: $(FILES_classfile_class)
  80.147 +	@$(prep-target)
  80.148 +	$(CD) $(BUILDTOOLCLASSDIR) && \
  80.149 +	    $(BOOT_JAR_CMD) cf $@ \
  80.150 +	        $(CLASSFILE_PKGDIR) $(BOOT_JAR_JFLAGS) || $(RM) $@
  80.151 +	@$(java-vm-cleanup)
  80.152  
  80.153  clean clobber::
  80.154  	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(PKGDIR)
  80.155 +	@$(RM) -rf $(BUILDTOOLCLASSDIR)/$(CLASSFILE_PKGDIR)
  80.156  	@$(RM) $(BUILDTOOL_MANIFEST_FILE)
  80.157 -	@$(RM) $(BUILDTOOL_JAR_FILE)
  80.158 +	@$(RM) $(CLASSANALYZER_JAR_FILE)
  80.159 +	@$(RM) $(CLASSFILE_JAR_FILE)
    81.1 --- a/make/modules/tools/build.xml	Thu Jan 21 11:12:37 2010 -0800
    81.2 +++ b/make/modules/tools/build.xml	Fri Jan 22 09:34:17 2010 -0800
    81.3 @@ -1,32 +1,28 @@
    81.4 +<?xml version="1.0" encoding="UTF-8"?>
    81.5 +
    81.6  <!--
    81.7 - Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    81.8 +  Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    81.9 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   81.10  
   81.11 - Redistribution and use in source and binary forms, with or without
   81.12 - modification, are permitted provided that the following conditions
   81.13 - are met:
   81.14 +  This code is free software; you can redistribute it and/or modify it
   81.15 +  under the terms of the GNU General Public License version 2 only, as
   81.16 +  published by the Free Software Foundation.  Sun designates this
   81.17 +  particular file as subject to the "Classpath" exception as provided
   81.18 +  by Sun in the LICENSE file that accompanied this code.
   81.19  
   81.20 -   - Redistributions of source code must retain the above copyright
   81.21 -     notice, this list of conditions and the following disclaimer.
   81.22 +  This code is distributed in the hope that it will be useful, but WITHOUT
   81.23 +  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   81.24 +  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   81.25 +  version 2 for more details (a copy is included in the LICENSE file that
   81.26 +  accompanied this code).
   81.27  
   81.28 -   - Redistributions in binary form must reproduce the above copyright
   81.29 -     notice, this list of conditions and the following disclaimer in the
   81.30 -     documentation and/or other materials provided with the distribution.
   81.31 +  You should have received a copy of the GNU General Public License version
   81.32 +  2 along with this work; if not, write to the Free Software Foundation,
   81.33 +  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   81.34  
   81.35 -   - Neither the name of Sun Microsystems nor the names of its
   81.36 -     contributors may be used to endorse or promote products derived
   81.37 -     from this software without specific prior written permission.
   81.38 -
   81.39 - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
   81.40 - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   81.41 - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   81.42 - PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
   81.43 - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   81.44 - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   81.45 - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   81.46 - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   81.47 - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   81.48 - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   81.49 - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   81.50 +  Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   81.51 +  CA 95054 USA or visit www.sun.com if you need additional information or
   81.52 +  have any questions.
   81.53  -->
   81.54  
   81.55  <project name="classanalyzer" default="build" basedir=".">
    82.1 --- a/make/modules/tools/nbproject/project.properties	Thu Jan 21 11:12:37 2010 -0800
    82.2 +++ b/make/modules/tools/nbproject/project.properties	Fri Jan 22 09:34:17 2010 -0800
    82.3 @@ -1,32 +1,26 @@
    82.4  #
    82.5  # Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    82.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    82.7  #
    82.8 -# Redistribution and use in source and binary forms, with or without
    82.9 -# modification, are permitted provided that the following conditions
   82.10 -# are met:
   82.11 +# This code is free software; you can redistribute it and/or modify it
   82.12 +# under the terms of the GNU General Public License version 2 only, as
   82.13 +# published by the Free Software Foundation.  Sun designates this
   82.14 +# particular file as subject to the "Classpath" exception as provided
   82.15 +# by Sun in the LICENSE file that accompanied this code.
   82.16  #
   82.17 -#   - Redistributions of source code must retain the above copyright
   82.18 -#     notice, this list of conditions and the following disclaimer.
   82.19 +# This code is distributed in the hope that it will be useful, but WITHOUT
   82.20 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   82.21 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   82.22 +# version 2 for more details (a copy is included in the LICENSE file that
   82.23 +# accompanied this code).
   82.24  #
   82.25 -#   - Redistributions in binary form must reproduce the above copyright
   82.26 -#     notice, this list of conditions and the following disclaimer in the
   82.27 -#     documentation and/or other materials provided with the distribution.
   82.28 +# You should have received a copy of the GNU General Public License version
   82.29 +# 2 along with this work; if not, write to the Free Software Foundation,
   82.30 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   82.31  #
   82.32 -#   - Neither the name of Sun Microsystems nor the names of its
   82.33 -#     contributors may be used to endorse or promote products derived
   82.34 -#     from this software without specific prior written permission.
   82.35 -#
   82.36 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
   82.37 -# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   82.38 -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   82.39 -# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
   82.40 -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   82.41 -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   82.42 -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   82.43 -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   82.44 -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   82.45 -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   82.46 -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   82.47 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   82.48 +# CA 95054 USA or visit www.sun.com if you need additional information or
   82.49 +# have any questions.
   82.50  #
   82.51  
   82.52  application.title=classanalyzer
    83.1 --- a/make/modules/tools/nbproject/project.xml	Thu Jan 21 11:12:37 2010 -0800
    83.2 +++ b/make/modules/tools/nbproject/project.xml	Fri Jan 22 09:34:17 2010 -0800
    83.3 @@ -1,35 +1,29 @@
    83.4 +<?xml version="1.0" encoding="UTF-8"?>
    83.5  <!--
    83.6 - Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    83.7 -
    83.8 - Redistribution and use in source and binary forms, with or without
    83.9 - modification, are permitted provided that the following conditions
   83.10 - are met:
   83.11 -
   83.12 -   - Redistributions of source code must retain the above copyright
   83.13 -     notice, this list of conditions and the following disclaimer.
   83.14 -
   83.15 -   - Redistributions in binary form must reproduce the above copyright
   83.16 -     notice, this list of conditions and the following disclaimer in the
   83.17 -     documentation and/or other materials provided with the distribution.
   83.18 -
   83.19 -   - Neither the name of Sun Microsystems nor the names of its
   83.20 -     contributors may be used to endorse or promote products derived
   83.21 -     from this software without specific prior written permission.
   83.22 -
   83.23 - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
   83.24 - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   83.25 - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   83.26 - PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
   83.27 - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   83.28 - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   83.29 - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   83.30 - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   83.31 - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   83.32 - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   83.33 - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   83.34 +  Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
   83.35 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   83.36 + 
   83.37 +  This code is free software; you can redistribute it and/or modify it
   83.38 +  under the terms of the GNU General Public License version 2 only, as
   83.39 +  published by the Free Software Foundation.  Sun designates this
   83.40 +  particular file as subject to the "Classpath" exception as provided
   83.41 +  by Sun in the LICENSE file that accompanied this code.
   83.42 + 
   83.43 +  This code is distributed in the hope that it will be useful, but WITHOUT
   83.44 +  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   83.45 +  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   83.46 +  version 2 for more details (a copy is included in the LICENSE file that
   83.47 +  accompanied this code).
   83.48 + 
   83.49 +  You should have received a copy of the GNU General Public License version
   83.50 +  2 along with this work; if not, write to the Free Software Foundation,
   83.51 +  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   83.52 + 
   83.53 +  Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   83.54 +  CA 95054 USA or visit www.sun.com if you need additional information or
   83.55 +  have any questions.
   83.56  -->
   83.57  
   83.58 -<?xml version="1.0" encoding="UTF-8"?>
   83.59  <project xmlns="http://www.netbeans.org/ns/project/1">
   83.60      <type>org.netbeans.modules.java.j2seproject</type>
   83.61      <configuration>
    84.1 --- a/make/modules/tools/src/com/sun/classanalyzer/Module.java	Thu Jan 21 11:12:37 2010 -0800
    84.2 +++ b/make/modules/tools/src/com/sun/classanalyzer/Module.java	Fri Jan 22 09:34:17 2010 -0800
    84.3 @@ -444,8 +444,8 @@
    84.4      }
    84.5  
    84.6      void printClassListTo(String output) throws IOException {
    84.7 -        // no file created if the module doesn't have any class
    84.8 -        if (classes.isEmpty()) {
    84.9 +        // no file created if the module doesn't have any class nor resource
   84.10 +        if (isEmpty()) {
   84.11              return;
   84.12          }
   84.13  
   84.14 @@ -482,7 +482,7 @@
   84.15  
   84.16      void printDependenciesTo(String output, boolean showDynamic) throws IOException {
   84.17          // no file created if the module doesn't have any class
   84.18 -        if (classes.isEmpty()) {
   84.19 +        if (isEmpty()) {
   84.20              return;
   84.21          }
   84.22  
    85.1 --- a/make/sun/applet/Makefile	Thu Jan 21 11:12:37 2010 -0800
    85.2 +++ b/make/sun/applet/Makefile	Fri Jan 22 09:34:17 2010 -0800
    85.3 @@ -28,6 +28,7 @@
    85.4  #
    85.5  
    85.6  BUILDDIR = ../..
    85.7 +MODULE  = applet
    85.8  PACKAGE = sun.applet
    85.9  PRODUCT = sun
   85.10  include $(BUILDDIR)/common/Defs.gmk
    86.1 --- a/make/sun/awt/Makefile	Thu Jan 21 11:12:37 2010 -0800
    86.2 +++ b/make/sun/awt/Makefile	Fri Jan 22 09:34:17 2010 -0800
    86.3 @@ -24,6 +24,7 @@
    86.4  #
    86.5  
    86.6  BUILDDIR = ../..
    86.7 +MODULE  = awt
    86.8  PACKAGE = sun.awt
    86.9  LIBRARY = awt
   86.10  PRODUCT = sun
   86.11 @@ -312,15 +313,15 @@
   86.12  
   86.13  $(LIBDIR)/$(LIBARCH)/libxinerama.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libxinerama.so
   86.14  	$(install-file)
   86.15 -	$(CHMOD) a+x $@
   86.16 +	$(call chmod-file, a+x)
   86.17  
   86.18  $(LIBDIR)/$(LIBARCH)/libjdgaSUNW%.so: $(CLOSED_SRC)/solaris/lib/$(ARCH)/libjdgaSUNW%.so
   86.19  	$(install-file)
   86.20 -	$(CHMOD) a+x $@
   86.21 +	$(call chmod-file, a+x)
   86.22  
   86.23  $(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so: $(LIBDIR)/$(LIBARCH)/libjdgaSUNWffb.so
   86.24  	$(prep-target)
   86.25 -	$(LN) -s libjdgaSUNWffb.so $(LIBDIR)/$(LIBARCH)/libjdgaSUNWafb.so
   86.26 +	$(call install-sym-link, libjdgaSUNWffb.so)
   86.27  
   86.28  clean:: dgalib.clean
   86.29  
   86.30 @@ -404,7 +405,8 @@
   86.31      $(COMPILEFONTCONFIG_JARFILE)
   86.32  	$(prep-target)
   86.33  	$(BOOT_JAVA_CMD) -jar $(COMPILEFONTCONFIG_JARFILE) $< $@
   86.34 -	$(CHMOD) 444 $(@)
   86.35 +	$(install-module-file)
   86.36 +	$(call chmod-file, 444)
   86.37  	@$(java-vm-cleanup)
   86.38  
   86.39  fontconfigs.clean :
    87.1 --- a/make/sun/cmm/Makefile	Thu Jan 21 11:12:37 2010 -0800
    87.2 +++ b/make/sun/cmm/Makefile	Fri Jan 22 09:34:17 2010 -0800
    87.3 @@ -24,6 +24,7 @@
    87.4  #
    87.5  
    87.6  BUILDDIR = ../..
    87.7 +MODULE   = java2d
    87.8  PRODUCT  = sun
    87.9  include $(BUILDDIR)/common/Defs.gmk
   87.10  
   87.11 @@ -45,34 +46,24 @@
   87.12  	     $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
   87.13  
   87.14  $(ICCPROFILE_DEST_DIR)/sRGB.pf: $(ICCPROFILE_SRC_DIR)/sRGB.pf
   87.15 -	$(RM) $(ICCPROFILE_DEST_DIR)/sRGB.pf
   87.16 -	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
   87.17 -	$(CP) $(ICCPROFILE_SRC_DIR)/sRGB.pf $(ICCPROFILE_DEST_DIR)
   87.18 -	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/sRGB.pf
   87.19 +	$(install-file)
   87.20 +	$(call chmod-file, 444)
   87.21  
   87.22  $(ICCPROFILE_DEST_DIR)/GRAY.pf: $(ICCPROFILE_SRC_DIR)/GRAY.pf
   87.23 -	$(RM) $(ICCPROFILE_DEST_DIR)/GRAY.pf
   87.24 -	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
   87.25 -	$(CP) $(ICCPROFILE_SRC_DIR)/GRAY.pf $(ICCPROFILE_DEST_DIR)
   87.26 -	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/GRAY.pf
   87.27 +	$(install-file)
   87.28 +	$(call chmod-file, 444)
   87.29  
   87.30  $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf: $(ICCPROFILE_SRC_DIR)/CIEXYZ.pf
   87.31 -	$(RM) $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
   87.32 -	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
   87.33 -	$(CP) $(ICCPROFILE_SRC_DIR)/CIEXYZ.pf $(ICCPROFILE_DEST_DIR)
   87.34 -	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/CIEXYZ.pf
   87.35 +	$(install-file)
   87.36 +	$(call chmod-file, 444)
   87.37  
   87.38  $(ICCPROFILE_DEST_DIR)/PYCC.pf: $(ICCPROFILE_SRC_DIR)/PYCC.pf
   87.39 -	$(RM) $(ICCPROFILE_DEST_DIR)/PYCC.pf
   87.40 -	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
   87.41 -	$(CP) $(ICCPROFILE_SRC_DIR)/PYCC.pf $(ICCPROFILE_DEST_DIR)
   87.42 -	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/PYCC.pf
   87.43 +	$(install-file)
   87.44 +	$(call chmod-file, 444)
   87.45  
   87.46  $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf: $(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf
   87.47 -	$(RM) $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
   87.48 -	-$(MKDIR) -p $(ICCPROFILE_DEST_DIR)
   87.49 -	$(CP) $(ICCPROFILE_SRC_DIR)/LINEAR_RGB.pf $(ICCPROFILE_DEST_DIR)
   87.50 -	$(CHMOD) 444 $(ICCPROFILE_DEST_DIR)/LINEAR_RGB.pf
   87.51 +	$(install-file)
   87.52 +	$(call chmod-file, 444)
   87.53  
   87.54  iccprofiles.clean:
   87.55  	$(RM) -r $(ICCPROFILE_DEST_DIR)
    88.1 --- a/make/sun/cmm/kcms/Makefile	Thu Jan 21 11:12:37 2010 -0800
    88.2 +++ b/make/sun/cmm/kcms/Makefile	Fri Jan 22 09:34:17 2010 -0800
    88.3 @@ -24,6 +24,7 @@
    88.4  #
    88.5  
    88.6  BUILDDIR = ../../..
    88.7 +MODULE  = java2d
    88.8  PACKAGE = sun.java2d.cmm.kcms
    88.9  LIBRARY = kcms
   88.10  PRODUCT = sun
    89.1 --- a/make/sun/cmm/lcms/Makefile	Thu Jan 21 11:12:37 2010 -0800
    89.2 +++ b/make/sun/cmm/lcms/Makefile	Fri Jan 22 09:34:17 2010 -0800
    89.3 @@ -24,6 +24,7 @@
    89.4  #
    89.5  
    89.6  BUILDDIR = ../../..
    89.7 +MODULE  = java2d
    89.8  PACKAGE = sun.java2d.cmm.lcms
    89.9  LIBRARY = lcms
   89.10  PRODUCT = sun
    90.1 --- a/make/sun/dcpr/Makefile	Thu Jan 21 11:12:37 2010 -0800
    90.2 +++ b/make/sun/dcpr/Makefile	Fri Jan 22 09:34:17 2010 -0800
    90.3 @@ -26,6 +26,7 @@
    90.4  # WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
    90.5  
    90.6  BUILDDIR = ../..
    90.7 +MODULE  = java2d
    90.8  PACKAGE = sun.dc
    90.9  LIBRARY = dcpr
   90.10  PRODUCT = sun
    91.1 --- a/make/sun/font/Makefile	Thu Jan 21 11:12:37 2010 -0800
    91.2 +++ b/make/sun/font/Makefile	Fri Jan 22 09:34:17 2010 -0800
    91.3 @@ -28,6 +28,7 @@
    91.4  #
    91.5  
    91.6  BUILDDIR = ../..
    91.7 +MODULE  = font
    91.8  PACKAGE = sun.font
    91.9  LIBRARY = fontmanager
   91.10  PRODUCT = sun
   91.11 @@ -121,16 +122,21 @@
   91.12  #
   91.13  #TODO: rework this to avoid hardcoding library name in the makefile
   91.14  #
   91.15 -library:: $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
   91.16 -
   91.17 -$(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX):
   91.18  ifeq ($(PLATFORM), windows)
   91.19 -	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
   91.20 +    FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
   91.21 +    OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib
   91.22  else 
   91.23    ifeq ($(USING_SYSTEM_FT_LIB), false)
   91.24 -	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@.6
   91.25 +    FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
   91.26    endif
   91.27 +  OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
   91.28  endif 
   91.29 +
   91.30 +library:: $(FREETYPE_LIB)
   91.31 +
   91.32 +$(FREETYPE_LIB):
   91.33 +	$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
   91.34 +	$(install-module-file)
   91.35  endif
   91.36  
   91.37  #ifeq ($(PLATFORM), solaris)
   91.38 @@ -158,7 +164,6 @@
   91.39    CPPFLAGS += -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k
   91.40  else
   91.41    CPPFLAGS += -I$(FREETYPE_HEADERS_PATH) -I$(FREETYPE_HEADERS_PATH)/freetype2
   91.42 -  OTHER_LDLIBS += $(FREETYPE_LIB)
   91.43  endif
   91.44  
   91.45  ifeq ($(PLATFORM), windows)
    92.1 --- a/make/sun/font/t2k/Makefile	Thu Jan 21 11:12:37 2010 -0800
    92.2 +++ b/make/sun/font/t2k/Makefile	Fri Jan 22 09:34:17 2010 -0800
    92.3 @@ -30,6 +30,7 @@
    92.4  #
    92.5  
    92.6  BUILDDIR = ../../..
    92.7 +MODULE  = font
    92.8  PACKAGE = sun.font
    92.9  LIBRARY = t2k
   92.10  PRODUCT = sun
    93.1 --- a/make/sun/headless/Makefile	Thu Jan 21 11:12:37 2010 -0800
    93.2 +++ b/make/sun/headless/Makefile	Fri Jan 22 09:34:17 2010 -0800
    93.3 @@ -30,6 +30,7 @@
    93.4  MOTIF_VERSION_STRING=none
    93.5  LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/headless
    93.6  
    93.7 +MODULE  = awt
    93.8  PACKAGE = sun.awt
    93.9  LIBRARY = mawt
   93.10  LIBRARY_OUTPUT = headless
    94.1 --- a/make/sun/image/generic/Makefile	Thu Jan 21 11:12:37 2010 -0800
    94.2 +++ b/make/sun/image/generic/Makefile	Fri Jan 22 09:34:17 2010 -0800
    94.3 @@ -28,6 +28,7 @@
    94.4  #
    94.5  
    94.6  BUILDDIR = ../../..
    94.7 +MODULE  = media
    94.8  PACKAGE = sun.awt.medialib
    94.9  LIBRARY = mlib_image
   94.10  PRODUCT = sun
    95.1 --- a/make/sun/image/vis/Makefile	Thu Jan 21 11:12:37 2010 -0800
    95.2 +++ b/make/sun/image/vis/Makefile	Fri Jan 22 09:34:17 2010 -0800
    95.3 @@ -27,6 +27,7 @@
    95.4  # Makefile for building the VIS (solaris-only) version of medialib
    95.5  #
    95.6  BUILDDIR = ../../..
    95.7 +MODULE  = media
    95.8  PACKAGE = sun.awt.medialib
    95.9  LIBRARY = mlib_image_v
   95.10  PRODUCT = sun
    96.1 --- a/make/sun/jar/Makefile	Thu Jan 21 11:12:37 2010 -0800
    96.2 +++ b/make/sun/jar/Makefile	Fri Jan 22 09:34:17 2010 -0800
    96.3 @@ -28,6 +28,7 @@
    96.4  #
    96.5  
    96.6  BUILDDIR = ../..
    96.7 +MODULE  = jar-tool
    96.8  PACKAGE = sun.tools
    96.9  PRODUCT = sun
   96.10  include $(BUILDDIR)/common/Defs.gmk
    97.1 --- a/make/sun/javazic/Makefile	Thu Jan 21 11:12:37 2010 -0800
    97.2 +++ b/make/sun/javazic/Makefile	Fri Jan 22 09:34:17 2010 -0800
    97.3 @@ -27,6 +27,7 @@
    97.4  
    97.5  
    97.6  BUILDDIR = ../..
    97.7 +MODULE  = base
    97.8  PACKAGE = sun.javazic
    97.9  PRODUCT = sun
   97.10  include $(BUILDDIR)/common/Defs.gmk
   97.11 @@ -69,6 +70,7 @@
   97.12  	$(RM) -r $(@D)
   97.13  	$(prep-target)
   97.14  	$(CP) -r $(WORKDIR)/* $(@D)
   97.15 +	$(install-module-dir)
   97.16  
   97.17  clean clobber::
   97.18  	$(RM) -r $(TEMPDIR) $(INSTALLDIR)
    98.1 --- a/make/sun/jawt/Makefile	Thu Jan 21 11:12:37 2010 -0800
    98.2 +++ b/make/sun/jawt/Makefile	Fri Jan 22 09:34:17 2010 -0800
    98.3 @@ -24,6 +24,7 @@
    98.4  #
    98.5  
    98.6  BUILDDIR = ../..
    98.7 +MODULE  = awt
    98.8  PACKAGE = sun.awt
    98.9  LIBRARY = jawt
   98.10  PRODUCT = sun
    99.1 --- a/make/sun/jconsole/Makefile	Thu Jan 21 11:12:37 2010 -0800
    99.2 +++ b/make/sun/jconsole/Makefile	Fri Jan 22 09:34:17 2010 -0800
    99.3 @@ -28,6 +28,7 @@
    99.4  #
    99.5  
    99.6  BUILDDIR = ../..
    99.7 +MODULE  = jconsole
    99.8  PACKAGE = sun.tools.jconsole
    99.9  PRODUCT = sun
   99.10  include $(BUILDDIR)/common/Defs.gmk
   99.11 @@ -79,7 +80,7 @@
   99.12  	$(install-file)
   99.13  
   99.14  $(TEMPDIR)/manifest: $(SHARE_SRC)/classes/$(PKGDIR)/manifest
   99.15 -	$(install-file)
   99.16 +	$(install-manifest-file)
   99.17  
   99.18  #
   99.19  # Extra rule to build jconsole.jar
   100.1 --- a/make/sun/jdbc/Makefile	Thu Jan 21 11:12:37 2010 -0800
   100.2 +++ b/make/sun/jdbc/Makefile	Fri Jan 22 09:34:17 2010 -0800
   100.3 @@ -33,6 +33,7 @@
   100.4  #
   100.5  
   100.6  BUILDDIR = ../..
   100.7 +MODULE  = jdbc-odbc
   100.8  PACKAGE = sun.jdbc.odbc
   100.9  LIBRARY = JdbcOdbc
  100.10  PRODUCT = sun
   101.1 --- a/make/sun/jdga/Makefile	Thu Jan 21 11:12:37 2010 -0800
   101.2 +++ b/make/sun/jdga/Makefile	Fri Jan 22 09:34:17 2010 -0800
   101.3 @@ -25,6 +25,7 @@
   101.4  
   101.5  
   101.6  BUILDDIR = ../..
   101.7 +MODULE  = java2d
   101.8  PACKAGE = sun.jdga
   101.9  LIBRARY = sunwjdga
  101.10  PRODUCT = sun
   102.1 --- a/make/sun/jkernel/Makefile	Thu Jan 21 11:12:37 2010 -0800
   102.2 +++ b/make/sun/jkernel/Makefile	Fri Jan 22 09:34:17 2010 -0800
   102.3 @@ -24,6 +24,7 @@
   102.4  #
   102.5  
   102.6  BUILDDIR = ../..
   102.7 +MODULE  = jkernel
   102.8  PACKAGE = sun.jkernel
   102.9  LIBRARY = jkernel
  102.10  PRODUCT = sun
   103.1 --- a/make/sun/jpeg/Makefile	Thu Jan 21 11:12:37 2010 -0800
   103.2 +++ b/make/sun/jpeg/Makefile	Fri Jan 22 09:34:17 2010 -0800
   103.3 @@ -24,6 +24,7 @@
   103.4  #
   103.5  
   103.6  BUILDDIR = ../..
   103.7 +MODULE  = java2d
   103.8  PACKAGE = sun.awt
   103.9  LIBRARY = jpeg
  103.10  PRODUCT = sun
   104.1 --- a/make/sun/launcher/Makefile	Thu Jan 21 11:12:37 2010 -0800
   104.2 +++ b/make/sun/launcher/Makefile	Fri Jan 22 09:34:17 2010 -0800
   104.3 @@ -24,6 +24,7 @@
   104.4  #
   104.5  
   104.6  BUILDDIR = ../..
   104.7 +MODULE  = base
   104.8  PACKAGE = sun.launcher
   104.9  PRODUCT = sun
  104.10  include $(BUILDDIR)/common/Defs.gmk
   105.1 --- a/make/sun/management/Makefile	Thu Jan 21 11:12:37 2010 -0800
   105.2 +++ b/make/sun/management/Makefile	Fri Jan 22 09:34:17 2010 -0800
   105.3 @@ -28,6 +28,8 @@
   105.4  #
   105.5  
   105.6  BUILDDIR = ../..
   105.7 +MODULE   = management
   105.8 +
   105.9  include $(BUILDDIR)/common/Defs.gmk
  105.10  
  105.11  MGMT_LIBDIR = $(LIBDIR)/management
  105.12 @@ -56,17 +58,17 @@
  105.13  
  105.14  $(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
  105.15  	$(install-file)
  105.16 -	$(CHMOD) 644 $@
  105.17 +	$(call chmod-file, 644)
  105.18  
  105.19  $(MGMT_LIBDIR)/snmp.acl.template: $(MGMT_LIB_SRC)/snmp.acl.template
  105.20  	$(install-file)
  105.21 -	$(CHMOD) 444 $@
  105.22 +	$(call chmod-file, 444)
  105.23  
  105.24  $(MGMT_LIBDIR)/jmxremote.password.template: $(MGMT_LIB_SRC)/jmxremote.password.template
  105.25  	$(install-file)
  105.26 -	$(CHMOD) 444 $@
  105.27 +	$(call chmod-file, 444)
  105.28  
  105.29  $(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access 
  105.30  	$(install-file)
  105.31 -	$(CHMOD) 644 $@
  105.32 +	$(call chmod-file, 644)
  105.33  
   106.1 --- a/make/sun/native2ascii/Makefile	Thu Jan 21 11:12:37 2010 -0800
   106.2 +++ b/make/sun/native2ascii/Makefile	Fri Jan 22 09:34:17 2010 -0800
   106.3 @@ -28,6 +28,7 @@
   106.4  #
   106.5  
   106.6  BUILDDIR = ../..
   106.7 +MODULE  = tools
   106.8  PACKAGE = sun.tools.native2ascii
   106.9  PRODUCT = sun
  106.10  OTHER_JAVACFLAGS += -Xlint:serial -Werror
   107.1 --- a/make/sun/net/others/Makefile	Thu Jan 21 11:12:37 2010 -0800
   107.2 +++ b/make/sun/net/others/Makefile	Fri Jan 22 09:34:17 2010 -0800
   107.3 @@ -24,6 +24,7 @@
   107.4  #
   107.5  
   107.6  BUILDDIR = ../../..
   107.7 +MODULE  = base
   107.8  PACKAGE = sun.net
   107.9  PRODUCT = sun
  107.10  include $(BUILDDIR)/common/Defs.gmk
   108.1 --- a/make/sun/net/spi/nameservice/dns/Makefile	Thu Jan 21 11:12:37 2010 -0800
   108.2 +++ b/make/sun/net/spi/nameservice/dns/Makefile	Fri Jan 22 09:34:17 2010 -0800
   108.3 @@ -28,6 +28,9 @@
   108.4  #
   108.5  
   108.6  BUILDDIR = ../../../../..
   108.7 +
   108.8 +# dns should probably be its own module
   108.9 +MODULE  = net-dns
  108.10  PACKAGE = sun.net.spi.nameservice.dns
  108.11  PRODUCT = sun
  108.12  include $(BUILDDIR)/common/Defs.gmk
   109.1 --- a/make/sun/nio/FILES_java.gmk	Thu Jan 21 11:12:37 2010 -0800
   109.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.3 @@ -1,400 +0,0 @@
   109.4 -#
   109.5 -# Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
   109.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   109.7 -#
   109.8 -# This code is free software; you can redistribute it and/or modify it
   109.9 -# under the terms of the GNU General Public License version 2 only, as
  109.10 -# published by the Free Software Foundation.  Sun designates this
  109.11 -# particular file as subject to the "Classpath" exception as provided
  109.12 -# by Sun in the LICENSE file that accompanied this code.
  109.13 -#
  109.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
  109.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  109.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  109.17 -# version 2 for more details (a copy is included in the LICENSE file that
  109.18 -# accompanied this code).
  109.19 -#
  109.20 -# You should have received a copy of the GNU General Public License version
  109.21 -# 2 along with this work; if not, write to the Free Software Foundation,
  109.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  109.23 -#
  109.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  109.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
  109.26 -# have any questions.
  109.27 -#
  109.28 -
  109.29 -#
  109.30 -# Character converters for lib/charsets.jar
  109.31 -#
  109.32 -# Core character converters are built from make/java/java.
  109.33 -#
  109.34 -
  109.35 -FILES_src = \
  109.36 -	sun/io/ByteToCharDoubleByte.java \
  109.37 -	sun/io/ByteToCharDBCS_ASCII.java \
  109.38 -	sun/io/ByteToCharDBCS_EBCDIC.java \
  109.39 -	sun/io/ByteToCharEUC.java \
  109.40 -	sun/io/CharToByteDoubleByte.java \
  109.41 -	sun/io/CharToByteDBCS_ASCII.java \
  109.42 -	sun/io/CharToByteDBCS_EBCDIC.java \
  109.43 -	sun/io/CharToByteEUC.java \
  109.44 -	sun/io/ByteToCharBig5.java \
  109.45 -	sun/io/ByteToCharBig5_Solaris.java \
  109.46 -	sun/io/ByteToCharBig5_HKSCS.java \
  109.47 -	sun/io/ByteToCharMS950_HKSCS.java \
  109.48 -	sun/io/ByteToCharHKSCS.java \
  109.49 -	sun/io/ByteToCharHKSCS_2001.java \
  109.50 -	sun/io/ByteToCharGB18030.java \
  109.51 -	sun/io/ByteToCharGB18030DB.java \
  109.52 -	sun/io/ByteToCharCp037.java \
  109.53 -	sun/io/ByteToCharCp1006.java \
  109.54 -	sun/io/ByteToCharCp1025.java \
  109.55 -	sun/io/ByteToCharCp1026.java \
  109.56 -	sun/io/ByteToCharCp1046.java \
  109.57 -	sun/io/ByteToCharCp1047.java \
  109.58 -	sun/io/ByteToCharCp1097.java \
  109.59 -	sun/io/ByteToCharCp1098.java \
  109.60 -	sun/io/ByteToCharCp1112.java \
  109.61 -	sun/io/ByteToCharCp1122.java \
  109.62 -	sun/io/ByteToCharCp1123.java \
  109.63 -	sun/io/ByteToCharCp1124.java \
  109.64 -	sun/io/ByteToCharCp1140.java \
  109.65 -	sun/io/ByteToCharCp1141.java \
  109.66 -	sun/io/ByteToCharCp1142.java \
  109.67 -	sun/io/ByteToCharCp1143.java \
  109.68 -	sun/io/ByteToCharCp1144.java \
  109.69 -	sun/io/ByteToCharCp1145.java \
  109.70 -	sun/io/ByteToCharCp1146.java \
  109.71 -	sun/io/ByteToCharCp1147.java \
  109.72 -	sun/io/ByteToCharCp1148.java \
  109.73 -	sun/io/ByteToCharCp1149.java \
  109.74 -	sun/io/ByteToCharCp1255.java \
  109.75 -	sun/io/ByteToCharCp1256.java \
  109.76 -	sun/io/ByteToCharCp1258.java \
  109.77 -	sun/io/ByteToCharCp1381.java \
  109.78 -	sun/io/ByteToCharCp1383.java \
  109.79 -	sun/io/ByteToCharCp273.java \
  109.80 -	sun/io/ByteToCharCp277.java \
  109.81 -	sun/io/ByteToCharCp278.java \
  109.82 -	sun/io/ByteToCharCp280.java \
  109.83 -	sun/io/ByteToCharCp284.java \
  109.84 -	sun/io/ByteToCharCp285.java \
  109.85 -	sun/io/ByteToCharCp297.java \
  109.86 -	sun/io/ByteToCharCp33722.java \
  109.87 -	sun/io/ByteToCharCp420.java \
  109.88 -	sun/io/ByteToCharCp424.java \
  109.89 -	sun/io/ByteToCharCp437.java \
  109.90 -	sun/io/ByteToCharCp500.java \
  109.91 -	sun/io/ByteToCharCp737.java \
  109.92 -	sun/io/ByteToCharCp775.java \
  109.93 -	sun/io/ByteToCharCp834.java \
  109.94 -	sun/io/ByteToCharCp838.java \
  109.95 -	sun/io/ByteToCharCp850.java \
  109.96 -	sun/io/ByteToCharCp852.java \
  109.97 -	sun/io/ByteToCharCp855.java \
  109.98 -	sun/io/ByteToCharCp856.java \
  109.99 -	sun/io/ByteToCharCp857.java \
 109.100 -	sun/io/ByteToCharCp858.java \
 109.101 -	sun/io/ByteToCharCp860.java \
 109.102 -	sun/io/ByteToCharCp861.java \
 109.103 -	sun/io/ByteToCharCp862.java \
 109.104 -	sun/io/ByteToCharCp863.java \
 109.105 -	sun/io/ByteToCharCp864.java \
 109.106 -	sun/io/ByteToCharCp865.java \
 109.107 -	sun/io/ByteToCharCp866.java \
 109.108 -	sun/io/ByteToCharCp868.java \
 109.109 -	sun/io/ByteToCharCp869.java \
 109.110 -	sun/io/ByteToCharCp870.java \
 109.111 -	sun/io/ByteToCharCp871.java \
 109.112 -	sun/io/ByteToCharCp874.java \
 109.113 -	sun/io/ByteToCharCp875.java \
 109.114 -	sun/io/ByteToCharCp918.java \
 109.115 -	sun/io/ByteToCharCp921.java \
 109.116 -	sun/io/ByteToCharCp922.java \
 109.117 -	sun/io/ByteToCharCp930.java \
 109.118 -	sun/io/ByteToCharCp933.java \
 109.119 -	sun/io/ByteToCharCp935.java \
 109.120 -	sun/io/ByteToCharCp937.java \
 109.121 -	sun/io/ByteToCharCp939.java \
 109.122 -	sun/io/ByteToCharCp942.java \
 109.123 -	sun/io/ByteToCharCp942C.java \
 109.124 -	sun/io/ByteToCharCp943.java \
 109.125 -	sun/io/ByteToCharCp943C.java \
 109.126 -	sun/io/ByteToCharCp948.java \
 109.127 -	sun/io/ByteToCharCp949.java \
 109.128 -	sun/io/ByteToCharCp949C.java \
 109.129 -	sun/io/ByteToCharCp950.java \
 109.130 -	sun/io/ByteToCharCp964.java \
 109.131 -	sun/io/ByteToCharCp970.java \
 109.132 -	sun/io/ByteToCharJIS0201.java \
 109.133 -	sun/io/ByteToCharJIS0208.java \
 109.134 -	sun/io/ByteToCharJIS0208_Solaris.java \
 109.135 -	sun/io/ByteToCharJIS0212.java \
 109.136 -	sun/io/ByteToCharJIS0212_Solaris.java \
 109.137 -	sun/io/ByteToCharEUC_CN.java \
 109.138 -	sun/io/ByteToCharEUC_JP.java \
 109.139 -	sun/io/ByteToCharEUC_JP_LINUX.java \
 109.140 -	sun/io/ByteToCharEUC_JP_Solaris.java \
 109.141 -	sun/io/ByteToCharEUC_KR.java \
 109.142 -	sun/io/ByteToCharEUC_TW.java \
 109.143 -	sun/io/ByteToCharSJIS.java \
 109.144 -	sun/io/ByteToCharPCK.java \
 109.145 -	sun/io/ByteToCharGBK.java \
 109.146 -	sun/io/ByteToCharISCII91.java \
 109.147 -	sun/io/ByteToCharISO2022.java \
 109.148 -	sun/io/ByteToCharISO2022CN.java \
 109.149 -	sun/io/ByteToCharISO2022JP.java \
 109.150 -	sun/io/ByteToCharISO2022KR.java \
 109.151 -	sun/io/ByteToCharISO8859_3.java \
 109.152 -	sun/io/ByteToCharISO8859_6.java \
 109.153 -	sun/io/ByteToCharISO8859_8.java \
 109.154 -	sun/io/ByteToCharJISAutoDetect.java \
 109.155 -	sun/io/ByteToCharJohab.java \
 109.156 -	sun/io/ByteToCharMS874.java \
 109.157 -	sun/io/ByteToCharMS932.java \
 109.158 -	sun/io/ByteToCharMS936.java \
 109.159 -	sun/io/ByteToCharMS949.java \
 109.160 -	sun/io/ByteToCharMS950.java \
 109.161 -	sun/io/ByteToCharMacArabic.java \
 109.162 -	sun/io/ByteToCharMacCentralEurope.java \
 109.163 -	sun/io/ByteToCharMacCroatian.java \
 109.164 -	sun/io/ByteToCharMacCyrillic.java \
 109.165 -	sun/io/ByteToCharMacDingbat.java \
 109.166 -	sun/io/ByteToCharMacGreek.java \
 109.167 -	sun/io/ByteToCharMacHebrew.java \
 109.168 -	sun/io/ByteToCharMacIceland.java \
 109.169 -	sun/io/ByteToCharMacRoman.java \
 109.170 -	sun/io/ByteToCharMacRomania.java \
 109.171 -	sun/io/ByteToCharMacSymbol.java \
 109.172 -	sun/io/ByteToCharMacThai.java \
 109.173 -	sun/io/ByteToCharMacTurkish.java \
 109.174 -	sun/io/ByteToCharMacUkraine.java \
 109.175 -	sun/io/ByteToCharTIS620.java \
 109.176 -	sun/io/CharToByteBig5.java \
 109.177 -	sun/io/CharToByteBig5_Solaris.java \
 109.178 -	sun/io/CharToByteBig5_HKSCS.java \
 109.179 -	sun/io/CharToByteHKSCS.java \
 109.180 -	sun/io/CharToByteHKSCS_2001.java \
 109.181 -	sun/io/CharToByteMS950_HKSCS.java \
 109.182 -	sun/io/CharToByteGB18030.java \
 109.183 -	sun/io/CharToByteCp037.java \
 109.184 -	sun/io/CharToByteCp1006.java \
 109.185 -	sun/io/CharToByteCp1025.java \
 109.186 -	sun/io/CharToByteCp1026.java \
 109.187 -	sun/io/CharToByteCp1046.java \
 109.188 -	sun/io/CharToByteCp1047.java \
 109.189 -	sun/io/CharToByteCp1097.java \
 109.190 -	sun/io/CharToByteCp1098.java \
 109.191 -	sun/io/CharToByteCp1112.java \
 109.192 -	sun/io/CharToByteCp1122.java \
 109.193 -	sun/io/CharToByteCp1123.java \
 109.194 -	sun/io/CharToByteCp1124.java \
 109.195 -	sun/io/CharToByteCp1140.java \
 109.196 -	sun/io/CharToByteCp1141.java \
 109.197 -	sun/io/CharToByteCp1142.java \
 109.198 -	sun/io/CharToByteCp1143.java \
 109.199 -	sun/io/CharToByteCp1144.java \
 109.200 -	sun/io/CharToByteCp1145.java \
 109.201 -	sun/io/CharToByteCp1146.java \
 109.202 -	sun/io/CharToByteCp1147.java \
 109.203 -	sun/io/CharToByteCp1148.java \
 109.204 -	sun/io/CharToByteCp1149.java \
 109.205 -	sun/io/CharToByteCp1255.java \
 109.206 -	sun/io/CharToByteCp1256.java \
 109.207 -	sun/io/CharToByteCp1258.java \
 109.208 -	sun/io/CharToByteCp1381.java \
 109.209 -	sun/io/CharToByteCp1383.java \
 109.210 -	sun/io/CharToByteCp273.java \
 109.211 -	sun/io/CharToByteCp277.java \
 109.212 -	sun/io/CharToByteCp278.java \
 109.213 -	sun/io/CharToByteCp280.java \
 109.214 -	sun/io/CharToByteCp284.java \
 109.215 -	sun/io/CharToByteCp285.java \
 109.216 -	sun/io/CharToByteCp297.java \
 109.217 -	sun/io/CharToByteCp33722.java \
 109.218 -	sun/io/CharToByteCp420.java \
 109.219 -	sun/io/CharToByteCp424.java \
 109.220 -	sun/io/CharToByteCp437.java \
 109.221 -	sun/io/CharToByteCp500.java \
 109.222 -	sun/io/CharToByteCp737.java \
 109.223 -	sun/io/CharToByteCp775.java \
 109.224 -	sun/io/CharToByteCp834.java \
 109.225 -	sun/io/CharToByteCp838.java \
 109.226 -	sun/io/CharToByteCp850.java \
 109.227 -	sun/io/CharToByteCp852.java \
 109.228 -	sun/io/CharToByteCp855.java \
 109.229 -	sun/io/CharToByteCp856.java \
 109.230 -	sun/io/CharToByteCp857.java \
 109.231 -	sun/io/CharToByteCp858.java \
 109.232 -	sun/io/CharToByteCp860.java \
 109.233 -	sun/io/CharToByteCp861.java \
 109.234 -	sun/io/CharToByteCp862.java \
 109.235 -	sun/io/CharToByteCp863.java \
 109.236 -	sun/io/CharToByteCp864.java \
 109.237 -	sun/io/CharToByteCp865.java \
 109.238 -	sun/io/CharToByteCp866.java \
 109.239 -	sun/io/CharToByteCp868.java \
 109.240 -	sun/io/CharToByteCp869.java \
 109.241 -	sun/io/CharToByteCp870.java \
 109.242 -	sun/io/CharToByteCp871.java \
 109.243 -	sun/io/CharToByteCp874.java \
 109.244 -	sun/io/CharToByteCp875.java \
 109.245 -	sun/io/CharToByteCp918.java \
 109.246 -	sun/io/CharToByteCp921.java \
 109.247 -	sun/io/CharToByteCp922.java \
 109.248 -	sun/io/CharToByteCp930.java \
 109.249 -	sun/io/CharToByteCp933.java \
 109.250 -	sun/io/CharToByteCp935.java \
 109.251 -	sun/io/CharToByteCp937.java \
 109.252 -	sun/io/CharToByteCp939.java \
 109.253 -	sun/io/CharToByteCp942.java \
 109.254 -	sun/io/CharToByteCp942C.java \
 109.255 -	sun/io/CharToByteCp943.java \
 109.256 -	sun/io/CharToByteCp943C.java \
 109.257 -	sun/io/CharToByteCp948.java \
 109.258 -	sun/io/CharToByteCp949.java \
 109.259 -	sun/io/CharToByteCp949C.java \
 109.260 -	sun/io/CharToByteCp950.java \
 109.261 -	sun/io/CharToByteCp964.java \
 109.262 -	sun/io/CharToByteCp970.java \
 109.263 -	sun/io/CharToByteJIS0201.java \
 109.264 -	sun/io/CharToByteJIS0208.java \
 109.265 -	sun/io/CharToByteJIS0208_Solaris.java \
 109.266 -	sun/io/CharToByteJIS0212.java \
 109.267 -	sun/io/CharToByteJIS0212_Solaris.java \
 109.268 -	sun/io/CharToByteEUC_CN.java \
 109.269 -	sun/io/CharToByteEUC_JP.java \
 109.270 -	sun/io/CharToByteEUC_JP_LINUX.java \
 109.271 -	sun/io/CharToByteEUC_JP_Solaris.java \
 109.272 -	sun/io/CharToByteEUC_KR.java \
 109.273 -	sun/io/CharToByteEUC_TW.java \
 109.274 -	sun/io/CharToByteSJIS.java \
 109.275 -	sun/io/CharToBytePCK.java \
 109.276 -	sun/io/CharToByteGBK.java \
 109.277 -	sun/io/CharToByteISCII91.java \
 109.278 -	sun/io/CharToByteISO2022.java \
 109.279 -	sun/io/CharToByteISO2022CN_CNS.java \
 109.280 -	sun/io/CharToByteISO2022CN_GB.java \
 109.281 -	sun/io/CharToByteISO2022JP.java \
 109.282 -	sun/io/CharToByteISO2022KR.java \
 109.283 -	sun/io/CharToByteISO8859_3.java \
 109.284 -	sun/io/CharToByteISO8859_6.java \
 109.285 -	sun/io/CharToByteISO8859_8.java \
 109.286 -	sun/io/CharToByteJohab.java \
 109.287 -	sun/io/CharToByteMS874.java \
 109.288 -	sun/io/CharToByteMS932.java \
 109.289 -	sun/io/CharToByteMS936.java \
 109.290 -	sun/io/CharToByteMS949.java \
 109.291 -	sun/io/CharToByteMS950.java \
 109.292 -	sun/io/CharToByteMacArabic.java \
 109.293 -	sun/io/CharToByteMacCentralEurope.java \
 109.294 -	sun/io/CharToByteMacCroatian.java \
 109.295 -	sun/io/CharToByteMacCyrillic.java \
 109.296 -	sun/io/CharToByteMacDingbat.java \
 109.297 -	sun/io/CharToByteMacGreek.java \
 109.298 -	sun/io/CharToByteMacHebrew.java \
 109.299 -	sun/io/CharToByteMacIceland.java \
 109.300 -	sun/io/CharToByteMacRoman.java \
 109.301 -	sun/io/CharToByteMacRomania.java \
 109.302 -	sun/io/CharToByteMacSymbol.java \
 109.303 -	sun/io/CharToByteMacThai.java \
 109.304 -	sun/io/CharToByteMacTurkish.java \
 109.305 -	sun/io/CharToByteMacUkraine.java \
 109.306 -	sun/io/CharToByteTIS620.java
 109.307 -
 109.308 -FILES_gen_extcs = \
 109.309 -	sun/nio/cs/ext/IBM037.java \
 109.310 -	sun/nio/cs/ext/IBM1006.java \
 109.311 -	sun/nio/cs/ext/IBM1025.java \
 109.312 -	sun/nio/cs/ext/IBM1026.java \
 109.313 -	sun/nio/cs/ext/IBM1046.java \
 109.314 -	sun/nio/cs/ext/IBM1047.java \
 109.315 -	sun/nio/cs/ext/IBM1097.java \
 109.316 -	sun/nio/cs/ext/IBM1098.java \
 109.317 -	sun/nio/cs/ext/IBM1112.java \
 109.318 -	sun/nio/cs/ext/IBM1122.java \
 109.319 -	sun/nio/cs/ext/IBM1123.java \
 109.320 -	sun/nio/cs/ext/IBM1124.java \
 109.321 -	sun/nio/cs/ext/IBM1140.java \
 109.322 -	sun/nio/cs/ext/IBM1141.java \
 109.323 -	sun/nio/cs/ext/IBM1142.java \
 109.324 -	sun/nio/cs/ext/IBM1143.java \
 109.325 -	sun/nio/cs/ext/IBM1144.java \
 109.326 -	sun/nio/cs/ext/IBM1145.java \
 109.327 -	sun/nio/cs/ext/IBM1146.java \
 109.328 -	sun/nio/cs/ext/IBM1147.java \
 109.329 -	sun/nio/cs/ext/IBM1148.java \
 109.330 -	sun/nio/cs/ext/IBM1149.java \
 109.331 -	sun/nio/cs/ext/IBM273.java \
 109.332 -	sun/nio/cs/ext/IBM277.java \
 109.333 -	sun/nio/cs/ext/IBM278.java \
 109.334 -	sun/nio/cs/ext/IBM280.java \
 109.335 -	sun/nio/cs/ext/IBM284.java \
 109.336 -	sun/nio/cs/ext/IBM285.java \
 109.337 -	sun/nio/cs/ext/IBM297.java \
 109.338 -	sun/nio/cs/ext/IBM420.java \
 109.339 -	sun/nio/cs/ext/IBM424.java \
 109.340 -	sun/nio/cs/ext/IBM500.java \
 109.341 -	sun/nio/cs/ext/IBM838.java \
 109.342 -	sun/nio/cs/ext/IBM856.java \
 109.343 -	sun/nio/cs/ext/IBM860.java \
 109.344 -	sun/nio/cs/ext/IBM861.java \
 109.345 -	sun/nio/cs/ext/IBM863.java \
 109.346 -	sun/nio/cs/ext/IBM864.java \
 109.347 -	sun/nio/cs/ext/IBM865.java \
 109.348 -	sun/nio/cs/ext/IBM868.java \
 109.349 -	sun/nio/cs/ext/IBM869.java \
 109.350 -	sun/nio/cs/ext/IBM870.java \
 109.351 -	sun/nio/cs/ext/IBM871.java \
 109.352 -	sun/nio/cs/ext/IBM875.java \
 109.353 -	sun/nio/cs/ext/IBM918.java \
 109.354 -	sun/nio/cs/ext/IBM921.java \
 109.355 -	sun/nio/cs/ext/IBM922.java \
 109.356 -	sun/nio/cs/ext/ISO_8859_11.java \
 109.357 -	sun/nio/cs/ext/ISO_8859_3.java \
 109.358 -	sun/nio/cs/ext/ISO_8859_6.java \
 109.359 -	sun/nio/cs/ext/ISO_8859_8.java \
 109.360 -	sun/nio/cs/ext/MS1255.java \
 109.361 -	sun/nio/cs/ext/MS1256.java \
 109.362 -	sun/nio/cs/ext/MS1258.java \
 109.363 -	sun/nio/cs/ext/MS874.java \
 109.364 -	sun/nio/cs/ext/MacArabic.java \
 109.365 -	sun/nio/cs/ext/MacCentralEurope.java \
 109.366 -	sun/nio/cs/ext/MacCroatian.java \
 109.367 -	sun/nio/cs/ext/MacCyrillic.java \
 109.368 -	sun/nio/cs/ext/MacDingbat.java \
 109.369 -	sun/nio/cs/ext/MacGreek.java \
 109.370 -	sun/nio/cs/ext/MacHebrew.java \
 109.371 -	sun/nio/cs/ext/MacIceland.java \
 109.372 -	sun/nio/cs/ext/MacRoman.java \
 109.373 -	sun/nio/cs/ext/MacRomania.java \
 109.374 -	sun/nio/cs/ext/MacSymbol.java \
 109.375 -	sun/nio/cs/ext/MacThai.java \
 109.376 -	sun/nio/cs/ext/MacTurkish.java \
 109.377 -	sun/nio/cs/ext/MacUkraine.java \
 109.378 -	sun/nio/cs/ext/TIS_620.java \
 109.379 -        sun/nio/cs/ext/EUC_TWMapping.java \
 109.380 -	sun/nio/cs/ext/IBM1381.java \
 109.381 -	sun/nio/cs/ext/IBM1383.java \
 109.382 -	sun/nio/cs/ext/IBM930.java \
 109.383 -	sun/nio/cs/ext/IBM933.java \
 109.384 -	sun/nio/cs/ext/IBM935.java \
 109.385 -	sun/nio/cs/ext/IBM937.java \
 109.386 -	sun/nio/cs/ext/IBM939.java \
 109.387 -	sun/nio/cs/ext/IBM942.java \
 109.388 -	sun/nio/cs/ext/IBM943.java \
 109.389 -	sun/nio/cs/ext/IBM948.java \
 109.390 -	sun/nio/cs/ext/IBM949.java \
 109.391 -	sun/nio/cs/ext/IBM950.java \
 109.392 -	sun/nio/cs/ext/IBM970.java \
 109.393 -	sun/nio/cs/ext/EUC_CN.java \
 109.394 -	sun/nio/cs/ext/EUC_KR.java \
 109.395 -	sun/nio/cs/ext/Johab.java \
 109.396 -	sun/nio/cs/ext/MS932.java \
 109.397 -	sun/nio/cs/ext/MS936.java \
 109.398 -	sun/nio/cs/ext/MS949.java \
 109.399 -	sun/nio/cs/ext/MS950.java \
 109.400 -	sun/nio/cs/ext/GBK.java
 109.401 -
 109.402 -FILES_java = $(FILES_src) $(FILES_gen_extcs)
 109.403 -
   110.1 --- a/make/sun/nio/Makefile	Thu Jan 21 11:12:37 2010 -0800
   110.2 +++ b/make/sun/nio/Makefile	Fri Jan 22 09:34:17 2010 -0800
   110.3 @@ -1,5 +1,5 @@
   110.4  #
   110.5 -# Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
   110.6 +# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
   110.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   110.8  #
   110.9  # This code is free software; you can redistribute it and/or modify it
  110.10 @@ -23,88 +23,12 @@
  110.11  # have any questions.
  110.12  #
  110.13  
  110.14 -#
  110.15 -# Makefile for character converters.
  110.16 -#
  110.17 -
  110.18  BUILDDIR = ../..
  110.19 -
  110.20  PACKAGE = sun.nio
  110.21  PRODUCT = sun
  110.22 -
  110.23 -# This re-directs all the class files to a separate location
  110.24 -CLASSDESTDIR = $(TEMPDIR)/classes
  110.25 -
  110.26 -OTHER_JAVACFLAGS += -Xlint:serial -Werror
  110.27  include $(BUILDDIR)/common/Defs.gmk
  110.28  
  110.29 -#
  110.30 -# Files
  110.31 -#
  110.32 -include FILES_java.gmk
  110.33 -AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext
  110.34 +SUBDIRS = cs
  110.35 +all build clean clobber::
  110.36 +	$(SUBDIRS-loop)
  110.37  
  110.38 -# For Cygwin, command line arguments that are paths must be converted to
  110.39 -# windows style paths. These paths cannot be used as targets, however, because 
  110.40 -# the ":" in them  will interfere with GNU Make rules, generating "multiple
  110.41 -# target pattern" errors.
  110.42 -
  110.43 -# this define is for the rule:
  110.44 -CHARSETS_JAR = $(LIBDIR)/charsets.jar
  110.45 -
  110.46 -# extcs
  110.47 -FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
  110.48 -
  110.49 -#
  110.50 -# Rules
  110.51 -#
  110.52 -include $(BUILDDIR)/common/Classes.gmk
  110.53 -
  110.54 -build: $(FILES_genout_extcs) $(CHARSETS_JAR)
  110.55 -
  110.56 -#
  110.57 -# Extra rules to build character converters.
  110.58 -
  110.59 -SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
  110.60 -SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
  110.61 -
  110.62 -GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
  110.63 -GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
  110.64 -GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
  110.65 -
  110.66 -FILES_MAP = $(GENCSDATASRC)/sjis0213.map
  110.67 -FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
  110.68 -CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
  110.69 -
  110.70 -$(FILES_DAT): $(FILES_MAP)
  110.71 -	@$(prep-target)
  110.72 -	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
  110.73 -		$(FILES_MAP) $(FILES_DAT) sjis0213
  110.74 -
  110.75 -
  110.76 -$(FILES_genout_extcs): \
  110.77 -                $(GENCSDATASRC)/SingleByte-X.java.template  \
  110.78 -		$(GENCSDATASRC)/DoubleByte-X.java.template \
  110.79 -		$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
  110.80 -	@$(prep-target)
  110.81 -	$(RM) -r $(GENCSEXT)
  110.82 -	$(MKDIR) -p $(GENCSEXT)
  110.83 -	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE)	$(GENCSDATASRC) $(GENCSEXT) extsbcs
  110.84 -	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
  110.85 -		$(GENCSSRCDIR)/GenerateEUC_TW.java
  110.86 -	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
  110.87 -
  110.88 -$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
  110.89 -  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
  110.90 -	$(install-file)
  110.91 -
  110.92 -$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
  110.93 -	$(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \
  110.94 -	      -C $(CLASSDESTDIR) sun \
  110.95 -	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
  110.96 -	      $(BOOT_JAR_JFLAGS)
  110.97 -	@$(java-vm-cleanup)
  110.98 -
  110.99 -clean::
 110.100 -	$(RM) -r $(CLASSDESTDIR)
 110.101 -	$(RM) $(CHARSETS_JAR)
   111.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   111.2 +++ b/make/sun/nio/cs/FILES_java.gmk	Fri Jan 22 09:34:17 2010 -0800
   111.3 @@ -0,0 +1,400 @@
   111.4 +#
   111.5 +# Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
   111.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   111.7 +#
   111.8 +# This code is free software; you can redistribute it and/or modify it
   111.9 +# under the terms of the GNU General Public License version 2 only, as
  111.10 +# published by the Free Software Foundation.  Sun designates this
  111.11 +# particular file as subject to the "Classpath" exception as provided
  111.12 +# by Sun in the LICENSE file that accompanied this code.
  111.13 +#
  111.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
  111.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  111.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  111.17 +# version 2 for more details (a copy is included in the LICENSE file that
  111.18 +# accompanied this code).
  111.19 +#
  111.20 +# You should have received a copy of the GNU General Public License version
  111.21 +# 2 along with this work; if not, write to the Free Software Foundation,
  111.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  111.23 +#
  111.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  111.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
  111.26 +# have any questions.
  111.27 +#
  111.28 +
  111.29 +#
  111.30 +# Character converters for lib/charsets.jar
  111.31 +#
  111.32 +# Core character converters are built from make/java/java.
  111.33 +#
  111.34 +
  111.35 +FILES_src = \
  111.36 +	sun/io/ByteToCharDoubleByte.java \
  111.37 +	sun/io/ByteToCharDBCS_ASCII.java \
  111.38 +	sun/io/ByteToCharDBCS_EBCDIC.java \
  111.39 +	sun/io/ByteToCharEUC.java \
  111.40 +	sun/io/CharToByteDoubleByte.java \
  111.41 +	sun/io/CharToByteDBCS_ASCII.java \
  111.42 +	sun/io/CharToByteDBCS_EBCDIC.java \
  111.43 +	sun/io/CharToByteEUC.java \
  111.44 +	sun/io/ByteToCharBig5.java \
  111.45 +	sun/io/ByteToCharBig5_Solaris.java \
  111.46 +	sun/io/ByteToCharBig5_HKSCS.java \
  111.47 +	sun/io/ByteToCharMS950_HKSCS.java \
  111.48 +	sun/io/ByteToCharHKSCS.java \
  111.49 +	sun/io/ByteToCharHKSCS_2001.java \
  111.50 +	sun/io/ByteToCharGB18030.java \
  111.51 +	sun/io/ByteToCharGB18030DB.java \
  111.52 +	sun/io/ByteToCharCp037.java \
  111.53 +	sun/io/ByteToCharCp1006.java \
  111.54 +	sun/io/ByteToCharCp1025.java \
  111.55 +	sun/io/ByteToCharCp1026.java \
  111.56 +	sun/io/ByteToCharCp1046.java \
  111.57 +	sun/io/ByteToCharCp1047.java \
  111.58 +	sun/io/ByteToCharCp1097.java \
  111.59 +	sun/io/ByteToCharCp1098.java \
  111.60 +	sun/io/ByteToCharCp1112.java \
  111.61 +	sun/io/ByteToCharCp1122.java \
  111.62 +	sun/io/ByteToCharCp1123.java \
  111.63 +	sun/io/ByteToCharCp1124.java \
  111.64 +	sun/io/ByteToCharCp1140.java \
  111.65 +	sun/io/ByteToCharCp1141.java \
  111.66 +	sun/io/ByteToCharCp1142.java \
  111.67 +	sun/io/ByteToCharCp1143.java \
  111.68 +	sun/io/ByteToCharCp1144.java \
  111.69 +	sun/io/ByteToCharCp1145.java \
  111.70 +	sun/io/ByteToCharCp1146.java \
  111.71 +	sun/io/ByteToCharCp1147.java \
  111.72 +	sun/io/ByteToCharCp1148.java \
  111.73 +	sun/io/ByteToCharCp1149.java \
  111.74 +	sun/io/ByteToCharCp1255.java \
  111.75 +	sun/io/ByteToCharCp1256.java \
  111.76 +	sun/io/ByteToCharCp1258.java \
  111.77 +	sun/io/ByteToCharCp1381.java \
  111.78 +	sun/io/ByteToCharCp1383.java \
  111.79 +	sun/io/ByteToCharCp273.java \
  111.80 +	sun/io/ByteToCharCp277.java \
  111.81 +	sun/io/ByteToCharCp278.java \
  111.82 +	sun/io/ByteToCharCp280.java \
  111.83 +	sun/io/ByteToCharCp284.java \
  111.84 +	sun/io/ByteToCharCp285.java \
  111.85 +	sun/io/ByteToCharCp297.java \
  111.86 +	sun/io/ByteToCharCp33722.java \
  111.87 +	sun/io/ByteToCharCp420.java \
  111.88 +	sun/io/ByteToCharCp424.java \
  111.89 +	sun/io/ByteToCharCp437.java \
  111.90 +	sun/io/ByteToCharCp500.java \
  111.91 +	sun/io/ByteToCharCp737.java \
  111.92 +	sun/io/ByteToCharCp775.java \
  111.93 +	sun/io/ByteToCharCp834.java \
  111.94 +	sun/io/ByteToCharCp838.java \
  111.95 +	sun/io/ByteToCharCp850.java \
  111.96 +	sun/io/ByteToCharCp852.java \
  111.97 +	sun/io/ByteToCharCp855.java \
  111.98 +	sun/io/ByteToCharCp856.java \
  111.99 +	sun/io/ByteToCharCp857.java \
 111.100 +	sun/io/ByteToCharCp858.java \
 111.101 +	sun/io/ByteToCharCp860.java \
 111.102 +	sun/io/ByteToCharCp861.java \
 111.103 +	sun/io/ByteToCharCp862.java \
 111.104 +	sun/io/ByteToCharCp863.java \
 111.105 +	sun/io/ByteToCharCp864.java \
 111.106 +	sun/io/ByteToCharCp865.java \
 111.107 +	sun/io/ByteToCharCp866.java \
 111.108 +	sun/io/ByteToCharCp868.java \
 111.109 +	sun/io/ByteToCharCp869.java \
 111.110 +	sun/io/ByteToCharCp870.java \
 111.111 +	sun/io/ByteToCharCp871.java \
 111.112 +	sun/io/ByteToCharCp874.java \
 111.113 +	sun/io/ByteToCharCp875.java \
 111.114 +	sun/io/ByteToCharCp918.java \
 111.115 +	sun/io/ByteToCharCp921.java \
 111.116 +	sun/io/ByteToCharCp922.java \
 111.117 +	sun/io/ByteToCharCp930.java \
 111.118 +	sun/io/ByteToCharCp933.java \
 111.119 +	sun/io/ByteToCharCp935.java \
 111.120 +	sun/io/ByteToCharCp937.java \
 111.121 +	sun/io/ByteToCharCp939.java \
 111.122 +	sun/io/ByteToCharCp942.java \
 111.123 +	sun/io/ByteToCharCp942C.java \
 111.124 +	sun/io/ByteToCharCp943.java \
 111.125 +	sun/io/ByteToCharCp943C.java \
 111.126 +	sun/io/ByteToCharCp948.java \
 111.127 +	sun/io/ByteToCharCp949.java \
 111.128 +	sun/io/ByteToCharCp949C.java \
 111.129 +	sun/io/ByteToCharCp950.java \
 111.130 +	sun/io/ByteToCharCp964.java \
 111.131 +	sun/io/ByteToCharCp970.java \
 111.132 +	sun/io/ByteToCharJIS0201.java \
 111.133 +	sun/io/ByteToCharJIS0208.java \
 111.134 +	sun/io/ByteToCharJIS0208_Solaris.java \
 111.135 +	sun/io/ByteToCharJIS0212.java \
 111.136 +	sun/io/ByteToCharJIS0212_Solaris.java \
 111.137 +	sun/io/ByteToCharEUC_CN.java \
 111.138 +	sun/io/ByteToCharEUC_JP.java \
 111.139 +	sun/io/ByteToCharEUC_JP_LINUX.java \
 111.140 +	sun/io/ByteToCharEUC_JP_Solaris.java \
 111.141 +	sun/io/ByteToCharEUC_KR.java \
 111.142 +	sun/io/ByteToCharEUC_TW.java \
 111.143 +	sun/io/ByteToCharSJIS.java \
 111.144 +	sun/io/ByteToCharPCK.java \
 111.145 +	sun/io/ByteToCharGBK.java \
 111.146 +	sun/io/ByteToCharISCII91.java \
 111.147 +	sun/io/ByteToCharISO2022.java \
 111.148 +	sun/io/ByteToCharISO2022CN.java \
 111.149 +	sun/io/ByteToCharISO2022JP.java \
 111.150 +	sun/io/ByteToCharISO2022KR.java \
 111.151 +	sun/io/ByteToCharISO8859_3.java \
 111.152 +	sun/io/ByteToCharISO8859_6.java \
 111.153 +	sun/io/ByteToCharISO8859_8.java \
 111.154 +	sun/io/ByteToCharJISAutoDetect.java \
 111.155 +	sun/io/ByteToCharJohab.java \
 111.156 +	sun/io/ByteToCharMS874.java \
 111.157 +	sun/io/ByteToCharMS932.java \
 111.158 +	sun/io/ByteToCharMS936.java \
 111.159 +	sun/io/ByteToCharMS949.java \
 111.160 +	sun/io/ByteToCharMS950.java \
 111.161 +	sun/io/ByteToCharMacArabic.java \
 111.162 +	sun/io/ByteToCharMacCentralEurope.java \
 111.163 +	sun/io/ByteToCharMacCroatian.java \
 111.164 +	sun/io/ByteToCharMacCyrillic.java \
 111.165 +	sun/io/ByteToCharMacDingbat.java \
 111.166 +	sun/io/ByteToCharMacGreek.java \
 111.167 +	sun/io/ByteToCharMacHebrew.java \
 111.168 +	sun/io/ByteToCharMacIceland.java \
 111.169 +	sun/io/ByteToCharMacRoman.java \
 111.170 +	sun/io/ByteToCharMacRomania.java \
 111.171 +	sun/io/ByteToCharMacSymbol.java \
 111.172 +	sun/io/ByteToCharMacThai.java \
 111.173 +	sun/io/ByteToCharMacTurkish.java \
 111.174 +	sun/io/ByteToCharMacUkraine.java \
 111.175 +	sun/io/ByteToCharTIS620.java \
 111.176 +	sun/io/CharToByteBig5.java \
 111.177 +	sun/io/CharToByteBig5_Solaris.java \
 111.178 +	sun/io/CharToByteBig5_HKSCS.java \
 111.179 +	sun/io/CharToByteHKSCS.java \
 111.180 +	sun/io/CharToByteHKSCS_2001.java \
 111.181 +	sun/io/CharToByteMS950_HKSCS.java \
 111.182 +	sun/io/CharToByteGB18030.java \
 111.183 +	sun/io/CharToByteCp037.java \
 111.184 +	sun/io/CharToByteCp1006.java \
 111.185 +	sun/io/CharToByteCp1025.java \
 111.186 +	sun/io/CharToByteCp1026.java \
 111.187 +	sun/io/CharToByteCp1046.java \
 111.188 +	sun/io/CharToByteCp1047.java \
 111.189 +	sun/io/CharToByteCp1097.java \
 111.190 +	sun/io/CharToByteCp1098.java \
 111.191 +	sun/io/CharToByteCp1112.java \
 111.192 +	sun/io/CharToByteCp1122.java \
 111.193 +	sun/io/CharToByteCp1123.java \
 111.194 +	sun/io/CharToByteCp1124.java \
 111.195 +	sun/io/CharToByteCp1140.java \
 111.196 +	sun/io/CharToByteCp1141.java \
 111.197 +	sun/io/CharToByteCp1142.java \
 111.198 +	sun/io/CharToByteCp1143.java \
 111.199 +	sun/io/CharToByteCp1144.java \
 111.200 +	sun/io/CharToByteCp1145.java \
 111.201 +	sun/io/CharToByteCp1146.java \
 111.202 +	sun/io/CharToByteCp1147.java \
 111.203 +	sun/io/CharToByteCp1148.java \
 111.204 +	sun/io/CharToByteCp1149.java \
 111.205 +	sun/io/CharToByteCp1255.java \
 111.206 +	sun/io/CharToByteCp1256.java \
 111.207 +	sun/io/CharToByteCp1258.java \
 111.208 +	sun/io/CharToByteCp1381.java \
 111.209 +	sun/io/CharToByteCp1383.java \
 111.210 +	sun/io/CharToByteCp273.java \
 111.211 +	sun/io/CharToByteCp277.java \
 111.212 +	sun/io/CharToByteCp278.java \
 111.213 +	sun/io/CharToByteCp280.java \
 111.214 +	sun/io/CharToByteCp284.java \
 111.215 +	sun/io/CharToByteCp285.java \
 111.216 +	sun/io/CharToByteCp297.java \
 111.217 +	sun/io/CharToByteCp33722.java \
 111.218 +	sun/io/CharToByteCp420.java \
 111.219 +	sun/io/CharToByteCp424.java \
 111.220 +	sun/io/CharToByteCp437.java \
 111.221 +	sun/io/CharToByteCp500.java \
 111.222 +	sun/io/CharToByteCp737.java \
 111.223 +	sun/io/CharToByteCp775.java \
 111.224 +	sun/io/CharToByteCp834.java \
 111.225 +	sun/io/CharToByteCp838.java \
 111.226 +	sun/io/CharToByteCp850.java \
 111.227 +	sun/io/CharToByteCp852.java \
 111.228 +	sun/io/CharToByteCp855.java \
 111.229 +	sun/io/CharToByteCp856.java \
 111.230 +	sun/io/CharToByteCp857.java \
 111.231 +	sun/io/CharToByteCp858.java \
 111.232 +	sun/io/CharToByteCp860.java \
 111.233 +	sun/io/CharToByteCp861.java \
 111.234 +	sun/io/CharToByteCp862.java \
 111.235 +	sun/io/CharToByteCp863.java \
 111.236 +	sun/io/CharToByteCp864.java \
 111.237 +	sun/io/CharToByteCp865.java \
 111.238 +	sun/io/CharToByteCp866.java \
 111.239 +	sun/io/CharToByteCp868.java \
 111.240 +	sun/io/CharToByteCp869.java \
 111.241 +	sun/io/CharToByteCp870.java \
 111.242 +	sun/io/CharToByteCp871.java \
 111.243 +	sun/io/CharToByteCp874.java \
 111.244 +	sun/io/CharToByteCp875.java \
 111.245 +	sun/io/CharToByteCp918.java \
 111.246 +	sun/io/CharToByteCp921.java \
 111.247 +	sun/io/CharToByteCp922.java \
 111.248 +	sun/io/CharToByteCp930.java \
 111.249 +	sun/io/CharToByteCp933.java \
 111.250 +	sun/io/CharToByteCp935.java \
 111.251 +	sun/io/CharToByteCp937.java \
 111.252 +	sun/io/CharToByteCp939.java \
 111.253 +	sun/io/CharToByteCp942.java \
 111.254 +	sun/io/CharToByteCp942C.java \
 111.255 +	sun/io/CharToByteCp943.java \
 111.256 +	sun/io/CharToByteCp943C.java \
 111.257 +	sun/io/CharToByteCp948.java \
 111.258 +	sun/io/CharToByteCp949.java \
 111.259 +	sun/io/CharToByteCp949C.java \
 111.260 +	sun/io/CharToByteCp950.java \
 111.261 +	sun/io/CharToByteCp964.java \
 111.262 +	sun/io/CharToByteCp970.java \
 111.263 +	sun/io/CharToByteJIS0201.java \
 111.264 +	sun/io/CharToByteJIS0208.java \
 111.265 +	sun/io/CharToByteJIS0208_Solaris.java \
 111.266 +	sun/io/CharToByteJIS0212.java \
 111.267 +	sun/io/CharToByteJIS0212_Solaris.java \
 111.268 +	sun/io/CharToByteEUC_CN.java \
 111.269 +	sun/io/CharToByteEUC_JP.java \
 111.270 +	sun/io/CharToByteEUC_JP_LINUX.java \
 111.271 +	sun/io/CharToByteEUC_JP_Solaris.java \
 111.272 +	sun/io/CharToByteEUC_KR.java \
 111.273 +	sun/io/CharToByteEUC_TW.java \
 111.274 +	sun/io/CharToByteSJIS.java \
 111.275 +	sun/io/CharToBytePCK.java \
 111.276 +	sun/io/CharToByteGBK.java \
 111.277 +	sun/io/CharToByteISCII91.java \
 111.278 +	sun/io/CharToByteISO2022.java \
 111.279 +	sun/io/CharToByteISO2022CN_CNS.java \
 111.280 +	sun/io/CharToByteISO2022CN_GB.java \
 111.281 +	sun/io/CharToByteISO2022JP.java \
 111.282 +	sun/io/CharToByteISO2022KR.java \
 111.283 +	sun/io/CharToByteISO8859_3.java \
 111.284 +	sun/io/CharToByteISO8859_6.java \
 111.285 +	sun/io/CharToByteISO8859_8.java \
 111.286 +	sun/io/CharToByteJohab.java \
 111.287 +	sun/io/CharToByteMS874.java \
 111.288 +	sun/io/CharToByteMS932.java \
 111.289 +	sun/io/CharToByteMS936.java \
 111.290 +	sun/io/CharToByteMS949.java \
 111.291 +	sun/io/CharToByteMS950.java \
 111.292 +	sun/io/CharToByteMacArabic.java \
 111.293 +	sun/io/CharToByteMacCentralEurope.java \
 111.294 +	sun/io/CharToByteMacCroatian.java \
 111.295 +	sun/io/CharToByteMacCyrillic.java \
 111.296 +	sun/io/CharToByteMacDingbat.java \
 111.297 +	sun/io/CharToByteMacGreek.java \
 111.298 +	sun/io/CharToByteMacHebrew.java \
 111.299 +	sun/io/CharToByteMacIceland.java \
 111.300 +	sun/io/CharToByteMacRoman.java \
 111.301 +	sun/io/CharToByteMacRomania.java \
 111.302 +	sun/io/CharToByteMacSymbol.java \
 111.303 +	sun/io/CharToByteMacThai.java \
 111.304 +	sun/io/CharToByteMacTurkish.java \
 111.305 +	sun/io/CharToByteMacUkraine.java \
 111.306 +	sun/io/CharToByteTIS620.java
 111.307 +
 111.308 +FILES_gen_extcs = \
 111.309 +	sun/nio/cs/ext/IBM037.java \
 111.310 +	sun/nio/cs/ext/IBM1006.java \
 111.311 +	sun/nio/cs/ext/IBM1025.java \
 111.312 +	sun/nio/cs/ext/IBM1026.java \
 111.313 +	sun/nio/cs/ext/IBM1046.java \
 111.314 +	sun/nio/cs/ext/IBM1047.java \
 111.315 +	sun/nio/cs/ext/IBM1097.java \
 111.316 +	sun/nio/cs/ext/IBM1098.java \
 111.317 +	sun/nio/cs/ext/IBM1112.java \
 111.318 +	sun/nio/cs/ext/IBM1122.java \
 111.319 +	sun/nio/cs/ext/IBM1123.java \
 111.320 +	sun/nio/cs/ext/IBM1124.java \
 111.321 +	sun/nio/cs/ext/IBM1140.java \
 111.322 +	sun/nio/cs/ext/IBM1141.java \
 111.323 +	sun/nio/cs/ext/IBM1142.java \
 111.324 +	sun/nio/cs/ext/IBM1143.java \
 111.325 +	sun/nio/cs/ext/IBM1144.java \
 111.326 +	sun/nio/cs/ext/IBM1145.java \
 111.327 +	sun/nio/cs/ext/IBM1146.java \
 111.328 +	sun/nio/cs/ext/IBM1147.java \
 111.329 +	sun/nio/cs/ext/IBM1148.java \
 111.330 +	sun/nio/cs/ext/IBM1149.java \
 111.331 +	sun/nio/cs/ext/IBM273.java \
 111.332 +	sun/nio/cs/ext/IBM277.java \
 111.333 +	sun/nio/cs/ext/IBM278.java \
 111.334 +	sun/nio/cs/ext/IBM280.java \
 111.335 +	sun/nio/cs/ext/IBM284.java \
 111.336 +	sun/nio/cs/ext/IBM285.java \
 111.337 +	sun/nio/cs/ext/IBM297.java \
 111.338 +	sun/nio/cs/ext/IBM420.java \
 111.339 +	sun/nio/cs/ext/IBM424.java \
 111.340 +	sun/nio/cs/ext/IBM500.java \
 111.341 +	sun/nio/cs/ext/IBM838.java \
 111.342 +	sun/nio/cs/ext/IBM856.java \
 111.343 +	sun/nio/cs/ext/IBM860.java \
 111.344 +	sun/nio/cs/ext/IBM861.java \
 111.345 +	sun/nio/cs/ext/IBM863.java \
 111.346 +	sun/nio/cs/ext/IBM864.java \
 111.347 +	sun/nio/cs/ext/IBM865.java \
 111.348 +	sun/nio/cs/ext/IBM868.java \
 111.349 +	sun/nio/cs/ext/IBM869.java \
 111.350 +	sun/nio/cs/ext/IBM870.java \
 111.351 +	sun/nio/cs/ext/IBM871.java \
 111.352 +	sun/nio/cs/ext/IBM875.java \
 111.353 +	sun/nio/cs/ext/IBM918.java \
 111.354 +	sun/nio/cs/ext/IBM921.java \
 111.355 +	sun/nio/cs/ext/IBM922.java \
 111.356 +	sun/nio/cs/ext/ISO_8859_11.java \
 111.357 +	sun/nio/cs/ext/ISO_8859_3.java \
 111.358 +	sun/nio/cs/ext/ISO_8859_6.java \
 111.359 +	sun/nio/cs/ext/ISO_8859_8.java \
 111.360 +	sun/nio/cs/ext/MS1255.java \
 111.361 +	sun/nio/cs/ext/MS1256.java \
 111.362 +	sun/nio/cs/ext/MS1258.java \
 111.363 +	sun/nio/cs/ext/MS874.java \
 111.364 +	sun/nio/cs/ext/MacArabic.java \
 111.365 +	sun/nio/cs/ext/MacCentralEurope.java \
 111.366 +	sun/nio/cs/ext/MacCroatian.java \
 111.367 +	sun/nio/cs/ext/MacCyrillic.java \
 111.368 +	sun/nio/cs/ext/MacDingbat.java \
 111.369 +	sun/nio/cs/ext/MacGreek.java \
 111.370 +	sun/nio/cs/ext/MacHebrew.java \
 111.371 +	sun/nio/cs/ext/MacIceland.java \
 111.372 +	sun/nio/cs/ext/MacRoman.java \
 111.373 +	sun/nio/cs/ext/MacRomania.java \
 111.374 +	sun/nio/cs/ext/MacSymbol.java \
 111.375 +	sun/nio/cs/ext/MacThai.java \
 111.376 +	sun/nio/cs/ext/MacTurkish.java \
 111.377 +	sun/nio/cs/ext/MacUkraine.java \
 111.378 +	sun/nio/cs/ext/TIS_620.java \
 111.379 +        sun/nio/cs/ext/EUC_TWMapping.java \
 111.380 +	sun/nio/cs/ext/IBM1381.java \
 111.381 +	sun/nio/cs/ext/IBM1383.java \
 111.382 +	sun/nio/cs/ext/IBM930.java \
 111.383 +	sun/nio/cs/ext/IBM933.java \
 111.384 +	sun/nio/cs/ext/IBM935.java \
 111.385 +	sun/nio/cs/ext/IBM937.java \
 111.386 +	sun/nio/cs/ext/IBM939.java \
 111.387 +	sun/nio/cs/ext/IBM942.java \
 111.388 +	sun/nio/cs/ext/IBM943.java \
 111.389 +	sun/nio/cs/ext/IBM948.java \
 111.390 +	sun/nio/cs/ext/IBM949.java \
 111.391 +	sun/nio/cs/ext/IBM950.java \
 111.392 +	sun/nio/cs/ext/IBM970.java \
 111.393 +	sun/nio/cs/ext/EUC_CN.java \
 111.394 +	sun/nio/cs/ext/EUC_KR.java \
 111.395 +	sun/nio/cs/ext/Johab.java \
 111.396 +	sun/nio/cs/ext/MS932.java \
 111.397 +	sun/nio/cs/ext/MS936.java \
 111.398 +	sun/nio/cs/ext/MS949.java \
 111.399 +	sun/nio/cs/ext/MS950.java \
 111.400 +	sun/nio/cs/ext/GBK.java
 111.401 +
 111.402 +FILES_java = $(FILES_src) $(FILES_gen_extcs)
 111.403 +
   112.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   112.2 +++ b/make/sun/nio/cs/Makefile	Fri Jan 22 09:34:17 2010 -0800
   112.3 @@ -0,0 +1,112 @@
   112.4 +#
   112.5 +# Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
   112.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   112.7 +#
   112.8 +# This code is free software; you can redistribute it and/or modify it
   112.9 +# under the terms of the GNU General Public License version 2 only, as
  112.10 +# published by the Free Software Foundation.  Sun designates this
  112.11 +# particular file as subject to the "Classpath" exception as provided
  112.12 +# by Sun in the LICENSE file that accompanied this code.
  112.13 +#
  112.14 +# This code is distributed in the hope that it will be useful, but WITHOUT
  112.15 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  112.16 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  112.17 +# version 2 for more details (a copy is included in the LICENSE file that
  112.18 +# accompanied this code).
  112.19 +#
  112.20 +# You should have received a copy of the GNU General Public License version
  112.21 +# 2 along with this work; if not, write to the Free Software Foundation,
  112.22 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  112.23 +#
  112.24 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  112.25 +# CA 95054 USA or visit www.sun.com if you need additional information or
  112.26 +# have any questions.
  112.27 +#
  112.28 +
  112.29 +#
  112.30 +# Makefile for character converters.
  112.31 +#
  112.32 +
  112.33 +BUILDDIR = ../../..
  112.34 +
  112.35 +# charsets should be separated from nio module 
  112.36 +MODULE  = charsets
  112.37 +PACKAGE = sun.nio
  112.38 +PRODUCT = sun
  112.39 +
  112.40 +# This re-directs all the class files to a separate location
  112.41 +CLASSDESTDIR = $(TEMPDIR)/classes
  112.42 +
  112.43 +OTHER_JAVACFLAGS += -Xlint:serial -Werror
  112.44 +include $(BUILDDIR)/common/Defs.gmk
  112.45 +
  112.46 +#
  112.47 +# Files
  112.48 +#
  112.49 +include FILES_java.gmk
  112.50 +AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext
  112.51 +
  112.52 +# For Cygwin, command line arguments that are paths must be converted to
  112.53 +# windows style paths. These paths cannot be used as targets, however, because 
  112.54 +# the ":" in them  will interfere with GNU Make rules, generating "multiple
  112.55 +# target pattern" errors.
  112.56 +
  112.57 +# this define is for the rule:
  112.58 +CHARSETS_JAR = $(LIBDIR)/charsets.jar
  112.59 +
  112.60 +# extcs
  112.61 +FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
  112.62 +
  112.63 +#
  112.64 +# Rules
  112.65 +#
  112.66 +include $(BUILDDIR)/common/Classes.gmk
  112.67 +
  112.68 +build: $(FILES_genout_extcs) $(CHARSETS_JAR)
  112.69 +
  112.70 +#
  112.71 +# Extra rules to build character converters.
  112.72 +
  112.73 +SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
  112.74 +SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
  112.75 +
  112.76 +GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
  112.77 +GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
  112.78 +GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
  112.79 +
  112.80 +FILES_MAP = $(GENCSDATASRC)/sjis0213.map
  112.81 +FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
  112.82 +CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
  112.83 +
  112.84 +$(FILES_DAT): $(FILES_MAP)
  112.85 +	@$(prep-target)
  112.86 +	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
  112.87 +		$(FILES_MAP) $(FILES_DAT) sjis0213
  112.88 +
  112.89 +
  112.90 +$(FILES_genout_extcs): \
  112.91 +                $(GENCSDATASRC)/SingleByte-X.java.template  \
  112.92 +		$(GENCSDATASRC)/DoubleByte-X.java.template \
  112.93 +		$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
  112.94 +	@$(prep-target)
  112.95 +	$(RM) -r $(GENCSEXT)
  112.96 +	$(MKDIR) -p $(GENCSEXT)
  112.97 +	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE)	$(GENCSDATASRC) $(GENCSEXT) extsbcs
  112.98 +	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
  112.99 +		$(GENCSSRCDIR)/GenerateEUC_TW.java
 112.100 +	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
 112.101 +
 112.102 +$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
 112.103 +  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
 112.104 +	$(install-file)
 112.105 +
 112.106 +$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
 112.107 +	$(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \
 112.108 +	      -C $(CLASSDESTDIR) sun \
 112.109 +	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
 112.110 +	      $(BOOT_JAR_JFLAGS)
 112.111 +	@$(java-vm-cleanup)
 112.112 +
 112.113 +clean::
 112.114 +	$(RM) -r $(CLASSDESTDIR)
 112.115 +	$(RM) $(CHARSETS_JAR)
   113.1 --- a/make/sun/org/mozilla/javascript/Makefile	Thu Jan 21 11:12:37 2010 -0800
   113.2 +++ b/make/sun/org/mozilla/javascript/Makefile	Fri Jan 22 09:34:17 2010 -0800
   113.3 @@ -28,6 +28,7 @@
   113.4  #
   113.5  
   113.6  BUILDDIR = ../../../..
   113.7 +MODULE  = scripting-rhino
   113.8  PACKAGE = sun.org.mozilla.javascript.internal
   113.9  PRODUCT = sun
  113.10  include $(BUILDDIR)/common/Defs.gmk
   114.1 --- a/make/sun/pisces/Makefile	Thu Jan 21 11:12:37 2010 -0800
   114.2 +++ b/make/sun/pisces/Makefile	Fri Jan 22 09:34:17 2010 -0800
   114.3 @@ -24,6 +24,7 @@
   114.4  #
   114.5  
   114.6  BUILDDIR = ../..
   114.7 +MODULE  = java2d
   114.8  PACKAGE = sun.pisces
   114.9  PRODUCT = sun
  114.10  include $(BUILDDIR)/common/Defs.gmk
   115.1 --- a/make/sun/rmi/cgi/Makefile	Thu Jan 21 11:12:37 2010 -0800
   115.2 +++ b/make/sun/rmi/cgi/Makefile	Fri Jan 22 09:34:17 2010 -0800
   115.3 @@ -28,6 +28,8 @@
   115.4  #
   115.5  
   115.6  BUILDDIR = ../../..
   115.7 +# java-rmi.cgi is a JDK tool
   115.8 +MODULE  = tools
   115.9  PACKAGE = sun.rmi
  115.10  PRODUCT = sun
  115.11  PROGRAM = java-rmi
   116.1 --- a/make/sun/rmi/oldtools/Makefile	Thu Jan 21 11:12:37 2010 -0800
   116.2 +++ b/make/sun/rmi/oldtools/Makefile	Fri Jan 22 09:34:17 2010 -0800
   116.3 @@ -28,6 +28,7 @@
   116.4  #
   116.5  
   116.6  BUILDDIR = ../../..
   116.7 +MODULE   = oldjavac
   116.8  PRODUCT	 = oldjavac
   116.9  
  116.10  include $(BUILDDIR)/common/Defs.gmk
   117.1 --- a/make/sun/rmi/registry/Makefile	Thu Jan 21 11:12:37 2010 -0800
   117.2 +++ b/make/sun/rmi/registry/Makefile	Fri Jan 22 09:34:17 2010 -0800
   117.3 @@ -28,6 +28,7 @@
   117.4  #
   117.5  
   117.6  BUILDDIR = ../../..
   117.7 +MODULE  = rmi
   117.8  PACKAGE = sun.rmi.registry
   117.9  PRODUCT = sun
  117.10  include $(BUILDDIR)/common/Defs.gmk
  117.11 @@ -48,3 +49,7 @@
  117.12  #
  117.13  include $(BUILDDIR)/common/Classes.gmk
  117.14  
  117.15 +build: rmiregistry
  117.16 +
  117.17 +rmiregistry:
  117.18 +	$(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
   118.1 --- a/make/sun/rmi/rmi/Makefile	Thu Jan 21 11:12:37 2010 -0800
   118.2 +++ b/make/sun/rmi/rmi/Makefile	Fri Jan 22 09:34:17 2010 -0800
   118.3 @@ -28,6 +28,7 @@
   118.4  #
   118.5  
   118.6  BUILDDIR = ../../..
   118.7 +MODULE  = rmi
   118.8  PACKAGE = sun.rmi
   118.9  PRODUCT = sun
  118.10  LIBRARY = rmi
  118.11 @@ -124,7 +125,7 @@
  118.12  
  118.13  $(BINDIR)/java-rmi.cgi: $(PLATFORM_SRC)/bin/java-rmi.cgi.sh
  118.14  	$(install-file)
  118.15 -	$(CHMOD) a+x $@
  118.16 +	$(call chmod-file, a+x)
  118.17  
  118.18  bin.clean:
  118.19  	$(RM) $(BINDIR)/java-rmi.cgi
   119.1 --- a/make/sun/rmi/rmic/Makefile	Thu Jan 21 11:12:37 2010 -0800
   119.2 +++ b/make/sun/rmi/rmic/Makefile	Fri Jan 22 09:34:17 2010 -0800
   119.3 @@ -28,6 +28,7 @@
   119.4  #
   119.5  
   119.6  BUILDDIR = ../../..
   119.7 +MODULE  = rmic
   119.8  PACKAGE = sun.rmi.rmic
   119.9  PRODUCT = sun
  119.10  include $(BUILDDIR)/common/Defs.gmk
   120.1 --- a/make/sun/rmi/rmid/Makefile	Thu Jan 21 11:12:37 2010 -0800
   120.2 +++ b/make/sun/rmi/rmid/Makefile	Fri Jan 22 09:34:17 2010 -0800
   120.3 @@ -29,11 +29,12 @@
   120.4  #
   120.5  
   120.6  BUILDDIR = ../../..
   120.7 +MODULE  = rmi-activation
   120.8  PACKAGE = sun.rmi.activation
   120.9  PRODUCT = sun
  120.10  include $(BUILDDIR)/common/Defs.gmk
  120.11  
  120.12 -build: stubs 
  120.13 +build: stubs rmid
  120.14  
  120.15  #
  120.16  # Resources
  120.17 @@ -75,4 +76,5 @@
  120.18  #
  120.19  include $(BUILDDIR)/common/Classes.gmk
  120.20  
  120.21 -
  120.22 +rmid:
  120.23 +	$(call make-launcher, rmid, sun.rmi.server.Activation, , )
   121.1 --- a/make/sun/security/ec/Makefile	Thu Jan 21 11:12:37 2010 -0800
   121.2 +++ b/make/sun/security/ec/Makefile	Fri Jan 22 09:34:17 2010 -0800
   121.3 @@ -89,6 +89,7 @@
   121.4  #
   121.5  
   121.6  BUILDDIR = ../../..
   121.7 +MODULE  = security-sunec
   121.8  PACKAGE = sun.security.ec
   121.9  PRODUCT = sun
  121.10  
  121.11 @@ -308,7 +309,7 @@
  121.12  else
  121.13  $(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
  121.14  endif
  121.15 -	$(install-file)
  121.16 +	$(install-non-module-file)
  121.17  
  121.18  ifndef OPENJDK
  121.19  install-prebuilt:
   122.1 --- a/make/sun/security/jgss/wrapper/Makefile	Thu Jan 21 11:12:37 2010 -0800
   122.2 +++ b/make/sun/security/jgss/wrapper/Makefile	Fri Jan 22 09:34:17 2010 -0800
   122.3 @@ -24,6 +24,7 @@
   122.4  #
   122.5  
   122.6  BUILDDIR = ../../../..
   122.7 +MODULE  = security-kerberos
   122.8  PACKAGE = sun.security.jgss.wrapper
   122.9  PRODUCT = sun
  122.10  
   123.1 --- a/make/sun/security/krb5/Makefile	Thu Jan 21 11:12:37 2010 -0800
   123.2 +++ b/make/sun/security/krb5/Makefile	Fri Jan 22 09:34:17 2010 -0800
   123.3 @@ -24,6 +24,7 @@
   123.4  #
   123.5  
   123.6  BUILDDIR = ../../..
   123.7 +MODULE  = security-kerberos
   123.8  PACKAGE = sun.security.krb5
   123.9  PRODUCT = sun
  123.10  include $(BUILDDIR)/common/Defs.gmk
  123.11 @@ -77,3 +78,10 @@
  123.12  else
  123.13    OTHER_LDLIBS = -ldl $(JVMLIB)
  123.14  endif
  123.15 +
  123.16 +build:
  123.17 +ifeq ($(PLATFORM),windows)
  123.18 +	$(call make-launcher, kinit, sun.security.krb5.internal.tools.Kinit, , )
  123.19 +	$(call make-launcher, klist, sun.security.krb5.internal.tools.Klist, , )
  123.20 +	$(call make-launcher, ktab, sun.security.krb5.internal.tools.Ktab, , )
  123.21 +endif
   124.1 --- a/make/sun/security/mscapi/Makefile	Thu Jan 21 11:12:37 2010 -0800
   124.2 +++ b/make/sun/security/mscapi/Makefile	Fri Jan 22 09:34:17 2010 -0800
   124.3 @@ -89,6 +89,7 @@
   124.4  #
   124.5  
   124.6  BUILDDIR = ../../..
   124.7 +MODULE  = security-sunmscapi
   124.8  PACKAGE = sun.security.mscapi
   124.9  LIBRARY = sunmscapi
  124.10  PRODUCT = sun
  124.11 @@ -271,7 +272,7 @@
  124.12  else
  124.13  $(JAR_DESTFILE): $(SIGNED_DIR)/sunmscapi.jar
  124.14  endif
  124.15 -	$(install-file)
  124.16 +	$(install-non-module-file)
  124.17  
  124.18  ifndef OPENJDK
  124.19  install-prebuilt:
   125.1 --- a/make/sun/security/pkcs11/Makefile	Thu Jan 21 11:12:37 2010 -0800
   125.2 +++ b/make/sun/security/pkcs11/Makefile	Fri Jan 22 09:34:17 2010 -0800
   125.3 @@ -89,6 +89,7 @@
   125.4  #
   125.5  
   125.6  BUILDDIR = ../../..
   125.7 +MODULE  = security-sunpkcs11
   125.8  PACKAGE = sun.security.pkcs11
   125.9  LIBRARY = j2pkcs11
  125.10  PRODUCT = sun
  125.11 @@ -161,6 +162,16 @@
  125.12    OTHER_LDLIBS = -ldl $(JVMLIB)
  125.13  endif
  125.14  
  125.15 +# Other config files
  125.16 +SUNPKCS11_CFG   =
  125.17 +
  125.18 +ifeq ($(PLATFORM), solaris)
  125.19 +SUNPKCS11_CFG   = sunpkcs11-cfg
  125.20 +endif # PLATFORM
  125.21 +
  125.22 +SUNPKCS11_CFG_SRC   = $(TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
  125.23 +SUNPKCS11_CFG_BUILD = $(LIBDIR)/security/sunpkcs11-solaris.cfg
  125.24 +
  125.25  #
  125.26  # We use a variety of subdirectories in the $(TEMPDIR) depending on what
  125.27  # part of the build we're doing.  Both OPENJDK/JDK builds are initially
  125.28 @@ -174,12 +185,17 @@
  125.29  #
  125.30  
  125.31  ifdef OPENJDK
  125.32 -all: build-jar install-jar
  125.33 +all: $(SUNPKCS11_CFG) build-jar install-jar
  125.34  else
  125.35 -all: build-jar install-prebuilt
  125.36 +all: $(SUNPKCS11_CFG) build-jar install-prebuilt
  125.37  	$(build-warning)
  125.38  endif
  125.39  
  125.40 +sunpkcs11-cfg: $(SUNPKCS11_CFG_BUILD)
  125.41 +
  125.42 +$(SUNPKCS11_CFG_BUILD): $(SUNPKCS11_CFG_SRC)
  125.43 +	$(install-file)
  125.44 +
  125.45  include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
  125.46  
  125.47  
  125.48 @@ -271,7 +287,7 @@
  125.49  else
  125.50  $(JAR_DESTFILE): $(SIGNED_DIR)/sunpkcs11.jar
  125.51  endif
  125.52 -	$(install-file)
  125.53 +	$(install-non-module-file)
  125.54  
  125.55  ifndef OPENJDK
  125.56  install-prebuilt:
  125.57 @@ -287,6 +303,7 @@
  125.58  
  125.59  clobber clean::
  125.60  	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
  125.61 +	$(RM) $(SUNPKCS11_CFG_BUILD) 
  125.62  
  125.63  .PHONY: build-jar jar install-jar
  125.64  ifndef OPENJDK
   126.1 --- a/make/sun/security/smartcardio/Makefile	Thu Jan 21 11:12:37 2010 -0800
   126.2 +++ b/make/sun/security/smartcardio/Makefile	Fri Jan 22 09:34:17 2010 -0800
   126.3 @@ -24,6 +24,7 @@
   126.4  #
   126.5  
   126.6  BUILDDIR = ../../..
   126.7 +MODULE  = security-smartcardio
   126.8  PACKAGE = sun.security.smartcardio
   126.9  LIBRARY = j2pcsc
  126.10  PRODUCT = sun
   127.1 --- a/make/sun/security/tools/Makefile	Thu Jan 21 11:12:37 2010 -0800
   127.2 +++ b/make/sun/security/tools/Makefile	Fri Jan 22 09:34:17 2010 -0800
   127.3 @@ -24,6 +24,7 @@
   127.4  #
   127.5  
   127.6  BUILDDIR = ../../..
   127.7 +MODULE  = security-tools
   127.8  PACKAGE = sun.security.tools
   127.9  PRODUCT = sun
  127.10  include $(BUILDDIR)/common/Defs.gmk
  127.11 @@ -44,3 +45,7 @@
  127.12  #
  127.13  include $(BUILDDIR)/common/Classes.gmk
  127.14  
  127.15 +build:
  127.16 +	$(call make-launcher, keytool, sun.security.tools.KeyTool, , )
  127.17 +	$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
  127.18 +
   128.1 --- a/make/sun/serialver/Makefile	Thu Jan 21 11:12:37 2010 -0800
   128.2 +++ b/make/sun/serialver/Makefile	Fri Jan 22 09:34:17 2010 -0800
   128.3 @@ -28,6 +28,7 @@
   128.4  #
   128.5  
   128.6  BUILDDIR = ../..
   128.7 +MODULE  = serialver
   128.8  PACKAGE = sun.tools.serialver
   128.9  PRODUCT = sun
  128.10  include $(BUILDDIR)/common/Defs.gmk
   129.1 --- a/make/sun/splashscreen/Makefile	Thu Jan 21 11:12:37 2010 -0800
   129.2 +++ b/make/sun/splashscreen/Makefile	Fri Jan 22 09:34:17 2010 -0800
   129.3 @@ -24,6 +24,7 @@
   129.4  #
   129.5  
   129.6  BUILDDIR = ../..
   129.7 +MODULE  = awt
   129.8  PACKAGE = sun.awt
   129.9  LIBRARY = splashscreen
  129.10  PRODUCT = sun
   130.1 --- a/make/sun/text/Makefile	Thu Jan 21 11:12:37 2010 -0800
   130.2 +++ b/make/sun/text/Makefile	Fri Jan 22 09:34:17 2010 -0800
   130.3 @@ -29,6 +29,7 @@
   130.4  
   130.5  BUILDDIR = ../..
   130.6  
   130.7 +MODULE  = localedata
   130.8  PACKAGE = sun.text
   130.9  PRODUCT = sun
  130.10  
   131.1 --- a/make/sun/tools/Makefile	Thu Jan 21 11:12:37 2010 -0800
   131.2 +++ b/make/sun/tools/Makefile	Fri Jan 22 09:34:17 2010 -0800
   131.3 @@ -28,6 +28,7 @@
   131.4  #
   131.5  
   131.6  BUILDDIR = ../..
   131.7 +MODULE  = tools
   131.8  PACKAGE = sun.tools
   131.9  PRODUCT = sun
  131.10  include $(BUILDDIR)/common/Defs.gmk
   132.1 --- a/make/sun/tracing/dtrace/Makefile	Thu Jan 21 11:12:37 2010 -0800
   132.2 +++ b/make/sun/tracing/dtrace/Makefile	Fri Jan 22 09:34:17 2010 -0800
   132.3 @@ -27,6 +27,7 @@
   132.4  # Makefile for building dtrace extension
   132.5  #
   132.6  BUILDDIR = ../../..
   132.7 +MODULE  = tracing
   132.8  PACKAGE = sun.tracing.dtrace
   132.9  LIBRARY = jsdt
  132.10  PRODUCT = sun
   133.1 --- a/make/sun/xawt/Makefile	Thu Jan 21 11:12:37 2010 -0800
   133.2 +++ b/make/sun/xawt/Makefile	Fri Jan 22 09:34:17 2010 -0800
   133.3 @@ -24,6 +24,7 @@
   133.4  #
   133.5  
   133.6  BUILDDIR = ../..
   133.7 +MODULE  = awt
   133.8  PACKAGE = sun.awt.X11
   133.9  LIBRARY = mawt
  133.10  LIBRARY_OUTPUT = xawt
   134.1 --- a/src/share/classes/java/lang/Deprecated.java	Thu Jan 21 11:12:37 2010 -0800
   134.2 +++ b/src/share/classes/java/lang/Deprecated.java	Fri Jan 22 09:34:17 2010 -0800
   134.3 @@ -26,6 +26,7 @@
   134.4  package java.lang;
   134.5  
   134.6  import java.lang.annotation.*;
   134.7 +import static java.lang.annotation.ElementType.*;
   134.8  
   134.9  /**
  134.10   * A program element annotated &#64;Deprecated is one that programmers
  134.11 @@ -38,5 +39,6 @@
  134.12   */
  134.13  @Documented
  134.14  @Retention(RetentionPolicy.RUNTIME)
  134.15 +@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
  134.16  public @interface Deprecated {
  134.17  }
   135.1 --- a/src/share/classes/java/lang/Error.java	Thu Jan 21 11:12:37 2010 -0800
   135.2 +++ b/src/share/classes/java/lang/Error.java	Fri Jan 22 09:34:17 2010 -0800
   135.3 @@ -26,27 +26,31 @@
   135.4  package java.lang;
   135.5  
   135.6  /**
   135.7 - * An <code>Error</code> is a subclass of <code>Throwable</code>
   135.8 + * An {@code Error} is a subclass of {@code Throwable}
   135.9   * that indicates serious problems that a reasonable application
  135.10   * should not try to catch. Most such errors are abnormal conditions.
  135.11 - * The <code>ThreadDeath</code> error, though a "normal" condition,
  135.12 - * is also a subclass of <code>Error</code> because most applications
  135.13 + * The {@code ThreadDeath} error, though a "normal" condition,
  135.14 + * is also a subclass of {@code Error} because most applications
  135.15   * should not try to catch it.
  135.16   * <p>
  135.17 - * A method is not required to declare in its <code>throws</code>
  135.18 - * clause any subclasses of <code>Error</code> that might be thrown
  135.19 + * A method is not required to declare in its {@code throws}
  135.20 + * clause any subclasses of {@code Error} that might be thrown
  135.21   * during the execution of the method but not caught, since these
  135.22   * errors are abnormal conditions that should never occur.
  135.23   *
  135.24 + * That is, {@code Error} and its subclasses are regarded as unchecked
  135.25 + * exceptions for the purposes of compile-time checking of exceptions.
  135.26 + *
  135.27   * @author  Frank Yellin
  135.28   * @see     java.lang.ThreadDeath
  135.29 + * @jls3 11.2 Compile-Time Checking of Exceptions
  135.30   * @since   JDK1.0
  135.31   */
  135.32  public class Error extends Throwable {
  135.33      static final long serialVersionUID = 4980196508277280342L;
  135.34  
  135.35      /**
  135.36 -     * Constructs a new error with <code>null</code> as its detail message.
  135.37 +     * Constructs a new error with {@code null} as its detail message.
  135.38       * The cause is not initialized, and may subsequently be initialized by a
  135.39       * call to {@link #initCause}.
  135.40       */
  135.41 @@ -69,7 +73,7 @@
  135.42      /**
  135.43       * Constructs a new error with the specified detail message and
  135.44       * cause.  <p>Note that the detail message associated with
  135.45 -     * <code>cause</code> is <i>not</i> automatically incorporated in
  135.46 +     * {@code cause} is <i>not</i> automatically incorporated in
  135.47       * this error's detail message.
  135.48       *
  135.49       * @param  message the detail message (which is saved for later retrieval
   136.1 --- a/src/share/classes/java/lang/Exception.java	Thu Jan 21 11:12:37 2010 -0800
   136.2 +++ b/src/share/classes/java/lang/Exception.java	Fri Jan 22 09:34:17 2010 -0800
   136.3 @@ -26,19 +26,27 @@
   136.4  package java.lang;
   136.5  
   136.6  /**
   136.7 - * The class <code>Exception</code> and its subclasses are a form of
   136.8 - * <code>Throwable</code> that indicates conditions that a reasonable
   136.9 + * The class {@code Exception} and its subclasses are a form of
  136.10 + * {@code Throwable} that indicates conditions that a reasonable
  136.11   * application might want to catch.
  136.12   *
  136.13 + * <p>The class {@code Exception} and any subclasses that are not also
  136.14 + * subclasses of {@link RuntimeException} are <em>checked
  136.15 + * exceptions</em>.  Checked exceptions need to be declared in a
  136.16 + * method or constructor's {@code throws} clause if they can be thrown
  136.17 + * by the execution of the method or constructor and propagate outside
  136.18 + * the method or constructor boundary.
  136.19 + *
  136.20   * @author  Frank Yellin
  136.21   * @see     java.lang.Error
  136.22 + * @jls3 11.2 Compile-Time Checking of Exceptions
  136.23   * @since   JDK1.0
  136.24   */
  136.25  public class Exception extends Throwable {
  136.26      static final long serialVersionUID = -3387516993124229948L;
  136.27  
  136.28      /**
  136.29 -     * Constructs a new exception with <code>null</code> as its detail message.
  136.30 +     * Constructs a new exception with {@code null} as its detail message.
  136.31       * The cause is not initialized, and may subsequently be initialized by a
  136.32       * call to {@link #initCause}.
  136.33       */
  136.34 @@ -61,7 +69,7 @@
  136.35      /**
  136.36       * Constructs a new exception with the specified detail message and
  136.37       * cause.  <p>Note that the detail message associated with
  136.38 -     * <code>cause</code> is <i>not</i> automatically incorporated in
  136.39 +     * {@code cause} is <i>not</i> automatically incorporated in
  136.40       * this exception's detail message.
  136.41       *
  136.42       * @param  message the detail message (which is saved for later retrieval
   137.1 --- a/src/share/classes/java/lang/RuntimeException.java	Thu Jan 21 11:12:37 2010 -0800
   137.2 +++ b/src/share/classes/java/lang/RuntimeException.java	Fri Jan 22 09:34:17 2010 -0800
   137.3 @@ -26,22 +26,24 @@
   137.4  package java.lang;
   137.5  
   137.6  /**
   137.7 - * <code>RuntimeException</code> is the superclass of those
   137.8 + * {@code RuntimeException} is the superclass of those
   137.9   * exceptions that can be thrown during the normal operation of the
  137.10   * Java Virtual Machine.
  137.11 - * <p>
  137.12 - * A method is not required to declare in its <code>throws</code>
  137.13 - * clause any subclasses of <code>RuntimeException</code> that might
  137.14 - * be thrown during the execution of the method but not caught.
  137.15   *
  137.16 + * <p>{@code RuntimeException} and its subclasses are <em>unchecked
  137.17 + * exceptions</em>.  Unchecked exceptions do <em>not</em> need to be
  137.18 + * declared in a method or constructor's {@code throws} clause if they
  137.19 + * can be thrown by the execution of the method or constructor and
  137.20 + * propagate outside the method or constructor boundary.
  137.21   *
  137.22   * @author  Frank Yellin
  137.23 + * @jls3 11.2 Compile-Time Checking of Exceptions
  137.24   * @since   JDK1.0
  137.25   */
  137.26  public class RuntimeException extends Exception {
  137.27      static final long serialVersionUID = -7034897190745766939L;
  137.28  
  137.29 -    /** Constructs a new runtime exception with <code>null</code> as its
  137.30 +    /** Constructs a new runtime exception with {@code null} as its
  137.31       * detail message.  The cause is not initialized, and may subsequently be
  137.32       * initialized by a call to {@link #initCause}.
  137.33       */
  137.34 @@ -63,7 +65,7 @@
  137.35      /**
  137.36       * Constructs a new runtime exception with the specified detail message and
  137.37       * cause.  <p>Note that the detail message associated with
  137.38 -     * <code>cause</code> is <i>not</i> automatically incorporated in
  137.39 +     * {@code cause} is <i>not</i> automatically incorporated in
  137.40       * this runtime exception's detail message.
  137.41       *
  137.42       * @param  message the detail message (which is saved for later retrieval
   138.1 --- a/src/share/classes/java/lang/SuppressWarnings.java	Thu Jan 21 11:12:37 2010 -0800
   138.2 +++ b/src/share/classes/java/lang/SuppressWarnings.java	Fri Jan 22 09:34:17 2010 -0800
   138.3 @@ -26,7 +26,6 @@
   138.4  package java.lang;
   138.5  
   138.6  import java.lang.annotation.*;
   138.7 -import java.lang.annotation.ElementType;
   138.8  import static java.lang.annotation.ElementType.*;
   138.9  
  138.10  /**
  138.11 @@ -45,7 +44,7 @@
  138.12   * @since 1.5
  138.13   * @author Josh Bloch
  138.14   */
  138.15 -@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
  138.16 +@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, TYPE_PARAMETER})
  138.17  @Retention(RetentionPolicy.SOURCE)
  138.18  public @interface SuppressWarnings {
  138.19      /**
   139.1 --- a/src/share/classes/java/lang/Throwable.java	Thu Jan 21 11:12:37 2010 -0800
   139.2 +++ b/src/share/classes/java/lang/Throwable.java	Fri Jan 22 09:34:17 2010 -0800
   139.3 @@ -34,6 +34,11 @@
   139.4   * this class or one of its subclasses can be the argument type in a
   139.5   * <code>catch</code> clause.
   139.6   *
   139.7 + * For the purposes of compile-time checking of exceptions, {@code
   139.8 + * Throwable} and any subclass of {@code Throwable} that is not also a
   139.9 + * subclass of either {@link RuntimeException} or {@link Error} are
  139.10 + * regarded as checked exceptions.
  139.11 + *
  139.12   * <p>Instances of two subclasses, {@link java.lang.Error} and
  139.13   * {@link java.lang.Exception}, are conventionally used to indicate
  139.14   * that exceptional situations have occurred. Typically, these instances
  139.15 @@ -142,6 +147,7 @@
  139.16   * @author  unascribed
  139.17   * @author  Josh Bloch (Added exception chaining and programmatic access to
  139.18   *          stack trace in 1.4.)
  139.19 + * @jls3 11.2 Compile-Time Checking of Exceptions
  139.20   * @since JDK1.0
  139.21   */
  139.22  public class Throwable implements Serializable {
   140.1 --- a/src/share/classes/java/util/NavigableMap.java	Thu Jan 21 11:12:37 2010 -0800
   140.2 +++ b/src/share/classes/java/util/NavigableMap.java	Fri Jan 22 09:34:17 2010 -0800
   140.3 @@ -298,7 +298,7 @@
   140.4       * Returns a view of the portion of this map whose keys range from
   140.5       * {@code fromKey} to {@code toKey}.  If {@code fromKey} and
   140.6       * {@code toKey} are equal, the returned map is empty unless
   140.7 -     * {@code fromExclusive} and {@code toExclusive} are both true.  The
   140.8 +     * {@code fromInclusive} and {@code toInclusive} are both true.  The
   140.9       * returned map is backed by this map, so changes in the returned map are
  140.10       * reflected in this map, and vice-versa.  The returned map supports all
  140.11       * optional map operations that this map supports.
   141.1 --- a/src/share/classes/java/util/NavigableSet.java	Thu Jan 21 11:12:37 2010 -0800
   141.2 +++ b/src/share/classes/java/util/NavigableSet.java	Fri Jan 22 09:34:17 2010 -0800
   141.3 @@ -192,7 +192,7 @@
   141.4       * Returns a view of the portion of this set whose elements range from
   141.5       * {@code fromElement} to {@code toElement}.  If {@code fromElement} and
   141.6       * {@code toElement} are equal, the returned set is empty unless {@code
   141.7 -     * fromExclusive} and {@code toExclusive} are both true.  The returned set
   141.8 +     * fromInclusive} and {@code toInclusive} are both true.  The returned set
   141.9       * is backed by this set, so changes in the returned set are reflected in
  141.10       * this set, and vice-versa.  The returned set supports all optional set
  141.11       * operations that this set supports.
   142.1 --- a/src/share/classes/sun/nio/fs/AbstractPath.java	Thu Jan 21 11:12:37 2010 -0800
   142.2 +++ b/src/share/classes/sun/nio/fs/AbstractPath.java	Fri Jan 22 09:34:17 2010 -0800
   142.3 @@ -256,8 +256,8 @@
   142.4                  }
   142.5                  if (option == null)
   142.6                      throw new NullPointerException();
   142.7 -                throw new IllegalArgumentException("'" + option +
   142.8 -                    "' is not a valid copy option");
   142.9 +                throw new UnsupportedOperationException("'" + option +
  142.10 +                    "' is not a recognized copy option");
  142.11              }
  142.12              return result;
  142.13          }
  142.14 @@ -279,9 +279,21 @@
  142.15          if (attrs.isSymbolicLink())
  142.16              throw new IOException("Copying of symbolic links not supported");
  142.17  
  142.18 -        // delete target file
  142.19 -        if (opts.replaceExisting)
  142.20 -            target.deleteIfExists();
  142.21 +        // check if target exists
  142.22 +        boolean exists;
  142.23 +        if (opts.replaceExisting) {
  142.24 +            try {
  142.25 +                target.deleteIfExists();
  142.26 +                exists = false;
  142.27 +            } catch (DirectoryNotEmptyException x) {
  142.28 +                // let exception translate to FileAlreadyExistsException (6895012)
  142.29 +                exists = true;
  142.30 +            }
  142.31 +        } else {
  142.32 +            exists = target.exists();
  142.33 +        }
  142.34 +        if (exists)
  142.35 +            throw new FileAlreadyExistsException(target.toString());
  142.36  
  142.37          // create directory or file
  142.38          if (attrs.isDirectory()) {
  142.39 @@ -318,7 +330,7 @@
  142.40          ReadableByteChannel rbc = newByteChannel();
  142.41          try {
  142.42              // open target file for writing
  142.43 -            SeekableByteChannel sbc = target.newByteChannel(CREATE, WRITE);
  142.44 +            SeekableByteChannel sbc = target.newByteChannel(CREATE_NEW, WRITE);
  142.45  
  142.46              // simple copy loop
  142.47              try {
   143.1 --- a/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Thu Jan 21 11:12:37 2010 -0800
   143.2 +++ b/src/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Jan 22 09:34:17 2010 -0800
   143.3 @@ -88,27 +88,25 @@
   143.4      final void signalEvent(WatchEvent.Kind<?> kind, Object context) {
   143.5          synchronized (this) {
   143.6              int size = events.size();
   143.7 -            if (size > 1) {
   143.8 -                // don't let list get too big
   143.9 +            if (size > 0) {
  143.10 +                // if the previous event is an OVERFLOW event or this is a
  143.11 +                // repeated event then we simply increment the counter
  143.12 +                WatchEvent<?> prev = events.get(size-1);
  143.13 +                if ((prev.kind() == StandardWatchEventKind.OVERFLOW) ||
  143.14 +                    ((kind == prev.kind() &&
  143.15 +                     Objects.equals(context, prev.context()))))
  143.16 +                {
  143.17 +                    ((Event<?>)prev).increment();
  143.18 +                    return;
  143.19 +                }
  143.20 +
  143.21 +                // if the list has reached the limit then drop pending events
  143.22 +                // and queue an OVERFLOW event
  143.23                  if (size >= MAX_EVENT_LIST_SIZE) {
  143.24 +                    events.clear();
  143.25                      kind = StandardWatchEventKind.OVERFLOW;
  143.26                      context = null;
  143.27                  }
  143.28 -
  143.29 -                // repeated event
  143.30 -                WatchEvent<?> prev = events.get(size-1);
  143.31 -                if (kind == prev.kind()) {
  143.32 -                    boolean isRepeat;
  143.33 -                    if (context == null) {
  143.34 -                        isRepeat = (prev.context() == null);
  143.35 -                    } else {
  143.36 -                        isRepeat = context.equals(prev.context());
  143.37 -                    }
  143.38 -                    if (isRepeat) {
  143.39 -                        ((Event<?>)prev).increment();
  143.40 -                        return;
  143.41 -                    }
  143.42 -                }
  143.43              }
  143.44  
  143.45              // non-repeated event
   144.1 --- a/src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java	Thu Jan 21 11:12:37 2010 -0800
   144.2 +++ b/src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java	Fri Jan 22 09:34:17 2010 -0800
   144.3 @@ -75,7 +75,7 @@
   144.4      public String getKeyString() {
   144.5          StringBuffer sb = new StringBuffer("0x");
   144.6          for (int i = 0; i < keyblock.length; i++) {
   144.7 -            sb.append(Integer.toHexString(keyblock[i]&0xff));
   144.8 +            sb.append(String.format("%02x", keyblock[i]&0xff));
   144.9          }
  144.10          return sb.toString();
  144.11      }
   145.1 --- a/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Thu Jan 21 11:12:37 2010 -0800
   145.2 +++ b/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Fri Jan 22 09:34:17 2010 -0800
   145.3 @@ -574,10 +574,18 @@
   145.4                              (singleExtDer.length);
   145.5                      for (int i = 0; i < singleExtDer.length; i++) {
   145.6                          Extension ext = new Extension(singleExtDer[i]);
   145.7 -                        singleExtensions.put(ext.getId(), ext);
   145.8                          if (DEBUG != null) {
   145.9                              DEBUG.println("OCSP single extension: " + ext);
  145.10                          }
  145.11 +                        // We don't support any extensions yet. Therefore, if it
  145.12 +                        // is critical we must throw an exception because we
  145.13 +                        // don't know how to process it.
  145.14 +                        if (ext.isCritical()) {
  145.15 +                            throw new IOException(
  145.16 +                                "Unsupported OCSP critical extension: " +
  145.17 +                                ext.getExtensionId());
  145.18 +                        }
  145.19 +                        singleExtensions.put(ext.getId(), ext);
  145.20                      }
  145.21                  } else {
  145.22                      singleExtensions = Collections.emptyMap();
   146.1 --- a/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java	Thu Jan 21 11:12:37 2010 -0800
   146.2 +++ b/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java	Fri Jan 22 09:34:17 2010 -0800
   146.3 @@ -38,7 +38,6 @@
   146.4  import java.nio.channels.ClosedChannelException;
   146.5  import java.nio.channels.ConnectionPendingException;
   146.6  import java.nio.channels.NoConnectionPendingException;
   146.7 -import java.nio.channels.AlreadyBoundException;
   146.8  import java.nio.channels.AlreadyConnectedException;
   146.9  import java.nio.channels.NotYetBoundException;
  146.10  import java.nio.channels.NotYetConnectedException;
  146.11 @@ -54,7 +53,6 @@
  146.12  import com.sun.nio.sctp.NotificationHandler;
  146.13  import com.sun.nio.sctp.SctpChannel;
  146.14  import com.sun.nio.sctp.SctpSocketOption;
  146.15 -import sun.nio.ch.NativeDispatcher;
  146.16  import sun.nio.ch.PollArrayWrapper;
  146.17  import sun.nio.ch.SelChImpl;
  146.18  import static com.sun.nio.sctp.SctpStandardSocketOption.*;
  146.19 @@ -69,9 +67,6 @@
  146.20  public class SctpChannelImpl extends SctpChannel
  146.21      implements SelChImpl
  146.22  {
  146.23 -    /* Used to make native close and preClose calls */
  146.24 -    private static NativeDispatcher nd;
  146.25 -
  146.26      private final FileDescriptor fd;
  146.27  
  146.28      private final int fdVal;
  146.29 @@ -182,7 +177,7 @@
  146.30                  synchronized (stateLock) {
  146.31                      ensureOpenAndUnconnected();
  146.32                      if (isBound())
  146.33 -                        throw new AlreadyBoundException();
  146.34 +                        SctpNet.throwAlreadyBoundException();
  146.35                      InetSocketAddress isa = (local == null) ?
  146.36                          new InetSocketAddress(0) : Net.checkAddress(local);
  146.37                      Net.bind(fd, isa.getAddress(), isa.getPort());
  146.38 @@ -234,7 +229,7 @@
  146.39                      if (add) {
  146.40                          for (InetSocketAddress addr : localAddresses) {
  146.41                              if (addr.getAddress().equals(address)) {
  146.42 -                                throw new AlreadyBoundException();
  146.43 +                                SctpNet.throwAlreadyBoundException();
  146.44                              }
  146.45                          }
  146.46                      } else { /*removing */
  146.47 @@ -370,7 +365,7 @@
  146.48                                  InetAddress ia = isa.getAddress();
  146.49                                  if (ia.isAnyLocalAddress())
  146.50                                      ia = InetAddress.getLocalHost();
  146.51 -                                n = Net.connect(fd, ia, isa.getPort());
  146.52 +                                n = SctpNet.connect(fdVal, ia, isa.getPort());
  146.53                                  if (  (n == IOStatus.INTERRUPTED)
  146.54                                        && isOpen())
  146.55                                      continue;
  146.56 @@ -556,7 +551,7 @@
  146.57      @Override
  146.58      public void implCloseSelectableChannel() throws IOException {
  146.59          synchronized (stateLock) {
  146.60 -            nd.preClose(fd);
  146.61 +            SctpNet.preClose(fdVal);
  146.62  
  146.63              if (receiverThread != 0)
  146.64                  NativeThread.signal(receiverThread);
  146.65 @@ -662,7 +657,7 @@
  146.66              /* Postpone the kill if there is a waiting reader
  146.67               * or writer thread. */
  146.68              if (receiverThread == 0 && senderThread == 0) {
  146.69 -                nd.close(fd);
  146.70 +                SctpNet.close(fdVal);
  146.71                  state = ChannelState.KILLED;
  146.72              } else {
  146.73                  state = ChannelState.KILLPENDING;
  146.74 @@ -874,8 +869,8 @@
  146.75          public HandlerResult handleNotification(
  146.76                  AssociationChangeNotification not, T unused) {
  146.77              if (not.event().equals(
  146.78 -                    AssociationChangeNotification.AssocChangeEvent.COMM_UP)) {
  146.79 -                assert association == null;
  146.80 +                    AssociationChangeNotification.AssocChangeEvent.COMM_UP) &&
  146.81 +                    association == null) {
  146.82                  SctpAssocChange sac = (SctpAssocChange) not;
  146.83                  association = new SctpAssociationImpl
  146.84                         (sac.assocId(), sac.maxInStreams(), sac.maxOutStreams());
  146.85 @@ -987,17 +982,17 @@
  146.86          SocketAddress target = messageInfo.address();
  146.87          boolean unordered = messageInfo.isUnordered();
  146.88          int ppid = messageInfo.payloadProtocolID();
  146.89 -        int pos = src.position();
  146.90 -        int lim = src.limit();
  146.91 -
  146.92 -        assert (pos <= lim && streamNumber >= 0);
  146.93 -        int rem = (pos <= lim ? lim - pos : 0);
  146.94  
  146.95          if (src instanceof DirectBuffer)
  146.96 -            return sendFromNativeBuffer(fd, src, rem, pos, target, streamNumber,
  146.97 +            return sendFromNativeBuffer(fd, src, target, streamNumber,
  146.98                      unordered, ppid);
  146.99  
 146.100          /* Substitute a native buffer */
 146.101 +        int pos = src.position();
 146.102 +        int lim = src.limit();
 146.103 +        assert (pos <= lim && streamNumber >= 0);
 146.104 +
 146.105 +        int rem = (pos <= lim ? lim - pos : 0);
 146.106          ByteBuffer bb = Util.getTemporaryDirectBuffer(rem);
 146.107          try {
 146.108              bb.put(src);
 146.109 @@ -1005,7 +1000,7 @@
 146.110              /* Do not update src until we see how many bytes were written */
 146.111              src.position(pos);
 146.112  
 146.113 -            int n = sendFromNativeBuffer(fd, bb, rem, pos, target, streamNumber,
 146.114 +            int n = sendFromNativeBuffer(fd, bb, target, streamNumber,
 146.115                      unordered, ppid);
 146.116              if (n > 0) {
 146.117                  /* now update src */
 146.118 @@ -1019,13 +1014,16 @@
 146.119  
 146.120      private int sendFromNativeBuffer(int fd,
 146.121                                       ByteBuffer bb,
 146.122 -                                     int rem,
 146.123 -                                     int pos,
 146.124                                       SocketAddress target,
 146.125                                       int streamNumber,
 146.126                                       boolean unordered,
 146.127                                       int ppid)
 146.128              throws IOException {
 146.129 +        int pos = bb.position();
 146.130 +        int lim = bb.limit();
 146.131 +        assert (pos <= lim);
 146.132 +        int rem = (pos <= lim ? lim - pos : 0);
 146.133 +
 146.134          int written = send0(fd, ((DirectBuffer)bb).address() + pos,
 146.135                              rem, target, -1 /*121*/, streamNumber, unordered, ppid);
 146.136          if (written > 0)
 146.137 @@ -1097,6 +1095,5 @@
 146.138          java.security.AccessController.doPrivileged(
 146.139                  new sun.security.action.LoadLibraryAction("sctp"));
 146.140          initIDs();
 146.141 -        nd = new SctpSocketDispatcher();
 146.142      }
 146.143  }
   147.1 --- a/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java	Thu Jan 21 11:12:37 2010 -0800
   147.2 +++ b/src/solaris/classes/sun/nio/ch/SctpMultiChannelImpl.java	Fri Jan 22 09:34:17 2010 -0800
   147.3 @@ -38,7 +38,6 @@
   147.4  import java.util.HashMap;
   147.5  import java.nio.ByteBuffer;
   147.6  import java.nio.channels.SelectionKey;
   147.7 -import java.nio.channels.AlreadyBoundException;
   147.8  import java.nio.channels.ClosedChannelException;
   147.9  import java.nio.channels.NotYetBoundException;
  147.10  import java.nio.channels.spi.SelectorProvider;
  147.11 @@ -63,9 +62,6 @@
  147.12  public class SctpMultiChannelImpl extends SctpMultiChannel
  147.13      implements SelChImpl
  147.14  {
  147.15 -    /* Used to make native close and preClose calls */
  147.16 -    private static NativeDispatcher nd;
  147.17 -
  147.18      private final FileDescriptor fd;
  147.19  
  147.20      private final int fdVal;
  147.21 @@ -140,7 +136,7 @@
  147.22                  synchronized (stateLock) {
  147.23                      ensureOpen();
  147.24                      if (isBound())
  147.25 -                        throw new AlreadyBoundException();
  147.26 +                        SctpNet.throwAlreadyBoundException();
  147.27                      InetSocketAddress isa = (local == null) ?
  147.28                          new InetSocketAddress(0) : Net.checkAddress(local);
  147.29  
  147.30 @@ -155,7 +151,7 @@
  147.31                      if (isa.getAddress().isAnyLocalAddress())
  147.32                          wildcard = true;
  147.33  
  147.34 -                    Net.listen(fd, backlog < 1 ? 50 : backlog);
  147.35 +                    SctpNet.listen(fdVal, backlog < 1 ? 50 : backlog);
  147.36                  }
  147.37              }
  147.38          }
  147.39 @@ -196,7 +192,7 @@
  147.40                      if (add) {
  147.41                          for (InetSocketAddress addr : localAddresses) {
  147.42                              if (addr.getAddress().equals(address)) {
  147.43 -                                throw new AlreadyBoundException();
  147.44 +                                SctpNet.throwAlreadyBoundException();
  147.45                              }
  147.46                          }
  147.47                      } else { /*removing */
  147.48 @@ -284,7 +280,7 @@
  147.49      @Override
  147.50      public void implCloseSelectableChannel() throws IOException {
  147.51          synchronized (stateLock) {
  147.52 -            nd.preClose(fd);
  147.53 +            SctpNet.preClose(fdVal);
  147.54  
  147.55              if (receiverThread != 0)
  147.56                  NativeThread.signal(receiverThread);
  147.57 @@ -375,7 +371,7 @@
  147.58  
  147.59              /* Postpone the kill if there is a thread sending or receiving. */
  147.60              if (receiverThread == 0 && senderThread == 0) {
  147.61 -                nd.close(fd);
  147.62 +                SctpNet.close(fdVal);
  147.63                  state = ChannelState.KILLED;
  147.64              } else {
  147.65                  state = ChannelState.KILLPENDING;
  147.66 @@ -846,16 +842,17 @@
  147.67          int streamNumber = messageInfo.streamNumber();
  147.68          boolean unordered = messageInfo.isUnordered();
  147.69          int ppid = messageInfo.payloadProtocolID();
  147.70 +
  147.71 +        if (src instanceof DirectBuffer)
  147.72 +            return sendFromNativeBuffer(fd, src, target, assocId,
  147.73 +                    streamNumber, unordered, ppid);
  147.74 +
  147.75 +        /* Substitute a native buffer */
  147.76          int pos = src.position();
  147.77          int lim = src.limit();
  147.78          assert (pos <= lim && streamNumber >= 0);
  147.79 +
  147.80          int rem = (pos <= lim ? lim - pos : 0);
  147.81 -
  147.82 -        if (src instanceof DirectBuffer)
  147.83 -            return sendFromNativeBuffer(fd, src, rem, pos, target, assocId,
  147.84 -                    streamNumber, unordered, ppid);
  147.85 -
  147.86 -        /* Substitute a native buffer */
  147.87          ByteBuffer bb = Util.getTemporaryDirectBuffer(rem);
  147.88          try {
  147.89              bb.put(src);
  147.90 @@ -863,7 +860,7 @@
  147.91              /* Do not update src until we see how many bytes were written */
  147.92              src.position(pos);
  147.93  
  147.94 -            int n = sendFromNativeBuffer(fd, bb, rem, pos, target, assocId,
  147.95 +            int n = sendFromNativeBuffer(fd, bb, target, assocId,
  147.96                      streamNumber, unordered, ppid);
  147.97              if (n > 0) {
  147.98                  /* now update src */
  147.99 @@ -877,14 +874,17 @@
 147.100  
 147.101      private int sendFromNativeBuffer(int fd,
 147.102                                       ByteBuffer bb,
 147.103 -                                     int rem,
 147.104 -                                     int pos,
 147.105                                       SocketAddress target,
 147.106                                       int assocId,
 147.107                                       int streamNumber,
 147.108                                       boolean unordered,
 147.109                                       int ppid)
 147.110              throws IOException {
 147.111 +        int pos = bb.position();
 147.112 +        int lim = bb.limit();
 147.113 +        assert (pos <= lim);
 147.114 +        int rem = (pos <= lim ? lim - pos : 0);
 147.115 +
 147.116          int written = send0(fd, ((DirectBuffer)bb).address() + pos,
 147.117                              rem, target, assocId, streamNumber, unordered, ppid);
 147.118          if (written > 0)
 147.119 @@ -981,6 +981,5 @@
 147.120          Util.load();   /* loads nio & net native libraries */
 147.121          java.security.AccessController.doPrivileged(
 147.122                  new sun.security.action.LoadLibraryAction("sctp"));
 147.123 -        nd = new SctpSocketDispatcher();
 147.124      }
 147.125  }
   148.1 --- a/src/solaris/classes/sun/nio/ch/SctpNet.java	Thu Jan 21 11:12:37 2010 -0800
   148.2 +++ b/src/solaris/classes/sun/nio/ch/SctpNet.java	Fri Jan 22 09:34:17 2010 -0800
   148.3 @@ -29,6 +29,7 @@
   148.4  import java.net.InetAddress;
   148.5  import java.net.InetSocketAddress;
   148.6  import java.net.SocketAddress;
   148.7 +import java.nio.channels.AlreadyBoundException;
   148.8  import java.util.Set;
   148.9  import java.util.HashSet;
  148.10  import java.security.AccessController;
  148.11 @@ -52,8 +53,29 @@
  148.12          return false;
  148.13      }
  148.14  
  148.15 +    static boolean throwAlreadyBoundException() throws IOException {
  148.16 +        throw new AlreadyBoundException();
  148.17 +    }
  148.18 +
  148.19 +    static void listen(int fd, int backlog) throws IOException {
  148.20 +        listen0(fd, backlog);
  148.21 +    }
  148.22 +
  148.23 +    static int connect(int fd, InetAddress remote, int remotePort)
  148.24 +            throws IOException {
  148.25 +        return connect0(fd, remote, remotePort);
  148.26 +    }
  148.27 +
  148.28 +    static void close(int fd) throws IOException {
  148.29 +        close0(fd);
  148.30 +    }
  148.31 +
  148.32 +    static void preClose(int fd) throws IOException {
  148.33 +        preClose0(fd);
  148.34 +    }
  148.35 +
  148.36      /**
  148.37 -     * @param  oneToone
  148.38 +     * @param  oneToOne
  148.39       *         if {@code true} returns a one-to-one sctp socket, otherwise
  148.40       *         returns a one-to-many sctp socket
  148.41       */
  148.42 @@ -240,6 +262,15 @@
  148.43      /* Native Methods */
  148.44      static native int socket0(boolean oneToOne) throws IOException;
  148.45  
  148.46 +    static native void listen0(int fd, int backlog) throws IOException;
  148.47 +
  148.48 +    static native int connect0(int fd, InetAddress remote, int remotePort)
  148.49 +        throws IOException;
  148.50 +
  148.51 +    static native void close0(int fd) throws IOException;
  148.52 +
  148.53 +    static native void preClose0(int fd) throws IOException;
  148.54 +
  148.55      static native void bindx(int fd, InetAddress[] addrs, int port, int length,
  148.56              boolean add, boolean preferIPv6) throws IOException;
  148.57  
  148.58 @@ -271,5 +302,11 @@
  148.59              throws IOException;
  148.60  
  148.61      static native void shutdown0(int fd, int assocId);
  148.62 +
  148.63 +    static native void init();
  148.64 +
  148.65 +    static {
  148.66 +        init();
  148.67 +    }
  148.68  }
  148.69  
   149.1 --- a/src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java	Thu Jan 21 11:12:37 2010 -0800
   149.2 +++ b/src/solaris/classes/sun/nio/ch/SctpServerChannelImpl.java	Fri Jan 22 09:34:17 2010 -0800
   149.3 @@ -33,7 +33,6 @@
   149.4  import java.util.Set;
   149.5  import java.util.HashSet;
   149.6  import java.nio.channels.SelectionKey;
   149.7 -import java.nio.channels.AlreadyBoundException;
   149.8  import java.nio.channels.ClosedChannelException;
   149.9  import java.nio.channels.NotYetBoundException;
  149.10  import java.nio.channels.spi.SelectorProvider;
  149.11 @@ -49,9 +48,6 @@
  149.12  public class SctpServerChannelImpl extends SctpServerChannel
  149.13      implements SelChImpl
  149.14  {
  149.15 -    /* Used to make native close and preClose calls */
  149.16 -    private static NativeDispatcher nd;
  149.17 -
  149.18      private final FileDescriptor fd;
  149.19  
  149.20      private final int fdVal;
  149.21 @@ -103,7 +99,7 @@
  149.22                  if (!isOpen())
  149.23                      throw new ClosedChannelException();
  149.24                  if (isBound())
  149.25 -                    throw new AlreadyBoundException();
  149.26 +                    SctpNet.throwAlreadyBoundException();
  149.27  
  149.28                  InetSocketAddress isa = (local == null) ?
  149.29                      new InetSocketAddress(0) : Net.checkAddress(local);
  149.30 @@ -118,7 +114,7 @@
  149.31                      if (isa.getAddress().isAnyLocalAddress())
  149.32                          wildcard = true;
  149.33  
  149.34 -                Net.listen(fd, backlog < 1 ? 50 : backlog);
  149.35 +                SctpNet.listen(fdVal, backlog < 1 ? 50 : backlog);
  149.36              }
  149.37          }
  149.38          return this;
  149.39 @@ -156,7 +152,7 @@
  149.40                  if (add) {
  149.41                      for (InetSocketAddress addr : localAddresses) {
  149.42                          if (addr.getAddress().equals(address)) {
  149.43 -                            throw new AlreadyBoundException();
  149.44 +                            SctpNet.throwAlreadyBoundException();
  149.45                          }
  149.46                      }
  149.47                  } else { /*removing */
  149.48 @@ -261,7 +257,7 @@
  149.49      @Override
  149.50      public void implCloseSelectableChannel() throws IOException {
  149.51          synchronized (stateLock) {
  149.52 -            nd.preClose(fd);
  149.53 +            SctpNet.preClose(fdVal);
  149.54              if (thread != 0)
  149.55                  NativeThread.signal(thread);
  149.56              if (!isRegistered())
  149.57 @@ -282,7 +278,7 @@
  149.58  
  149.59              // Postpone the kill if there is a thread in accept
  149.60              if (thread == 0) {
  149.61 -                nd.close(fd);
  149.62 +                SctpNet.close(fdVal);
  149.63                  state = ChannelState.KILLED;
  149.64              } else {
  149.65                  state = ChannelState.KILLPENDING;
  149.66 @@ -423,7 +419,6 @@
  149.67          Util.load();   // loads nio & net native libraries
  149.68          java.security.AccessController.doPrivileged(
  149.69                  new sun.security.action.LoadLibraryAction("sctp"));
  149.70 -        nd = new SctpSocketDispatcher();
  149.71          initIDs();
  149.72      }
  149.73  }
   150.1 --- a/src/solaris/classes/sun/nio/ch/SctpSocketDispatcher.java	Thu Jan 21 11:12:37 2010 -0800
   150.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   150.3 @@ -1,68 +0,0 @@
   150.4 -/*
   150.5 - * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
   150.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   150.7 - *
   150.8 - * This code is free software; you can redistribute it and/or modify it
   150.9 - * under the terms of the GNU General Public License version 2 only, as
  150.10 - * published by the Free Software Foundation.  Sun designates this
  150.11 - * particular file as subject to the "Classpath" exception as provided
  150.12 - * by Sun in the LICENSE file that accompanied this code.
  150.13 - *
  150.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
  150.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  150.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  150.17 - * version 2 for more details (a copy is included in the LICENSE file that
  150.18 - * accompanied this code).
  150.19 - *
  150.20 - * You should have received a copy of the GNU General Public License version
  150.21 - * 2 along with this work; if not, write to the Free Software Foundation,
  150.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  150.23 - *
  150.24 - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  150.25 - * CA 95054 USA or visit www.sun.com if you need additional information or
  150.26 - * have any questions.
  150.27 - */
  150.28 -package sun.nio.ch;
  150.29 -
  150.30 -import java.io.IOException;
  150.31 -import java.io.FileDescriptor;
  150.32 -
  150.33 -/**
  150.34 - * Only used for {@code close} and {@code preclose}. All other methods
  150.35 - * throw {@code IOException}.
  150.36 - */
  150.37 -class SctpSocketDispatcher extends NativeDispatcher {
  150.38 -    @Override
  150.39 -    @SuppressWarnings("unused")
  150.40 -    int read(FileDescriptor fd, long address, int len) throws IOException {
  150.41 -         throw new IOException("Operation Unsupported");
  150.42 -    }
  150.43 -
  150.44 -    @Override
  150.45 -    @SuppressWarnings("unused")
  150.46 -    long readv(FileDescriptor fd, long address, int len) throws IOException {
  150.47 -         throw new IOException("Operation Unsupported");
  150.48 -    }
  150.49 -
  150.50 -    @Override
  150.51 -    @SuppressWarnings("unused")
  150.52 -    int write(FileDescriptor fd, long address, int len) throws IOException {
  150.53 -         throw new IOException("Operation Unsupported");
  150.54 -    }
  150.55 -
  150.56 -    @Override
  150.57 -    @SuppressWarnings("unused")
  150.58 -    long writev(FileDescriptor fd, long address, int len) throws IOException {
  150.59 -         throw new IOException("Operation Unsupported");
  150.60 -    }
  150.61 -
  150.62 -    @Override
  150.63 -    void close(FileDescriptor fd) throws IOException {
  150.64 -        FileDispatcherImpl.close0(fd);
  150.65 -    }
  150.66 -
  150.67 -    @Override
  150.68 -    void preClose(FileDescriptor fd) throws IOException {
  150.69 -        FileDispatcherImpl.preClose0(fd);
  150.70 -    }
  150.71 -}
   151.1 --- a/src/solaris/native/sun/nio/ch/SctpNet.c	Thu Jan 21 11:12:37 2010 -0800
   151.2 +++ b/src/solaris/native/sun/nio/ch/SctpNet.c	Fri Jan 22 09:34:17 2010 -0800
   151.3 @@ -48,6 +48,9 @@
   151.4      return JNI_VERSION_1_2;
   151.5  }
   151.6  
   151.7 +static int preCloseFD = -1;     /* File descriptor to which we dup other fd's
   151.8 +                                   before closing them for real */
   151.9 +
  151.10  /**
  151.11   * Loads the native sctp library that contains the socket extension
  151.12   * functions, as well as locating the individual functions.
  151.13 @@ -107,6 +110,55 @@
  151.14      return JNI_TRUE;
  151.15  }
  151.16  
  151.17 +jint
  151.18 +handleSocketError(JNIEnv *env, jint errorValue)
  151.19 +{
  151.20 +    char *xn;
  151.21 +    switch (errorValue) {
  151.22 +        case EINPROGRESS:     /* Non-blocking connect */
  151.23 +            return 0;
  151.24 +        case EPROTO:
  151.25 +            xn= JNU_JAVANETPKG "ProtocolException";
  151.26 +            break;
  151.27 +        case ECONNREFUSED:
  151.28 +            xn = JNU_JAVANETPKG "ConnectException";
  151.29 +            break;
  151.30 +        case ETIMEDOUT:
  151.31 +            xn = JNU_JAVANETPKG "ConnectException";
  151.32 +            break;
  151.33 +        case EHOSTUNREACH:
  151.34 +            xn = JNU_JAVANETPKG "NoRouteToHostException";
  151.35 +            break;
  151.36 +        case EADDRINUSE:  /* Fall through */
  151.37 +        case EADDRNOTAVAIL:
  151.38 +            xn = JNU_JAVANETPKG "BindException";
  151.39 +            break;
  151.40 +        default:
  151.41 +            xn = JNU_JAVANETPKG "SocketException";
  151.42 +            break;
  151.43 +    }
  151.44 +    errno = errorValue;
  151.45 +    JNU_ThrowByNameWithLastError(env, xn, "NioSocketError");
  151.46 +    return IOS_THROWN;
  151.47 +}
  151.48 +
  151.49 +/*
  151.50 + * Class:     sun_nio_ch_SctpNet
  151.51 + * Method:    init
  151.52 + * Signature: ()V
  151.53 + */
  151.54 +JNIEXPORT void JNICALL
  151.55 +Java_sun_nio_ch_SctpNet_init
  151.56 +  (JNIEnv *env, jclass cl) {
  151.57 +    int sp[2];
  151.58 +    if (socketpair(PF_UNIX, SOCK_STREAM, 0, sp) < 0) {
  151.59 +        JNU_ThrowIOExceptionWithLastError(env, "socketpair failed");
  151.60 +        return;
  151.61 +    }
  151.62 +    preCloseFD = sp[0];
  151.63 +    close(sp[1]);
  151.64 +}
  151.65 +
  151.66  /*
  151.67   * Class:     sun_nio_ch_SctpNet
  151.68   * Method:    socket0
  151.69 @@ -184,6 +236,76 @@
  151.70      free(sap);
  151.71  }
  151.72  
  151.73 +/*
  151.74 + * Class:     sun_nio_ch_SctpNet
  151.75 + * Method:    listen0
  151.76 + * Signature: (II)V
  151.77 + */
  151.78 +JNIEXPORT void JNICALL
  151.79 +Java_sun_nio_ch_SctpNet_listen0
  151.80 +  (JNIEnv *env, jclass cl, jint fd, jint backlog) {
  151.81 +    if (listen(fd, backlog) < 0)
  151.82 +        handleSocketError(env, errno);
  151.83 +}
  151.84 +
  151.85 +/*
  151.86 + * Class:     sun_nio_ch_SctpNet
  151.87 + * Method:    connect0
  151.88 + * Signature: (ILjava/net/InetAddress;I)I
  151.89 + */
  151.90 +JNIEXPORT jint JNICALL
  151.91 +Java_sun_nio_ch_SctpNet_connect0
  151.92 +  (JNIEnv *env, jclass clazz, int fd, jobject iao, jint port) {
  151.93 +    SOCKADDR sa;
  151.94 +    int sa_len = SOCKADDR_LEN;
  151.95 +    int rv;
  151.96 +
  151.97 +    if (NET_InetAddressToSockaddr(env, iao, port, (struct sockaddr *) &sa,
  151.98 +                                  &sa_len, JNI_TRUE) != 0) {
  151.99 +        return IOS_THROWN;
 151.100 +    }
 151.101 +
 151.102 +    rv = connect(fd, (struct sockaddr *)&sa, sa_len);
 151.103 +    if (rv != 0) {
 151.104 +        if (errno == EINPROGRESS) {
 151.105 +            return IOS_UNAVAILABLE;
 151.106 +        } else if (errno == EINTR) {
 151.107 +            return IOS_INTERRUPTED;
 151.108 +        }
 151.109 +        return handleSocketError(env, errno);
 151.110 +    }
 151.111 +    return 1;
 151.112 +}
 151.113 +
 151.114 +/*
 151.115 + * Class:     sun_nio_ch_SctpNet
 151.116 + * Method:    close0
 151.117 + * Signature: (I)V
 151.118 + */
 151.119 +JNIEXPORT void JNICALL
 151.120 +Java_sun_nio_ch_SctpNet_close0
 151.121 +  (JNIEnv *env, jclass clazz, jint fd) {
 151.122 +    if (fd != -1) {
 151.123 +        int rv = close(fd);
 151.124 +        if (rv < 0)
 151.125 +            JNU_ThrowIOExceptionWithLastError(env, "Close failed");
 151.126 +    }
 151.127 +}
 151.128 +
 151.129 +/*
 151.130 + * Class:     sun_nio_ch_SctpNet
 151.131 + * Method:    preClose0
 151.132 + * Signature: (I)V
 151.133 + */
 151.134 +JNIEXPORT void JNICALL
 151.135 +Java_sun_nio_ch_SctpNet_preClose0
 151.136 +  (JNIEnv *env, jclass clazz, jint fd) {
 151.137 +    if (preCloseFD >= 0) {
 151.138 +        if (dup2(preCloseFD, fd) < 0)
 151.139 +            JNU_ThrowIOExceptionWithLastError(env, "dup2 failed");
 151.140 +    }
 151.141 +}
 151.142 +
 151.143  void initializeISA
 151.144    (JNIEnv* env) {
 151.145      if (isaCls == 0) {
 151.146 @@ -394,7 +516,7 @@
 151.147          arglen = sizeof(arg);
 151.148      }
 151.149  
 151.150 -    if (setsockopt(fd, klevel, kopt, parg, arglen) < 0) {
 151.151 +    if (NET_SetSockOpt(fd, klevel, kopt, parg, arglen) < 0) {
 151.152          JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
 151.153                                       "sun_nio_ch_SctpNet.setIntOption0");
 151.154      }
 151.155 @@ -427,7 +549,7 @@
 151.156          arglen = sizeof(result);
 151.157      }
 151.158  
 151.159 -    if (getsockopt(fd, klevel, kopt, arg, &arglen) < 0) {
 151.160 +    if (NET_GetSockOpt(fd, klevel, kopt, arg, &arglen) < 0) {
 151.161          JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
 151.162                                       "sun.nio.ch.Net.getIntOption");
 151.163          return -1;
   152.1 --- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Thu Jan 21 11:12:37 2010 -0800
   152.2 +++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Fri Jan 22 09:34:17 2010 -0800
   152.3 @@ -445,20 +445,17 @@
   152.4                  // allocate OVERLAPPED
   152.5                  overlapped = ioCache.add(result);
   152.6  
   152.7 -                // synchronize on result to allow this thread handle the case
   152.8 -                // where the read completes immediately.
   152.9 -                synchronized (result) {
  152.10 -                    n = readFile(handle, address, rem, position, overlapped);
  152.11 -                    if (n == IOStatus.UNAVAILABLE) {
  152.12 -                        // I/O is pending
  152.13 -                        return;
  152.14 -                    }
  152.15 -                    // read completed immediately:
  152.16 -                    // 1. update buffer position
  152.17 -                    // 2. release waiters
  152.18 -                    updatePosition(n);
  152.19 +                // initiate read
  152.20 +                n = readFile(handle, address, rem, position, overlapped);
  152.21 +                if (n == IOStatus.UNAVAILABLE) {
  152.22 +                    // I/O is pending
  152.23 +                    return;
  152.24 +                } else if (n == IOStatus.EOF) {
  152.25                      result.setResult(n);
  152.26 +                } else {
  152.27 +                    throw new InternalError("Unexpected result: " + n);
  152.28                  }
  152.29 +
  152.30              } catch (Throwable x) {
  152.31                  // failed to initiate read
  152.32                  result.setFailure(toIOException(x));
  152.33 @@ -466,12 +463,9 @@
  152.34                  end();
  152.35              }
  152.36  
  152.37 -            // read failed or EOF so completion port will not be notified
  152.38 -            if (n < 0 && overlapped != 0L) {
  152.39 +            // release resources
  152.40 +            if (overlapped != 0L)
  152.41                  ioCache.remove(overlapped);
  152.42 -            }
  152.43 -
  152.44 -            // return direct buffer to cache if substituted
  152.45              releaseBufferIfSubstituted();
  152.46  
  152.47              // invoke completion handler
  152.48 @@ -634,20 +628,15 @@
  152.49                  // allocate an OVERLAPPED structure
  152.50                  overlapped = ioCache.add(result);
  152.51  
  152.52 -                // synchronize on result to allow this thread handle the case
  152.53 -                // where the read completes immediately.
  152.54 -                synchronized (result) {
  152.55 -                    n = writeFile(handle, address, rem, position, overlapped);
  152.56 -                    if (n == IOStatus.UNAVAILABLE) {
  152.57 -                        // I/O is pending
  152.58 -                        return;
  152.59 -                    }
  152.60 -                    // read completed immediately:
  152.61 -                    // 1. update buffer position
  152.62 -                    // 2. release waiters
  152.63 -                    updatePosition(n);
  152.64 -                    result.setResult(n);
  152.65 +                // initiate the write
  152.66 +                n = writeFile(handle, address, rem, position, overlapped);
  152.67 +                if (n == IOStatus.UNAVAILABLE) {
  152.68 +                    // I/O is pending
  152.69 +                    return;
  152.70 +                } else {
  152.71 +                    throw new InternalError("Unexpected result: " + n);
  152.72                  }
  152.73 +
  152.74              } catch (Throwable x) {
  152.75                  // failed to initiate read:
  152.76                  result.setFailure(toIOException(x));
   153.1 --- a/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c	Thu Jan 21 11:12:37 2010 -0800
   153.2 +++ b/src/windows/native/sun/nio/ch/WindowsAsynchronousFileChannelImpl.c	Fri Jan 22 09:34:17 2010 -0800
   153.3 @@ -39,7 +39,6 @@
   153.4      jlong handle, jlong address, jint len, jlong offset, jlong ov)
   153.5  {
   153.6      BOOL res;
   153.7 -    DWORD nread = 0;
   153.8  
   153.9      OVERLAPPED* lpOverlapped = (OVERLAPPED*)jlong_to_ptr(ov);
  153.10      lpOverlapped->Offset = (DWORD)offset;
  153.11 @@ -49,7 +48,7 @@
  153.12      res = ReadFile((HANDLE) jlong_to_ptr(handle),
  153.13                     (LPVOID) jlong_to_ptr(address),
  153.14                     (DWORD)len,
  153.15 -                   &nread,
  153.16 +                   NULL,
  153.17                     lpOverlapped);
  153.18  
  153.19      if (res == 0) {
  153.20 @@ -62,7 +61,7 @@
  153.21          return IOS_THROWN;
  153.22      }
  153.23  
  153.24 -    return (jint)nread;
  153.25 +    return IOS_UNAVAILABLE;
  153.26  }
  153.27  
  153.28  JNIEXPORT jint JNICALL
  153.29 @@ -70,7 +69,6 @@
  153.30      jlong handle, jlong address, jint len, jlong offset, jlong ov)
  153.31  {
  153.32      BOOL res;
  153.33 -    DWORD nwritten = 0;
  153.34  
  153.35      OVERLAPPED* lpOverlapped = (OVERLAPPED*)jlong_to_ptr(ov);
  153.36      lpOverlapped->Offset = (DWORD)offset;
  153.37 @@ -80,18 +78,18 @@
  153.38      res = WriteFile((HANDLE)jlong_to_ptr(handle),
  153.39                     (LPVOID) jlong_to_ptr(address),
  153.40                     (DWORD)len,
  153.41 -                   &nwritten,
  153.42 +                   NULL,
  153.43                     lpOverlapped);
  153.44  
  153.45      if (res == 0) {
  153.46          int error = GetLastError();
  153.47 -        if (error == ERROR_IO_PENDING) {
  153.48 +        if (error == ERROR_IO_PENDING)
  153.49              return IOS_UNAVAILABLE;
  153.50 -        }
  153.51          JNU_ThrowIOExceptionWithLastError(env, "WriteFile failed");
  153.52          return IOS_THROWN;
  153.53      }
  153.54 -    return (jint)nwritten;
  153.55 +
  153.56 +    return IOS_UNAVAILABLE;
  153.57  }
  153.58  
  153.59  JNIEXPORT jint JNICALL
   154.1 --- a/test/com/sun/jdi/ProcessAttachTest.sh	Thu Jan 21 11:12:37 2010 -0800
   154.2 +++ b/test/com/sun/jdi/ProcessAttachTest.sh	Fri Jan 22 09:34:17 2010 -0800
   154.3 @@ -54,10 +54,14 @@
   154.4  OS=`uname -s`
   154.5  
   154.6  case "$OS" in
   154.7 -  Windows* | CYGWIN_NT*)
   154.8 +  Windows*)
   154.9      PS=";"
  154.10      OS="Windows"
  154.11      ;;
  154.12 +  CYGWIN*)
  154.13 +    PS=";"
  154.14 +    OS="CYGWIN"
  154.15 +    ;;
  154.16    * )
  154.17      PS=":"
  154.18      ;;
  154.19 @@ -67,16 +71,23 @@
  154.20  {
  154.21    OUTPUTFILE=${TESTCLASSES}/Debuggee.out
  154.22    ${JAVA} "$@" > ${OUTPUTFILE} &
  154.23 -  pid="$!"
  154.24 +  startpid="$!"
  154.25 +  pid="${startpid}"
  154.26                                                                                                       
  154.27 +  # CYGWIN startpid is not the native windows PID we want, get the WINPID
  154.28 +  if [ "${OS}" = "CYGWIN" ]; then
  154.29 +    sleep 2
  154.30 +    ps -l -p ${startpid}
  154.31 +    pid=`ps -l -p ${startpid} | tail -1 | awk '{print $4;}'`
  154.32 +  fi
  154.33 +  
  154.34    # MKS creates an intermediate shell to launch ${JAVA} so
  154.35 -  # ${pid} is not the actual pid. We have put in a small sleep
  154.36 +  # ${startpid} is not the actual pid. We have put in a small sleep
  154.37    # to give the intermediate shell process time to launch the
  154.38    # "java" process.
  154.39    if [ "$OS" = "Windows" ]; then
  154.40      sleep 2
  154.41 -    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
  154.42 -    pid=${realpid}
  154.43 +    pid=`ps -o pid,ppid,comm|grep ${startpid}|grep "java"|cut -c1-6`
  154.44    fi
  154.45                                                                                                       
  154.46    echo "Waiting for Debuggee to initialize..."
  154.47 @@ -91,7 +102,7 @@
  154.48      echo "Waiting $attempts second(s) ..."
  154.49    done
  154.50  
  154.51 -  echo "Debuggee is process $pid"
  154.52 +  echo "Debuggee is process $pid (startpid=${startpid})"
  154.53  }
  154.54  
  154.55  stopDebuggee()
  154.56 @@ -100,7 +111,7 @@
  154.57    if [ $? != 0 ] ; then
  154.58      echo "Error: ShutdownDebuggee failed"
  154.59      failures=`expr $failures + 1`
  154.60 -    kill -9 $pid
  154.61 +    kill -9 ${startpid}
  154.62    fi
  154.63  }
  154.64  
  154.65 @@ -123,7 +134,7 @@
  154.66    -agentlib:jdwp=transport=dt_socket,server=y,suspend=n \
  154.67    -classpath "${TESTCLASSES}" ProcessAttachDebuggee "${PORTFILE}"
  154.68  
  154.69 -$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
  154.70 +$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
  154.71    ProcessAttachDebugger $pid 2>&1
  154.72  if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
  154.73  
  154.74 @@ -141,7 +152,7 @@
  154.75    -agentlib:jdwp=transport=dt_socket,server=y,suspend=y \
  154.76    -classpath "${TESTCLASSES}" ProcessAttachDebuggee "${PORTFILE}"
  154.77  
  154.78 -$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
  154.79 +$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
  154.80    ProcessAttachDebugger $pid 2>&1
  154.81  
  154.82  # The debuggee is suspended and doesn't run until the debugger
   155.1 --- a/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh	Thu Jan 21 11:12:37 2010 -0800
   155.2 +++ b/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh	Fri Jan 22 09:34:17 2010 -0800
   155.3 @@ -51,7 +51,7 @@
   155.4    Linux )
   155.5      PS=":"
   155.6      ;;
   155.7 -  Windows* )
   155.8 +  Windows* | CYGWIN*)
   155.9      PS=";"
  155.10      ;;
  155.11    * )
  155.12 @@ -71,7 +71,7 @@
  155.13  $JAVAC -d "${TESTCLASSES}" "${TESTSRC}"/JdiLoadedByCustomLoader.java
  155.14  
  155.15  mkdir "${SOMEOTHERDIR}"
  155.16 -$JAVAC -d "${SOMEOTHERDIR}" -classpath ${TESTSRC}${PS}${TESTJAVA}/lib/tools.jar \
  155.17 +$JAVAC -d "${SOMEOTHERDIR}" -classpath "${TESTSRC}${PS}${TESTJAVA}/lib/tools.jar" \
  155.18      "${TESTSRC}"/ListConnectors.java
  155.19  
  155.20  # Run the test 
   156.1 --- a/test/com/sun/nio/sctp/SctpChannel/Connect.java	Thu Jan 21 11:12:37 2010 -0800
   156.2 +++ b/test/com/sun/nio/sctp/SctpChannel/Connect.java	Fri Jan 22 09:34:17 2010 -0800
   156.3 @@ -192,6 +192,18 @@
   156.4              testCCE(new Callable<Void>() {
   156.5                  public Void call() throws IOException {
   156.6                      cceChannel.finishConnect(); return null; } });
   156.7 +
   156.8 +            /* TEST 8: IOException: Connection refused. Exercises handleSocketError.
   156.9 +             *         Assumption: no sctp socket listening on 3456 */
  156.10 +            SocketAddress addr = new InetSocketAddress("localhost", 3456);
  156.11 +            channel = SctpChannel.open();
  156.12 +            try {
  156.13 +                channel.connect(addr);
  156.14 +                fail("should have thrown ConnectException: Connection refused");
  156.15 +            } catch (IOException ioe) {
  156.16 +                pass();
  156.17 +            }
  156.18 +
  156.19          } catch (IOException ioe) {
  156.20              unexpected(ioe);
  156.21          } finally {
   157.1 --- a/test/com/sun/nio/sctp/SctpChannel/Send.java	Thu Jan 21 11:12:37 2010 -0800
   157.2 +++ b/test/com/sun/nio/sctp/SctpChannel/Send.java	Fri Jan 22 09:34:17 2010 -0800
   157.3 @@ -112,9 +112,6 @@
   157.4              /* Receive CommUp */
   157.5              channel.receive(buffer, null, handler);
   157.6  
   157.7 -            /* save for TEST 8 */
   157.8 -            Association association = channel.association();
   157.9 -
  157.10              /* TEST 2: send small message */
  157.11              int streamNumber = 0;
  157.12              debug("sending on stream number: " + streamNumber);
  157.13 @@ -250,6 +247,29 @@
  157.14                  pass();
  157.15                  debug("OK, caught " + e);
  157.16              }
  157.17 +
  157.18 +            /* TEST 9: Send from heap buffer to force implementation to
  157.19 +             * substitute with a native buffer, then check that its position
  157.20 +             * is updated correctly */
  157.21 +            buffer.clear();
  157.22 +            info = MessageInfo.createOutgoing(null, 0);
  157.23 +            buffer.put(Util.SMALL_MESSAGE.getBytes("ISO-8859-1"));
  157.24 +            buffer.flip();
  157.25 +            final int offset = 1;
  157.26 +            buffer.position(offset);
  157.27 +            remaining = buffer.remaining();
  157.28 +
  157.29 +            debug("sending small message: " + buffer);
  157.30 +            try {
  157.31 +                sent = channel.send(buffer, info);
  157.32 +
  157.33 +                check(sent == remaining, "sent should be equal to remaining");
  157.34 +                check(buffer.position() == (offset + sent),
  157.35 +                        "buffers position should have been incremented by sent");
  157.36 +            } catch (IllegalArgumentException iae) {
  157.37 +                fail(iae + ", Error updating buffers position");
  157.38 +            }
  157.39 +
  157.40          } catch (IOException ioe) {
  157.41              unexpected(ioe);
  157.42          } finally {
  157.43 @@ -335,6 +355,30 @@
  157.44                  /* TEST 7 ++ */
  157.45                  sc2 = ssc.accept();
  157.46  
  157.47 +                /* TEST 9 */
  157.48 +                ByteBuffer expected = ByteBuffer.allocate(Util.SMALL_BUFFER);
  157.49 +                expected.put(Util.SMALL_MESSAGE.getBytes("ISO-8859-1"));
  157.50 +                expected.flip();
  157.51 +                final int offset = 1;
  157.52 +                expected.position(offset);
  157.53 +                buffer.clear();
  157.54 +                do {
  157.55 +                    info = sc2.receive(buffer, null, null);
  157.56 +                    if (info == null) {
  157.57 +                        fail("Server: unexpected null from receive");
  157.58 +                        return;
  157.59 +                    }
  157.60 +                } while (!info.isComplete());
  157.61 +
  157.62 +                buffer.flip();
  157.63 +                check(info != null, "info is null");
  157.64 +                check(info.streamNumber() == 0, "message not sent on the correct stream");
  157.65 +                check(info.bytes() == expected.remaining(),
  157.66 +                      "bytes received not equal to message length");
  157.67 +                check(info.bytes() == buffer.remaining(), "bytes != remaining");
  157.68 +                check(expected.equals(buffer),
  157.69 +                    "received message not the same as sent message");
  157.70 +
  157.71                  clientFinishedLatch.await(10L, TimeUnit.SECONDS);
  157.72                  serverFinishedLatch.countDown();
  157.73              } catch (IOException ioe) {
   158.1 --- a/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java	Thu Jan 21 11:12:37 2010 -0800
   158.2 +++ b/test/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java	Fri Jan 22 09:34:17 2010 -0800
   158.3 @@ -104,7 +104,9 @@
   158.4              sc.setOption(SCTP_NODELAY, true);
   158.5              checkOption(sc, SCTP_NODELAY, true);
   158.6              sc.setOption(SO_SNDBUF, 16*1024);
   158.7 +            checkOption(sc, SO_SNDBUF, 16*1024);
   158.8              sc.setOption(SO_RCVBUF, 16*1024);
   158.9 +            checkOption(sc, SO_RCVBUF, 16*1024);
  158.10              checkOption(sc, SO_LINGER, -1);  /* default should be negative */
  158.11              sc.setOption(SO_LINGER, 2000);
  158.12              checkOption(sc, SO_LINGER, 2000);
   159.1 --- a/test/com/sun/nio/sctp/SctpMultiChannel/Send.java	Thu Jan 21 11:12:37 2010 -0800
   159.2 +++ b/test/com/sun/nio/sctp/SctpMultiChannel/Send.java	Fri Jan 22 09:34:17 2010 -0800
   159.3 @@ -185,6 +185,27 @@
   159.4              /* TEST 5: getRemoteAddresses(Association) */
   159.5              channel.getRemoteAddresses(assoc);
   159.6  
   159.7 +            /* TEST 6: Send from heap buffer to force implementation to
   159.8 +             * substitute with a native buffer, then check that its position
   159.9 +             * is updated correctly */
  159.10 +            info = MessageInfo.createOutgoing(assoc, null, 0);
  159.11 +            buffer.clear();
  159.12 +            buffer.put(Util.SMALL_MESSAGE.getBytes("ISO-8859-1"));
  159.13 +            buffer.flip();
  159.14 +            final int offset = 1;
  159.15 +            buffer.position(offset);
  159.16 +            remaining = buffer.remaining();
  159.17 +
  159.18 +            try {
  159.19 +                sent = channel.send(buffer, info);
  159.20 +
  159.21 +                check(sent == remaining, "sent should be equal to remaining");
  159.22 +                check(buffer.position() == (offset + sent),
  159.23 +                        "buffers position should have been incremented by sent");
  159.24 +            } catch (IllegalArgumentException iae) {
  159.25 +                fail(iae + ", Error updating buffers position");
  159.26 +            }
  159.27 +
  159.28          } catch (IOException ioe) {
  159.29              unexpected(ioe);
  159.30          } finally {
  159.31 @@ -284,6 +305,30 @@
  159.32                  bytes = serverChannel.send(buffer, info);
  159.33                  debug("Server: sent " + bytes + "bytes");
  159.34  
  159.35 +                /* TEST 6 */
  159.36 +                ByteBuffer expected = ByteBuffer.allocate(Util.SMALL_BUFFER);
  159.37 +                expected.put(Util.SMALL_MESSAGE.getBytes("ISO-8859-1"));
  159.38 +                expected.flip();
  159.39 +                final int offset = 1;
  159.40 +                expected.position(offset);
  159.41 +                buffer.clear();
  159.42 +                do {
  159.43 +                    info = serverChannel.receive(buffer, null, null);
  159.44 +                    if (info == null) {
  159.45 +                        fail("Server: unexpected null from receive");
  159.46 +                        return;
  159.47 +                    }
  159.48 +                } while (!info.isComplete());
  159.49 +
  159.50 +                buffer.flip();
  159.51 +                check(info != null, "info is null");
  159.52 +                check(info.streamNumber() == 0, "message not sent on the correct stream");
  159.53 +                check(info.bytes() == expected.remaining(),
  159.54 +                    "bytes received not equal to message length");
  159.55 +                check(info.bytes() == buffer.remaining(), "bytes != remaining");
  159.56 +                check(expected.equals(buffer),
  159.57 +                    "received message not the same as sent message");
  159.58 +
  159.59                  clientFinishedLatch.await(10L, TimeUnit.SECONDS);
  159.60                  serverFinishedLatch.countDown();
  159.61              } catch (IOException ioe) {
   160.1 --- a/test/com/sun/tools/attach/ApplicationSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   160.2 +++ b/test/com/sun/tools/attach/ApplicationSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   160.3 @@ -49,7 +49,11 @@
   160.4    # "java" process.
   160.5    if [ "$OS" = "Windows" ]; then
   160.6      sleep 2
   160.7 -    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
   160.8 +    if [ "${isCygwin}" = "true" ] ; then
   160.9 +      realpid=`ps -p ${pid} | tail -1 | awk '{print $4;}'`
  160.10 +    else
  160.11 +      realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
  160.12 +    fi
  160.13      pid=${realpid}
  160.14    fi
  160.15                                                                                                                    
  160.16 @@ -57,7 +61,7 @@
  160.17    attempts=0
  160.18    while true; do
  160.19      sleep 1
  160.20 -    port=`tail -1 ${OUTPUTFILE}`
  160.21 +    port=`tail -1 ${OUTPUTFILE} | sed -e 's@\\r@@g' `
  160.22      if [ ! -z "$port" ]; then
  160.23        # In case of errors wait time for output to be flushed
  160.24        sleep 1
   161.1 --- a/test/com/sun/tools/attach/BasicTests.sh	Thu Jan 21 11:12:37 2010 -0800
   161.2 +++ b/test/com/sun/tools/attach/BasicTests.sh	Fri Jan 22 09:34:17 2010 -0800
   161.3 @@ -48,7 +48,7 @@
   161.4  
   161.5  echo "Running tests ..."
   161.6  
   161.7 -$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
   161.8 +$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
   161.9    BasicTests $pid $agent $badagent $redefineagent 2>&1
  161.10  if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
  161.11  
   162.1 --- a/test/com/sun/tools/attach/CommonSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   162.2 +++ b/test/com/sun/tools/attach/CommonSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   162.3 @@ -49,6 +49,12 @@
   162.4      OS="Windows"
   162.5      FS="\\"
   162.6      ;;
   162.7 +  CYGWIN* )
   162.8 +    PS=";"
   162.9 +    OS="Windows"
  162.10 +    FS="\\"
  162.11 +    isCygwin=true
  162.12 +    ;;
  162.13    * )
  162.14      echo "Unrecognized system!"
  162.15      exit 1;
   163.1 --- a/test/com/sun/tools/attach/PermissionTests.sh	Thu Jan 21 11:12:37 2010 -0800
   163.2 +++ b/test/com/sun/tools/attach/PermissionTests.sh	Fri Jan 22 09:34:17 2010 -0800
   163.3 @@ -48,7 +48,7 @@
   163.4  
   163.5  echo "Deny test"
   163.6  # deny 
   163.7 -$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
   163.8 +$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
   163.9      -Djava.security.manager \
  163.10      -Djava.security.policy=${TESTSRC}/java.policy.deny \
  163.11      PermissionTest $pid true 2>&1
  163.12 @@ -56,7 +56,7 @@
  163.13  
  163.14  # allow
  163.15  echo "Allow test"
  163.16 -$JAVA -classpath ${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar \
  163.17 +$JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \
  163.18      -Djava.security.manager \
  163.19      -Djava.security.policy=${TESTSRC}/java.policy.allow \
  163.20      PermissionTest $pid false 2>&1 
   164.1 --- a/test/com/sun/tools/attach/ProviderTests.sh	Thu Jan 21 11:12:37 2010 -0800
   164.2 +++ b/test/com/sun/tools/attach/ProviderTests.sh	Fri Jan 22 09:34:17 2010 -0800
   164.3 @@ -46,6 +46,6 @@
   164.4  echo "Running test ..."
   164.5  
   164.6  $JAVA -classpath \
   164.7 -  ${TESTCLASSES}${PS}${TESTCLASSES}/SimpleProvider.jar${PS}${TESTJAVA}/lib/tools.jar \
   164.8 +  "${TESTCLASSES}${PS}${TESTCLASSES}/SimpleProvider.jar${PS}${TESTJAVA}/lib/tools.jar" \
   164.9    ProviderTest
  164.10  
   165.1 --- a/test/java/beans/Introspector/Test5102804.java	Thu Jan 21 11:12:37 2010 -0800
   165.2 +++ b/test/java/beans/Introspector/Test5102804.java	Fri Jan 22 09:34:17 2010 -0800
   165.3 @@ -24,6 +24,7 @@
   165.4  /*
   165.5   * @test
   165.6   * @bug 5102804
   165.7 + * @ignore This test is not predictable with regards to GC
   165.8   * @summary Tests memory leak
   165.9   * @author Sergey Malenkov
  165.10   */
   166.1 --- a/test/java/io/File/Basic.java	Thu Jan 21 11:12:37 2010 -0800
   166.2 +++ b/test/java/io/File/Basic.java	Fri Jan 22 09:34:17 2010 -0800
   166.3 @@ -75,7 +75,7 @@
   166.4          if (!f.canRead()) fail(f, "is not readable");
   166.5          if (f.canWrite() != writeable)
   166.6              fail(f, writeable ? "is not writeable" : "is writeable");
   166.7 -        int rwLen = (File.separatorChar == '/' ? 6 : 7);
   166.8 +        int rwLen = 6;
   166.9          if (f.length() != length) fail(f, "has wrong length");
  166.10      }
  166.11  
  166.12 @@ -89,7 +89,7 @@
  166.13          if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
  166.14  
  166.15          show(rwFile);
  166.16 -        testFile(rwFile, true, File.separatorChar == '/' ? 6 : 7);
  166.17 +        testFile(rwFile, true, 6);
  166.18          rwFile.delete();
  166.19          if (rwFile.exists())
  166.20              fail(rwFile, "could not delete");
   167.1 --- a/test/java/io/File/basic.sh	Thu Jan 21 11:12:37 2010 -0800
   167.2 +++ b/test/java/io/File/basic.sh	Fri Jan 22 09:34:17 2010 -0800
   167.3 @@ -32,10 +32,10 @@
   167.4  
   167.5  rm -rf x.Basic.*
   167.6  rm -f x.Basic.non
   167.7 -echo xyzzy > x.Basic.rw
   167.8 +printf "%s" "xyzzyN" > x.Basic.rw
   167.9  touch x.Basic.ro; chmod ugo-w x.Basic.ro
  167.10  mkdir x.Basic.dir
  167.11 -if $TESTJAVA/bin/java $* -classpath $TESTCLASSES Basic; then
  167.12 +if $TESTJAVA/bin/java $* -classpath "$TESTCLASSES" Basic; then
  167.13    [ -f x.Basic.rw ] && (echo "x.Basic.rw not deleted"; exit 1)
  167.14    ([ -d x.Basic.dir ] || [ \! -d x.Basic.dir2 ]) \
  167.15      && (echo "x.Basic.dir not renamed"; exit 1)
   168.1 --- a/test/java/io/Serializable/evolution/RenamePackage/run.sh	Thu Jan 21 11:12:37 2010 -0800
   168.2 +++ b/test/java/io/Serializable/evolution/RenamePackage/run.sh	Fri Jan 22 09:34:17 2010 -0800
   168.3 @@ -43,7 +43,7 @@
   168.4  case "$OS" in
   168.5  SunOS | Linux )
   168.6    PS=":"  ;;
   168.7 -Windows* )
   168.8 +Windows* | CYGWIN* )
   168.9    PS=";"  ;;
  168.10  * )
  168.11    echo "Unrecognized system!"
  168.12 @@ -85,14 +85,14 @@
  168.13  ${JAVAC} -d ${TESTCLASSES}/nclasses ${TESTSRC}/install/SerialDriver.java
  168.14  
  168.15  # Run Case 1. Map test.SerialDriver within stream to install.SerialDriver.
  168.16 -CLASSPATH=${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
  168.17 +CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
  168.18  ${JAVA} test.SerialDriver -s
  168.19 -CLASSPATH=${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
  168.20 +CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
  168.21  ${JAVA} install.SerialDriver -d
  168.22  rm stream.ser
  168.23  
  168.24  # Run Case 2. Map install.SerialDriver within stream to test.SerialDriver.
  168.25 -CLASSPATH=${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
  168.26 +CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
  168.27  ${JAVA} install.SerialDriver -s
  168.28 -CLASSPATH=${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share; export CLASSPATH;
  168.29 +CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH;
  168.30  ${JAVA} test.SerialDriver -d
   169.1 --- a/test/java/io/Serializable/serialver/classpath/run.sh	Thu Jan 21 11:12:37 2010 -0800
   169.2 +++ b/test/java/io/Serializable/serialver/classpath/run.sh	Fri Jan 22 09:34:17 2010 -0800
   169.3 @@ -49,7 +49,7 @@
   169.4  case "$OS" in
   169.5    SunOS | Linux )
   169.6      PS=":"    ;;
   169.7 -  Windows* )
   169.8 +  Windows* | CYGWIN* )
   169.9      PS=";"    ;;
  169.10    * )
  169.11      echo "Unrecognized system!"
   170.1 --- a/test/java/io/Serializable/serialver/nested/run.sh	Thu Jan 21 11:12:37 2010 -0800
   170.2 +++ b/test/java/io/Serializable/serialver/nested/run.sh	Fri Jan 22 09:34:17 2010 -0800
   170.3 @@ -49,7 +49,7 @@
   170.4  case "$OS" in
   170.5    SunOS | Linux )
   170.6      PS=":"    ;;
   170.7 -  Windows* )
   170.8 +  Windows* | CYGWIN* )
   170.9      PS=";"    ;;
  170.10    * )
  170.11      echo "Unrecognized system!"
   171.1 --- a/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh	Thu Jan 21 11:12:37 2010 -0800
   171.2 +++ b/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh	Fri Jan 22 09:34:17 2010 -0800
   171.3 @@ -55,7 +55,7 @@
   171.4    Linux )
   171.5      FS="/"
   171.6      ;;
   171.7 -  Windows* )
   171.8 +  Windows* | CYGWIN* )
   171.9      FS="\\"
  171.10      ;;
  171.11  esac
   172.1 --- a/test/java/lang/StringCoding/CheckEncodings.sh	Thu Jan 21 11:12:37 2010 -0800
   172.2 +++ b/test/java/lang/StringCoding/CheckEncodings.sh	Fri Jan 22 09:34:17 2010 -0800
   172.3 @@ -31,7 +31,7 @@
   172.4  OS=`uname -s`
   172.5  case "$OS" in
   172.6    SunOS | Linux ) ;;
   172.7 -  Windows* )
   172.8 +  Windows* | CYGWIN* )
   172.9      echo "Passed"; exit 0 ;;
  172.10    * ) echo "Unrecognized system!" ;  exit 1 ;;
  172.11  esac
   173.1 --- a/test/java/lang/System/finalization/FinExit.sh	Thu Jan 21 11:12:37 2010 -0800
   173.2 +++ b/test/java/lang/System/finalization/FinExit.sh	Fri Jan 22 09:34:17 2010 -0800
   173.3 @@ -24,7 +24,9 @@
   173.4  #
   173.5  
   173.6  #
   173.7 -x=`$TESTJAVA/bin/java -cp $TESTCLASSES FinExit`
   173.8 +
   173.9 +# We only want the first character, Windows might add CRLF
  173.10 +x=`$TESTJAVA/bin/java -cp "$TESTCLASSES" FinExit | cut -c1`
  173.11  echo $x
  173.12  if [ "x$x" != "x1" ]; then
  173.13    echo On-exit finalizer invoked twice
   174.1 --- a/test/java/lang/annotation/loaderLeak/LoaderLeak.sh	Thu Jan 21 11:12:37 2010 -0800
   174.2 +++ b/test/java/lang/annotation/loaderLeak/LoaderLeak.sh	Fri Jan 22 09:34:17 2010 -0800
   174.3 @@ -49,6 +49,11 @@
   174.4      PS=":"
   174.5      FS="/"
   174.6      ;;
   174.7 +  CYGWIN* )
   174.8 +    NULL=/dev/null
   174.9 +    PS=";"
  174.10 +    FS="/"
  174.11 +    ;;
  174.12    Windows* )
  174.13      NULL=NUL
  174.14      PS=";"
   175.1 --- a/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   175.2 +++ b/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   175.3 @@ -43,11 +43,17 @@
   175.4      PS=":"
   175.5      FS="/"
   175.6      ;;
   175.7 -  Windows* | CYGWIN*)
   175.8 +  Windows*)
   175.9      PS=";"
  175.10      OS="Windows"
  175.11      FS="\\"
  175.12      ;;
  175.13 +  CYGWIN*)
  175.14 +    PS=";"
  175.15 +    OS="Windows"
  175.16 +    FS="\\"
  175.17 +    isCygwin=true
  175.18 +    ;;
  175.19    * )
  175.20      echo "Unrecognized system!"
  175.21      exit 1;
   176.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   176.2 +++ b/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java	Fri Jan 22 09:34:17 2010 -0800
   176.3 @@ -0,0 +1,162 @@
   176.4 +/*
   176.5 + * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
   176.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   176.7 + *
   176.8 + * This code is free software; you can redistribute it and/or modify it
   176.9 + * under the terms of the GNU General Public License version 2 only, as
  176.10 + * published by the Free Software Foundation.
  176.11 + *
  176.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  176.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  176.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  176.15 + * version 2 for more details (a copy is included in the LICENSE file that
  176.16 + * accompanied this code).
  176.17 + *
  176.18 + * You should have received a copy of the GNU General Public License version
  176.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  176.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  176.21 + *
  176.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  176.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
  176.24 + * have any questions.
  176.25 + */
  176.26 +
  176.27 +/* @test
  176.28 + * @bug 6913877
  176.29 + * @summary Stress AsynchronousFileChannel.write
  176.30 + */
  176.31 +
  176.32 +import java.io.*;
  176.33 +import java.nio.ByteBuffer;
  176.34 +import static java.nio.file.StandardOpenOption.*;
  176.35 +import java.nio.channels.*;
  176.36 +import java.util.Random;
  176.37 +import java.util.concurrent.CountDownLatch;
  176.38 +
  176.39 +public class LotsOfWrites {
  176.40 +    static final Random rand = new Random();
  176.41 +
  176.42 +    /**
  176.43 +     * Asynchronously writes a known pattern to a file up to a given size,
  176.44 +     * counting down a latch to release waiters when done.
  176.45 +     */
  176.46 +    static class Writer implements CompletionHandler<Integer,ByteBuffer> {
  176.47 +        private final File file;
  176.48 +        private final long size;
  176.49 +        private final CountDownLatch latch;
  176.50 +        private final AsynchronousFileChannel channel;
  176.51 +
  176.52 +        private volatile long position;
  176.53 +        private volatile byte nextByte;
  176.54 +
  176.55 +        private long updatePosition(long nwrote) {
  176.56 +            position += nwrote;
  176.57 +            return position;
  176.58 +        }
  176.59 +
  176.60 +        private ByteBuffer genNextBuffer() {
  176.61 +            int n = Math.min(8192 + rand.nextInt(8192), (int)(size - position));
  176.62 +            ByteBuffer buf = ByteBuffer.allocate(n);
  176.63 +            for (int i=0; i<n; i++) {
  176.64 +                buf.put(nextByte++);
  176.65 +            }
  176.66 +            buf.flip();
  176.67 +            return buf;
  176.68 +        }
  176.69 +
  176.70 +        // close channel and release any waiters
  176.71 +        private void done() {
  176.72 +            try {
  176.73 +                channel.close();
  176.74 +            } catch (IOException ignore) { }
  176.75 +            latch.countDown();
  176.76 +        }
  176.77 +
  176.78 +        Writer(File file, long size, CountDownLatch latch) throws IOException {
  176.79 +            this.file = file;
  176.80 +            this.size = size;
  176.81 +            this.latch = latch;
  176.82 +            this.channel = AsynchronousFileChannel.open(file.toPath(), WRITE);
  176.83 +        }
  176.84 +
  176.85 +        File file() {
  176.86 +            return file;
  176.87 +        }
  176.88 +
  176.89 +        long size() {
  176.90 +            return size;
  176.91 +        }
  176.92 +
  176.93 +        // initiate first write
  176.94 +        void start() {
  176.95 +            ByteBuffer buf = genNextBuffer();
  176.96 +            channel.write(buf, 0L, buf, this);
  176.97 +        }
  176.98 +
  176.99 +        @Override
 176.100 +        public void completed(Integer nwrote, ByteBuffer buf) {
 176.101 +            long pos = updatePosition(nwrote);
 176.102 +            if (!buf.hasRemaining()) {
 176.103 +                // buffer has been completely written; decide if we need to
 176.104 +                // write more
 176.105 +                if (position >= size) {
 176.106 +                    done();
 176.107 +                    return;
 176.108 +                }
 176.109 +                buf = genNextBuffer();
 176.110 +            }
 176.111 +            channel.write(buf, pos, buf, this);
 176.112 +        }
 176.113 +
 176.114 +        @Override
 176.115 +        public void failed(Throwable exc, ByteBuffer buf) {
 176.116 +            exc.printStackTrace();
 176.117 +            done();
 176.118 +        }
 176.119 +    }
 176.120 +
 176.121 +    public static void main(String[] args) throws Exception {
 176.122 +        // random number of writers
 176.123 +        int count = 20 + rand.nextInt(16);
 176.124 +        Writer[] writers = new Writer[count];
 176.125 +        CountDownLatch latch = new CountDownLatch(count);
 176.126 +
 176.127 +        // initiate writing to each file
 176.128 +        for (int i=0; i<count; i++) {
 176.129 +            long size = 512*1024 + rand.nextInt(512*1024);
 176.130 +            File blah = File.createTempFile("blah", null);
 176.131 +            blah.deleteOnExit();
 176.132 +            Writer writer = new Writer(blah, size, latch);
 176.133 +            writers[i] = writer;
 176.134 +            writer.start();
 176.135 +        }
 176.136 +
 176.137 +        // wait for writing to complete
 176.138 +        latch.await();
 176.139 +
 176.140 +        // verify content of each file
 176.141 +        byte[] buf = new byte[8192];
 176.142 +        for (int i=0; i<count ;i++) {
 176.143 +            Writer writer = writers[i];
 176.144 +            FileInputStream in = new FileInputStream(writer.file());
 176.145 +            try {
 176.146 +                long size = 0L;
 176.147 +                byte expected = 0;
 176.148 +                int nread = in.read(buf);
 176.149 +                while (nread > 0) {
 176.150 +                    for (int j=0; j<nread; j++) {
 176.151 +                        if (buf[j] != expected)
 176.152 +                            throw new RuntimeException("Unexpected byte");
 176.153 +                        expected++;
 176.154 +                    }
 176.155 +                    size += nread;
 176.156 +                    nread = in.read(buf);
 176.157 +                }
 176.158 +                if (size != writer.size())
 176.159 +                    throw new RuntimeException("Unexpected size");
 176.160 +            } finally {
 176.161 +                in.close();
 176.162 +            }
 176.163 +        }
 176.164 +    }
 176.165 +}
   177.1 --- a/test/java/nio/channels/Selector/lots_of_updates.sh	Thu Jan 21 11:12:37 2010 -0800
   177.2 +++ b/test/java/nio/channels/Selector/lots_of_updates.sh	Fri Jan 22 09:34:17 2010 -0800
   177.3 @@ -30,7 +30,7 @@
   177.4  
   177.5  OS=`uname -s`
   177.6  case "$OS" in
   177.7 -    Windows_* )
   177.8 +    Windows_* | CYGWIN* )
   177.9          echo "ulimit not on Windows"
  177.10          exit 0
  177.11          ;;
   178.1 --- a/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh	Thu Jan 21 11:12:37 2010 -0800
   178.2 +++ b/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh	Fri Jan 22 09:34:17 2010 -0800
   178.3 @@ -38,7 +38,7 @@
   178.4  
   178.5  OS=`uname -s`
   178.6  case "$OS" in
   178.7 -    Windows_* )
   178.8 +    Windows_* | CYGWIN* )
   178.9          CLASSPATH="${TESTCLASSES};${TESTSRC}"
  178.10          ;;
  178.11      * )
   179.1 --- a/test/java/nio/file/Files/walk_file_tree.sh	Thu Jan 21 11:12:37 2010 -0800
   179.2 +++ b/test/java/nio/file/Files/walk_file_tree.sh	Fri Jan 22 09:34:17 2010 -0800
   179.3 @@ -39,7 +39,7 @@
   179.4  
   179.5  OS=`uname -s`
   179.6  case "$OS" in
   179.7 -    Windows_* )
   179.8 +    Windows_* | CYGWIN* )
   179.9          echo "This test does not run on Windows" 
  179.10          exit 0
  179.11          ;;
   180.1 --- a/test/java/nio/file/Path/CopyAndMove.java	Thu Jan 21 11:12:37 2010 -0800
   180.2 +++ b/test/java/nio/file/Path/CopyAndMove.java	Fri Jan 22 09:34:17 2010 -0800
   180.3 @@ -22,10 +22,10 @@
   180.4   */
   180.5  
   180.6  /* @test
   180.7 - * @bug 4313887 6838333
   180.8 + * @bug 4313887 6838333 6917021
   180.9   * @summary Unit test for java.nio.file.Path copyTo/moveTo methods
  180.10   * @library ..
  180.11 - * @build CopyAndMove
  180.12 + * @build CopyAndMove PassThroughFileSystem
  180.13   * @run main/othervm CopyAndMove
  180.14   */
  180.15  
  180.16 @@ -40,22 +40,31 @@
  180.17  public class CopyAndMove {
  180.18      static final Random rand = new Random();
  180.19      static boolean heads() { return rand.nextBoolean(); }
  180.20 -    static boolean supportsLinks;
  180.21  
  180.22      public static void main(String[] args) throws Exception {
  180.23          Path dir1 = TestUtil.createTemporaryDirectory();
  180.24          try {
  180.25 -            supportsLinks = TestUtil.supportsLinks(dir1);
  180.26 +            // Same directory
  180.27 +            doCopyTests(dir1, dir1, TestUtil.supportsLinks(dir1));
  180.28 +            doMoveTests(dir1, dir1, TestUtil.supportsLinks(dir1));
  180.29  
  180.30 -            // Exercise copyTo
  180.31 -            doCopyTests(dir1);
  180.32 +            // Different directories. Use test.dir if possible as it might be
  180.33 +            // a different volume/file system and so improve test coverage.
  180.34 +            String testDir = System.getProperty("test.dir", ".");
  180.35 +            Path dir2 = TestUtil.createTemporaryDirectory(testDir);
  180.36 +            try {
  180.37 +                boolean testSymbolicLinks =
  180.38 +                    TestUtil.supportsLinks(dir1) && TestUtil.supportsLinks(dir2);
  180.39 +                doCopyTests(dir1, dir2, testSymbolicLinks);
  180.40 +                doMoveTests(dir1, dir2, testSymbolicLinks);
  180.41 +            } finally {
  180.42 +                TestUtil.removeAll(dir2);
  180.43 +            }
  180.44  
  180.45 -            // Exercise moveTo
  180.46 -            // if test.dir differs to temporary file system then can test
  180.47 -            // moving between devices
  180.48 -            String testDir = System.getProperty("test.dir");
  180.49 -            Path dir2 = (testDir != null) ? Paths.get(testDir) : dir1;
  180.50 -            doMoveTests(dir1, dir2);
  180.51 +            // Target is location associated with custom provider
  180.52 +            Path dir3 = PassThroughFileSystem.create().getPath(dir1.toString());
  180.53 +            doCopyTests(dir1, dir3, false);
  180.54 +            doMoveTests(dir1, dir3, false);
  180.55  
  180.56          } finally {
  180.57              TestUtil.removeAll(dir1);
  180.58 @@ -186,30 +195,37 @@
  180.59          checkBasicAttributes(basicAttributes,
  180.60              Attributes.readBasicFileAttributes(target, NOFOLLOW_LINKS));
  180.61  
  180.62 -        // verify POSIX attributes
  180.63 -        if (posixAttributes != null && !basicAttributes.isSymbolicLink()) {
  180.64 -            checkPosixAttributes(posixAttributes,
  180.65 -                Attributes.readPosixFileAttributes(target, NOFOLLOW_LINKS));
  180.66 -        }
  180.67 +        // verify other attributes when same provider
  180.68 +        if (source.getFileSystem().provider() == target.getFileSystem().provider()) {
  180.69  
  180.70 -        // verify DOS attributes
  180.71 -        if (dosAttributes != null && !basicAttributes.isSymbolicLink()) {
  180.72 -            checkDosAttributes(dosAttributes,
  180.73 -                Attributes.readDosFileAttributes(target, NOFOLLOW_LINKS));
  180.74 -        }
  180.75 +            // verify POSIX attributes
  180.76 +            if (posixAttributes != null && !basicAttributes.isSymbolicLink()) {
  180.77 +                checkPosixAttributes(posixAttributes,
  180.78 +                    Attributes.readPosixFileAttributes(target, NOFOLLOW_LINKS));
  180.79 +            }
  180.80  
  180.81 -        // verify named attributes
  180.82 -        if (namedAttributes != null &&
  180.83 -            target.getFileStore().supportsFileAttributeView("xattr"))
  180.84 -        {
  180.85 -            checkUserDefinedFileAttributes(namedAttributes, readUserDefinedFileAttributes(target));
  180.86 +            // verify DOS attributes
  180.87 +            if (dosAttributes != null && !basicAttributes.isSymbolicLink()) {
  180.88 +                checkDosAttributes(dosAttributes,
  180.89 +                    Attributes.readDosFileAttributes(target, NOFOLLOW_LINKS));
  180.90 +            }
  180.91 +
  180.92 +            // verify named attributes
  180.93 +            if (namedAttributes != null &&
  180.94 +                target.getFileStore().supportsFileAttributeView("xattr"))
  180.95 +            {
  180.96 +                checkUserDefinedFileAttributes(namedAttributes,
  180.97 +                                               readUserDefinedFileAttributes(target));
  180.98 +            }
  180.99          }
 180.100      }
 180.101  
 180.102      /**
 180.103       * Tests all possible ways to invoke moveTo
 180.104       */
 180.105 -    static void doMoveTests(Path dir1, Path dir2) throws IOException {
 180.106 +    static void doMoveTests(Path dir1, Path dir2, boolean supportsLinks)
 180.107 +        throws IOException
 180.108 +    {
 180.109          Path source, target, entry;
 180.110  
 180.111          boolean sameDevice = dir1.getFileStore().equals(dir2.getFileStore());
 180.112 @@ -220,7 +236,7 @@
 180.113           * Test: move regular file, target does not exist
 180.114           */
 180.115          source = createSourceFile(dir1);
 180.116 -        target = getTargetFile(dir1);
 180.117 +        target = getTargetFile(dir2);
 180.118          moveAndVerify(source, target);
 180.119          target.delete();
 180.120  
 180.121 @@ -228,7 +244,7 @@
 180.122           * Test: move regular file, target exists
 180.123           */
 180.124          source = createSourceFile(dir1);
 180.125 -        target = getTargetFile(dir1).createFile();
 180.126 +        target = getTargetFile(dir2).createFile();
 180.127          try {
 180.128              moveAndVerify(source, target);
 180.129              throw new RuntimeException("FileAlreadyExistsException expected");
 180.130 @@ -248,7 +264,7 @@
 180.131           * Test: move regular file, target does not exist
 180.132           */
 180.133          source = createSourceFile(dir1);
 180.134 -        target = getTargetFile(dir1);
 180.135 +        target = getTargetFile(dir2);
 180.136          moveAndVerify(source, target, REPLACE_EXISTING);
 180.137          target.delete();
 180.138  
 180.139 @@ -256,7 +272,7 @@
 180.140           * Test: move regular file, target exists
 180.141           */
 180.142          source = createSourceFile(dir1);
 180.143 -        target = getTargetFile(dir1).createFile();
 180.144 +        target = getTargetFile(dir2).createFile();
 180.145          moveAndVerify(source, target, REPLACE_EXISTING);
 180.146          target.delete();
 180.147  
 180.148 @@ -264,7 +280,7 @@
 180.149           * Test: move regular file, target exists and is empty directory
 180.150           */
 180.151          source = createSourceFile(dir1);
 180.152 -        target = getTargetFile(dir1).createDirectory();
 180.153 +        target = getTargetFile(dir2).createDirectory();
 180.154          moveAndVerify(source, target, REPLACE_EXISTING);
 180.155          target.delete();
 180.156  
 180.157 @@ -272,7 +288,7 @@
 180.158           * Test: move regular file, target exists and is non-empty directory
 180.159           */
 180.160          source = createSourceFile(dir1);
 180.161 -        target = getTargetFile(dir1).createDirectory();
 180.162 +        target = getTargetFile(dir2).createDirectory();
 180.163          entry = target.resolve("foo").createFile();
 180.164          try {
 180.165              moveAndVerify(source, target);
 180.166 @@ -311,7 +327,7 @@
 180.167           * Test: move empty directory, target does not exist
 180.168           */
 180.169          source = createSourceDirectory(dir1);
 180.170 -        target = getTargetFile(dir1);
 180.171 +        target = getTargetFile(dir2);
 180.172          moveAndVerify(source, target);
 180.173          target.delete();
 180.174  
 180.175 @@ -319,7 +335,7 @@
 180.176           * Test: move empty directory, target exists
 180.177           */
 180.178          source = createSourceDirectory(dir1);
 180.179 -        target = getTargetFile(dir1).createFile();
 180.180 +        target = getTargetFile(dir2).createFile();
 180.181          try {
 180.182              moveAndVerify(source, target);
 180.183              throw new RuntimeException("FileAlreadyExistsException expected");
 180.184 @@ -339,7 +355,7 @@
 180.185           * Test: move empty directory, target does not exist
 180.186           */
 180.187          source = createSourceDirectory(dir1);
 180.188 -        target = getTargetFile(dir1);
 180.189 +        target = getTargetFile(dir2);
 180.190          moveAndVerify(source, target, REPLACE_EXISTING);
 180.191          target.delete();
 180.192  
 180.193 @@ -347,7 +363,7 @@
 180.194           * Test: move empty directory, target exists
 180.195           */
 180.196          source = createSourceDirectory(dir1);
 180.197 -        target = getTargetFile(dir1).createFile();
 180.198 +        target = getTargetFile(dir2).createFile();
 180.199          moveAndVerify(source, target, REPLACE_EXISTING);
 180.200          target.delete();
 180.201  
 180.202 @@ -355,7 +371,7 @@
 180.203           * Test: move empty, target exists and is empty directory
 180.204           */
 180.205          source = createSourceDirectory(dir1);
 180.206 -        target = getTargetFile(dir1).createDirectory();
 180.207 +        target = getTargetFile(dir2).createDirectory();
 180.208          moveAndVerify(source, target, REPLACE_EXISTING);
 180.209          target.delete();
 180.210  
 180.211 @@ -363,7 +379,7 @@
 180.212           * Test: move empty directory, target exists and is non-empty directory
 180.213           */
 180.214          source = createSourceDirectory(dir1);
 180.215 -        target = getTargetFile(dir1).createDirectory();
 180.216 +        target = getTargetFile(dir2).createDirectory();
 180.217          entry = target.resolve("foo").createFile();
 180.218          try {
 180.219              moveAndVerify(source, target, REPLACE_EXISTING);
 180.220 @@ -418,7 +434,7 @@
 180.221          if (supportsLinks) {
 180.222              Path tmp = createSourceFile(dir1);
 180.223              source = dir1.resolve("link").createSymbolicLink(tmp);
 180.224 -            target = getTargetFile(dir1);
 180.225 +            target = getTargetFile(dir2);
 180.226              moveAndVerify(source, target);
 180.227              target.delete();
 180.228              tmp.delete();
 180.229 @@ -429,7 +445,7 @@
 180.230           */
 180.231          if (supportsLinks) {
 180.232              source = dir1.resolve("link").createSymbolicLink(dir2);
 180.233 -            target = getTargetFile(dir1);
 180.234 +            target = getTargetFile(dir2);
 180.235              moveAndVerify(source, target);
 180.236              target.delete();
 180.237          }
 180.238 @@ -440,7 +456,7 @@
 180.239          if (supportsLinks) {
 180.240              Path tmp = Paths.get("doesnotexist");
 180.241              source = dir1.resolve("link").createSymbolicLink(tmp);
 180.242 -            target = getTargetFile(dir1);
 180.243 +            target = getTargetFile(dir2);
 180.244              moveAndVerify(source, target);
 180.245              target.delete();
 180.246          }
 180.247 @@ -450,7 +466,7 @@
 180.248           */
 180.249          if (supportsLinks) {
 180.250              source = dir1.resolve("link").createSymbolicLink(dir2);
 180.251 -            target = getTargetFile(dir1).createFile();
 180.252 +            target = getTargetFile(dir2).createFile();
 180.253              try {
 180.254                  moveAndVerify(source, target);
 180.255                  throw new RuntimeException("FileAlreadyExistsException expected");
 180.256 @@ -465,7 +481,7 @@
 180.257           */
 180.258          if (supportsLinks) {
 180.259              source = dir1.resolve("link").createSymbolicLink(dir2);
 180.260 -            target = getTargetFile(dir1).createFile();
 180.261 +            target = getTargetFile(dir2).createFile();
 180.262              moveAndVerify(source, target, REPLACE_EXISTING);
 180.263              target.delete();
 180.264          }
 180.265 @@ -475,7 +491,7 @@
 180.266           */
 180.267          if (supportsLinks) {
 180.268              source = dir1.resolve("link").createSymbolicLink(dir2);
 180.269 -            target = getTargetFile(dir1).createDirectory();
 180.270 +            target = getTargetFile(dir2).createDirectory();
 180.271              moveAndVerify(source, target, REPLACE_EXISTING);
 180.272              target.delete();
 180.273          }
 180.274 @@ -485,7 +501,7 @@
 180.275           */
 180.276          if (supportsLinks) {
 180.277              source = dir1.resolve("link").createSymbolicLink(dir2);
 180.278 -            target = getTargetFile(dir1).createDirectory();
 180.279 +            target = getTargetFile(dir2).createDirectory();
 180.280              entry = target.resolve("foo").createFile();
 180.281              try {
 180.282                  moveAndVerify(source, target);
 180.283 @@ -502,7 +518,7 @@
 180.284           */
 180.285          if (supportsLinks) {
 180.286              source = dir1.resolve("link").createSymbolicLink(dir1);
 180.287 -            target = getTargetFile(dir1).createFile();
 180.288 +            target = getTargetFile(dir2).createFile();
 180.289              moveAndVerify(source, target, REPLACE_EXISTING);
 180.290              target.delete();
 180.291          }
 180.292 @@ -513,7 +529,7 @@
 180.293           * Test nulls
 180.294           */
 180.295          source = createSourceFile(dir1);
 180.296 -        target = getTargetFile(dir1);
 180.297 +        target = getTargetFile(dir2);
 180.298          try {
 180.299              source.moveTo(null);
 180.300              throw new RuntimeException("NullPointerException expected");
 180.301 @@ -533,7 +549,7 @@
 180.302           * Test UOE
 180.303           */
 180.304          source = createSourceFile(dir1);
 180.305 -        target = getTargetFile(dir1);
 180.306 +        target = getTargetFile(dir2);
 180.307          try {
 180.308              source.moveTo(target, new CopyOption() { });
 180.309          } catch (UnsupportedOperationException x) { }
 180.310 @@ -577,28 +593,32 @@
 180.311              checkBasicAttributes(basicAttributes,
 180.312                  Attributes.readBasicFileAttributes(source, linkOptions));
 180.313  
 180.314 -            // check POSIX attributes are copied
 180.315 -            String os = System.getProperty("os.name");
 180.316 -            if (os.equals("SunOS") || os.equals("Linux")) {
 180.317 -                checkPosixAttributes(
 180.318 -                    Attributes.readPosixFileAttributes(source, linkOptions),
 180.319 -                    Attributes.readPosixFileAttributes(target, linkOptions));
 180.320 -            }
 180.321 +            // verify other attributes when same provider
 180.322 +            if (source.getFileSystem().provider() == target.getFileSystem().provider()) {
 180.323  
 180.324 -            // check DOS attributes are copied
 180.325 -            if (os.startsWith("Windows")) {
 180.326 -                checkDosAttributes(
 180.327 -                    Attributes.readDosFileAttributes(source, linkOptions),
 180.328 -                    Attributes.readDosFileAttributes(target, linkOptions));
 180.329 -            }
 180.330 +                // check POSIX attributes are copied
 180.331 +                String os = System.getProperty("os.name");
 180.332 +                if (os.equals("SunOS") || os.equals("Linux")) {
 180.333 +                    checkPosixAttributes(
 180.334 +                        Attributes.readPosixFileAttributes(source, linkOptions),
 180.335 +                        Attributes.readPosixFileAttributes(target, linkOptions));
 180.336 +                }
 180.337  
 180.338 -            // check named attributes are copied
 180.339 -            if (followLinks &&
 180.340 -                source.getFileStore().supportsFileAttributeView("xattr") &&
 180.341 -                target.getFileStore().supportsFileAttributeView("xattr"))
 180.342 -            {
 180.343 -                checkUserDefinedFileAttributes(readUserDefinedFileAttributes(source),
 180.344 -                                     readUserDefinedFileAttributes(target));
 180.345 +                // check DOS attributes are copied
 180.346 +                if (os.startsWith("Windows")) {
 180.347 +                    checkDosAttributes(
 180.348 +                        Attributes.readDosFileAttributes(source, linkOptions),
 180.349 +                        Attributes.readDosFileAttributes(target, linkOptions));
 180.350 +                }
 180.351 +
 180.352 +                // check named attributes are copied
 180.353 +                if (followLinks &&
 180.354 +                    source.getFileStore().supportsFileAttributeView("xattr") &&
 180.355 +                    target.getFileStore().supportsFileAttributeView("xattr"))
 180.356 +                {
 180.357 +                    checkUserDefinedFileAttributes(readUserDefinedFileAttributes(source),
 180.358 +                                                   readUserDefinedFileAttributes(target));
 180.359 +                }
 180.360              }
 180.361          }
 180.362      }
 180.363 @@ -606,7 +626,9 @@
 180.364      /**
 180.365       * Tests all possible ways to invoke copyTo
 180.366       */
 180.367 -    static void doCopyTests(Path dir) throws IOException {
 180.368 +    static void doCopyTests(Path dir1, Path dir2, boolean supportsLinks)
 180.369 +        throws IOException
 180.370 +    {
 180.371          Path source, target, link, entry;
 180.372  
 180.373          // -- regular file --
 180.374 @@ -614,8 +636,8 @@
 180.375          /**
 180.376           * Test: move regular file, target does not exist
 180.377           */
 180.378 -        source = createSourceFile(dir);
 180.379 -        target = getTargetFile(dir);
 180.380 +        source = createSourceFile(dir1);
 180.381 +        target = getTargetFile(dir2);
 180.382          copyAndVerify(source, target);
 180.383          source.delete();
 180.384          target.delete();
 180.385 @@ -623,8 +645,8 @@
 180.386          /**
 180.387           * Test: copy regular file, target exists
 180.388           */
 180.389 -        source = createSourceFile(dir);
 180.390 -        target = getTargetFile(dir).createFile();
 180.391 +        source = createSourceFile(dir1);
 180.392 +        target = getTargetFile(dir2).createFile();
 180.393          try {
 180.394              copyAndVerify(source, target);
 180.395              throw new RuntimeException("FileAlreadyExistsException expected");
 180.396 @@ -643,8 +665,8 @@
 180.397          /**
 180.398           * Test: copy regular file, target does not exist
 180.399           */
 180.400 -        source = createSourceFile(dir);
 180.401 -        target = getTargetFile(dir);
 180.402 +        source = createSourceFile(dir1);
 180.403 +        target = getTargetFile(dir2);
 180.404          copyAndVerify(source, target, REPLACE_EXISTING);
 180.405          source.delete();
 180.406          target.delete();
 180.407 @@ -652,8 +674,8 @@
 180.408          /**
 180.409           * Test: copy regular file, target exists
 180.410           */
 180.411 -        source = createSourceFile(dir);
 180.412 -        target = getTargetFile(dir).createFile();
 180.413 +        source = createSourceFile(dir1);
 180.414 +        target = getTargetFile(dir2).createFile();
 180.415          copyAndVerify(source, target, REPLACE_EXISTING);
 180.416          source.delete();
 180.417          target.delete();
 180.418 @@ -661,8 +683,8 @@
 180.419          /**
 180.420           * Test: copy regular file, target exists and is empty directory
 180.421           */
 180.422 -        source = createSourceFile(dir);
 180.423 -        target = getTargetFile(dir).createDirectory();
 180.424 +        source = createSourceFile(dir1);
 180.425 +        target = getTargetFile(dir2).createDirectory();
 180.426          copyAndVerify(source, target, REPLACE_EXISTING);
 180.427          source.delete();
 180.428          target.delete();
 180.429 @@ -670,8 +692,8 @@
 180.430          /**
 180.431           * Test: copy regular file, target exists and is non-empty directory
 180.432           */
 180.433 -        source = createSourceFile(dir);
 180.434 -        target = getTargetFile(dir).createDirectory();
 180.435 +        source = createSourceFile(dir1);
 180.436 +        target = getTargetFile(dir2).createDirectory();
 180.437          entry = target.resolve("foo").createFile();
 180.438          try {
 180.439              copyAndVerify(source, target);
 180.440 @@ -685,8 +707,8 @@
 180.441          /**
 180.442           * Test: copy regular file + attributes
 180.443           */
 180.444 -        source = createSourceFile(dir);
 180.445 -        target = getTargetFile(dir);
 180.446 +        source = createSourceFile(dir1);
 180.447 +        target = getTargetFile(dir2);
 180.448          copyAndVerify(source, target, COPY_ATTRIBUTES);
 180.449          source.delete();
 180.450          target.delete();
 180.451 @@ -697,8 +719,8 @@
 180.452          /*
 180.453           * Test: copy directory, target does not exist
 180.454           */
 180.455 -        source = createSourceDirectory(dir);
 180.456 -        target = getTargetFile(dir);
 180.457 +        source = createSourceDirectory(dir1);
 180.458 +        target = getTargetFile(dir2);
 180.459          copyAndVerify(source, target);
 180.460          source.delete();
 180.461          target.delete();
 180.462 @@ -706,8 +728,8 @@
 180.463          /**
 180.464           * Test: copy directory, target exists
 180.465           */
 180.466 -        source = createSourceDirectory(dir);
 180.467 -        target = getTargetFile(dir).createFile();
 180.468 +        source = createSourceDirectory(dir1);
 180.469 +        target = getTargetFile(dir2).createFile();
 180.470          try {
 180.471              copyAndVerify(source, target);
 180.472              throw new RuntimeException("FileAlreadyExistsException expected");
 180.473 @@ -726,8 +748,8 @@
 180.474          /**
 180.475           * Test: copy directory, target does not exist
 180.476           */
 180.477 -        source = createSourceDirectory(dir);
 180.478 -        target = getTargetFile(dir);
 180.479 +        source = createSourceDirectory(dir1);
 180.480 +        target = getTargetFile(dir2);
 180.481          copyAndVerify(source, target, REPLACE_EXISTING);
 180.482          source.delete();
 180.483          target.delete();
 180.484 @@ -735,8 +757,8 @@
 180.485          /**
 180.486           * Test: copy directory, target exists
 180.487           */
 180.488 -        source = createSourceDirectory(dir);
 180.489 -        target = getTargetFile(dir).createFile();
 180.490 +        source = createSourceDirectory(dir1);
 180.491 +        target = getTargetFile(dir2).createFile();
 180.492          copyAndVerify(source, target, REPLACE_EXISTING);
 180.493          source.delete();
 180.494          target.delete();
 180.495 @@ -744,8 +766,8 @@
 180.496          /**
 180.497           * Test: copy directory, target exists and is empty directory
 180.498           */
 180.499 -        source = createSourceDirectory(dir);
 180.500 -        target = getTargetFile(dir).createDirectory();
 180.501 +        source = createSourceDirectory(dir1);
 180.502 +        target = getTargetFile(dir2).createDirectory();
 180.503          copyAndVerify(source, target, REPLACE_EXISTING);
 180.504          source.delete();
 180.505          target.delete();
 180.506 @@ -753,8 +775,8 @@
 180.507          /**
 180.508           * Test: copy directory, target exists and is non-empty directory
 180.509           */
 180.510 -        source = createSourceDirectory(dir);
 180.511 -        target = getTargetFile(dir).createDirectory();
 180.512 +        source = createSourceDirectory(dir1);
 180.513 +        target = getTargetFile(dir2).createDirectory();
 180.514          entry = target.resolve("foo").createFile();
 180.515          try {
 180.516              copyAndVerify(source, target, REPLACE_EXISTING);
 180.517 @@ -768,8 +790,8 @@
 180.518          /*
 180.519           * Test: copy directory + attributes
 180.520           */
 180.521 -        source = createSourceDirectory(dir);
 180.522 -        target = getTargetFile(dir);
 180.523 +        source = createSourceDirectory(dir1);
 180.524 +        target = getTargetFile(dir2);
 180.525          copyAndVerify(source, target, COPY_ATTRIBUTES);
 180.526          source.delete();
 180.527          target.delete();
 180.528 @@ -780,9 +802,9 @@
 180.529           * Test: Follow link
 180.530           */
 180.531          if (supportsLinks) {
 180.532 -            source = createSourceFile(dir);
 180.533 -            link = dir.resolve("link").createSymbolicLink(source);
 180.534 -            target = getTargetFile(dir);
 180.535 +            source = createSourceFile(dir1);
 180.536 +            link = dir1.resolve("link").createSymbolicLink(source);
 180.537 +            target = getTargetFile(dir2);
 180.538              copyAndVerify(link, target);
 180.539              link.delete();
 180.540              source.delete();
 180.541 @@ -792,9 +814,9 @@
 180.542           * Test: Copy link (to file)
 180.543           */
 180.544          if (supportsLinks) {
 180.545 -            source = createSourceFile(dir);
 180.546 -            link = dir.resolve("link").createSymbolicLink(source);
 180.547 -            target = getTargetFile(dir);
 180.548 +            source = createSourceFile(dir1);
 180.549 +            link = dir1.resolve("link").createSymbolicLink(source);
 180.550 +            target = getTargetFile(dir2);
 180.551              copyAndVerify(link, target, NOFOLLOW_LINKS);
 180.552              link.delete();
 180.553              source.delete();
 180.554 @@ -804,9 +826,9 @@
 180.555           * Test: Copy link (to directory)
 180.556           */
 180.557          if (supportsLinks) {
 180.558 -            source = dir.resolve("mydir").createDirectory();
 180.559 -            link = dir.resolve("link").createSymbolicLink(source);
 180.560 -            target = getTargetFile(dir);
 180.561 +            source = dir1.resolve("mydir").createDirectory();
 180.562 +            link = dir1.resolve("link").createSymbolicLink(source);
 180.563 +            target = getTargetFile(dir2);
 180.564              copyAndVerify(link, target, NOFOLLOW_LINKS);
 180.565              link.delete();
 180.566              source.delete();
 180.567 @@ -817,8 +839,8 @@
 180.568           */
 180.569          if (supportsLinks) {
 180.570              assertTrue(source.notExists());
 180.571 -            link = dir.resolve("link").createSymbolicLink(source);
 180.572 -            target = getTargetFile(dir);
 180.573 +            link = dir1.resolve("link").createSymbolicLink(source);
 180.574 +            target = getTargetFile(dir2);
 180.575              copyAndVerify(link, target, NOFOLLOW_LINKS);
 180.576              link.delete();
 180.577          }
 180.578 @@ -830,8 +852,8 @@
 180.579              System.getProperty("os.name").startsWith("Windows"))
 180.580          {
 180.581              Path unc = Paths.get("\\\\rialto\\share\\file");
 180.582 -            link = dir.resolve("link").createSymbolicLink(unc);
 180.583 -            target = getTargetFile(dir);
 180.584 +            link = dir1.resolve("link").createSymbolicLink(unc);
 180.585 +            target = getTargetFile(dir2);
 180.586              copyAndVerify(link, target, NOFOLLOW_LINKS);
 180.587              link.delete();
 180.588          }
 180.589 @@ -841,8 +863,8 @@
 180.590          /**
 180.591           * Test nulls
 180.592           */
 180.593 -        source = createSourceFile(dir);
 180.594 -        target = getTargetFile(dir);
 180.595 +        source = createSourceFile(dir1);
 180.596 +        target = getTargetFile(dir2);
 180.597          try {
 180.598              source.copyTo(null);
 180.599              throw new RuntimeException("NullPointerException expected");
 180.600 @@ -861,8 +883,8 @@
 180.601          /**
 180.602           * Test UOE
 180.603           */
 180.604 -        source = createSourceFile(dir);
 180.605 -        target = getTargetFile(dir);
 180.606 +        source = createSourceFile(dir1);
 180.607 +        target = getTargetFile(dir2);
 180.608          try {
 180.609              source.copyTo(target, new CopyOption() { });
 180.610          } catch (UnsupportedOperationException x) { }
   181.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   181.2 +++ b/test/java/nio/file/Path/PassThroughFileSystem.java	Fri Jan 22 09:34:17 2010 -0800
   181.3 @@ -0,0 +1,554 @@
   181.4 +/*
   181.5 + * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
   181.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   181.7 + *
   181.8 + * This code is free software; you can redistribute it and/or modify it
   181.9 + * under the terms of the GNU General Public License version 2 only, as
  181.10 + * published by the Free Software Foundation.
  181.11 + *
  181.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  181.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  181.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  181.15 + * version 2 for more details (a copy is included in the LICENSE file that
  181.16 + * accompanied this code).
  181.17 + *
  181.18 + * You should have received a copy of the GNU General Public License version
  181.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  181.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  181.21 + *
  181.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  181.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
  181.24 + * have any questions.
  181.25 + */
  181.26 +
  181.27 +import java.nio.file.*;
  181.28 +import java.nio.file.attribute.*;
  181.29 +import java.nio.file.spi.FileSystemProvider;
  181.30 +import java.nio.channels.SeekableByteChannel;
  181.31 +import java.net.URI;
  181.32 +import java.util.*;
  181.33 +import java.io.*;
  181.34 +
  181.35 +/**
  181.36 + * A "pass through" file system implementation that passes through, or delegates,
  181.37 + * everything to the default file system.
  181.38 + */
  181.39 +
  181.40 +class PassThroughFileSystem extends FileSystem {
  181.41 +    private final FileSystemProvider provider;
  181.42 +    private final FileSystem delegate;
  181.43 +
  181.44 +    PassThroughFileSystem(FileSystemProvider provider, FileSystem delegate) {
  181.45 +        this.provider = provider;
  181.46 +        this.delegate = delegate;
  181.47 +    }
  181.48 +
  181.49 +    /**
  181.50 +     * Creates a new "pass through" file system. Useful for test environments
  181.51 +     * where the provider might not be deployed.
  181.52 +     */
  181.53 +    static FileSystem create() throws IOException {
  181.54 +        FileSystemProvider provider = new PassThroughProvider();
  181.55 +        Map<String,?> env = Collections.emptyMap();
  181.56 +        URI uri = URI.create("pass:///");
  181.57 +        return provider.newFileSystem(uri, env);
  181.58 +    }
  181.59 +
  181.60 +    @Override
  181.61 +    public FileSystemProvider provider() {
  181.62 +        return provider;
  181.63 +    }
  181.64 +
  181.65 +    @Override
  181.66 +    public void close() throws IOException {
  181.67 +        delegate.close();
  181.68 +    }
  181.69 +
  181.70 +    @Override
  181.71 +    public boolean isOpen() {
  181.72 +        return delegate.isOpen();
  181.73 +    }
  181.74 +
  181.75 +    @Override
  181.76 +    public boolean isReadOnly() {
  181.77 +        return delegate.isReadOnly();
  181.78 +    }
  181.79 +
  181.80 +    @Override
  181.81 +    public String getSeparator() {
  181.82 +        return delegate.getSeparator();
  181.83 +    }
  181.84 +
  181.85 +    @Override
  181.86 +    public Iterable<Path> getRootDirectories() {
  181.87 +        final Iterable<Path> roots = delegate.getRootDirectories();
  181.88 +        return new Iterable<Path>() {
  181.89 +            @Override
  181.90 +            public Iterator<Path> iterator() {
  181.91 +                final Iterator<Path> itr = roots.iterator();
  181.92 +                return new Iterator<Path>() {
  181.93 +                    @Override
  181.94 +                    public boolean hasNext() {
  181.95 +                        return itr.hasNext();
  181.96 +                    }
  181.97 +                    @Override
  181.98 +                    public Path next() {
  181.99 +                        return new PassThroughPath(delegate, itr.next());
 181.100 +                    }
 181.101 +                    @Override
 181.102 +                    public void remove() {
 181.103 +                        itr.remove();
 181.104 +                    }
 181.105 +                };
 181.106 +            }
 181.107 +        };
 181.108 +    }
 181.109 +
 181.110 +    @Override
 181.111 +    public Iterable<FileStore> getFileStores() {
 181.112 +        // assume that unwrapped objects aren't exposed
 181.113 +        return delegate.getFileStores();
 181.114 +    }
 181.115 +
 181.116 +    @Override
 181.117 +    public Set<String> supportedFileAttributeViews() {
 181.118 +        // assume that unwrapped objects aren't exposed
 181.119 +        return delegate.supportedFileAttributeViews();
 181.120 +    }
 181.121 +
 181.122 +    @Override
 181.123 +    public Path getPath(String path) {
 181.124 +        return new PassThroughPath(this, delegate.getPath(path));
 181.125 +    }
 181.126 +
 181.127 +    @Override
 181.128 +    public PathMatcher getPathMatcher(String syntaxAndPattern) {
 181.129 +        final PathMatcher matcher = delegate.getPathMatcher(syntaxAndPattern);
 181.130 +        return new PathMatcher() {
 181.131 +            @Override
 181.132 +            public boolean matches(Path path) {
 181.133 +                return matcher.matches(PassThroughPath.unwrap(path));
 181.134 +            }
 181.135 +        };
 181.136 +    }
 181.137 +
 181.138 +    @Override
 181.139 +    public UserPrincipalLookupService getUserPrincipalLookupService() {
 181.140 +        // assume that unwrapped objects aren't exposed
 181.141 +        return delegate.getUserPrincipalLookupService();
 181.142 +    }
 181.143 +
 181.144 +    @Override
 181.145 +    public WatchService newWatchService() throws IOException {
 181.146 +        // to keep it simple
 181.147 +        throw new UnsupportedOperationException();
 181.148 +    }
 181.149 +
 181.150 +    static class PassThroughProvider extends FileSystemProvider {
 181.151 +        private static final String SCHEME = "pass";
 181.152 +        private static volatile PassThroughFileSystem delegate;
 181.153 +
 181.154 +        public PassThroughProvider() { }
 181.155 +
 181.156 +        @Override
 181.157 +        public String getScheme() {
 181.158 +            return SCHEME;
 181.159 +        }
 181.160 +
 181.161 +        private void checkScheme(URI uri) {
 181.162 +            if (!uri.getScheme().equalsIgnoreCase(SCHEME))
 181.163 +                throw new IllegalArgumentException();
 181.164 +        }
 181.165 +
 181.166 +        private void checkUri(URI uri) {
 181.167 +            checkScheme(uri);
 181.168 +            if (!uri.getSchemeSpecificPart().equals("///"))
 181.169 +                throw new IllegalArgumentException();
 181.170 +        }
 181.171 +
 181.172 +        @Override
 181.173 +        public FileSystem newFileSystem(URI uri, Map<String,?> env)
 181.174 +            throws IOException
 181.175 +        {
 181.176 +            checkUri(uri);
 181.177 +            synchronized (PassThroughProvider.class) {
 181.178 +                if (delegate != null)
 181.179 +                    throw new FileSystemAlreadyExistsException();
 181.180 +                PassThroughFileSystem result =
 181.181 +                    new PassThroughFileSystem(this, FileSystems.getDefault());
 181.182 +                delegate = result;
 181.183 +                return result;
 181.184 +            }
 181.185 +        }
 181.186 +
 181.187 +        @Override
 181.188 +        public FileSystem getFileSystem(URI uri) {
 181.189 +            checkUri(uri);
 181.190 +            FileSystem result = delegate;
 181.191 +            if (result == null)
 181.192 +                throw new FileSystemNotFoundException();
 181.193 +            return result;
 181.194 +        }
 181.195 +
 181.196 +        @Override
 181.197 +        public Path getPath(URI uri) {
 181.198 +            checkScheme(uri);
 181.199 +            if (delegate == null)
 181.200 +                throw new FileSystemNotFoundException();
 181.201 +            uri = URI.create(delegate.provider().getScheme() + ":" +
 181.202 +                             uri.getSchemeSpecificPart());
 181.203 +            return new PassThroughPath(delegate, delegate.provider().getPath(uri));
 181.204 +        }
 181.205 +    }
 181.206 +
 181.207 +    static class PassThroughPath extends Path {
 181.208 +        private final FileSystem fs;
 181.209 +        private final Path delegate;
 181.210 +
 181.211 +        PassThroughPath(FileSystem fs, Path delegate) {
 181.212 +            this.fs = fs;
 181.213 +            this.delegate = delegate;
 181.214 +        }
 181.215 +
 181.216 +        private Path wrap(Path path) {
 181.217 +            return (path != null) ? new PassThroughPath(fs, path) : null;
 181.218 +        }
 181.219 +
 181.220 +        static Path unwrap(Path wrapper) {
 181.221 +            if (!(wrapper instanceof PassThroughPath))
 181.222 +                throw new ProviderMismatchException();
 181.223 +            return ((PassThroughPath)wrapper).delegate;
 181.224 +        }
 181.225 +
 181.226 +        @Override
 181.227 +        public FileSystem getFileSystem() {
 181.228 +            return fs;
 181.229 +        }
 181.230 +
 181.231 +        @Override
 181.232 +        public boolean isAbsolute() {
 181.233 +            return delegate.isAbsolute();
 181.234 +        }
 181.235 +
 181.236 +        @Override
 181.237 +        public Path getRoot() {
 181.238 +            return wrap(delegate.getRoot());
 181.239 +        }
 181.240 +
 181.241 +
 181.242 +        @Override
 181.243 +        public Path getName() {
 181.244 +            return wrap(delegate.getName());
 181.245 +        }
 181.246 +
 181.247 +        @Override
 181.248 +        public Path getParent() {
 181.249 +            return wrap(delegate.getParent());
 181.250 +        }
 181.251 +
 181.252 +        @Override
 181.253 +        public int getNameCount() {
 181.254 +            return delegate.getNameCount();
 181.255 +        }
 181.256 +
 181.257 +        @Override
 181.258 +        public Path getName(int index) {
 181.259 +            return wrap(delegate.getName(index));
 181.260 +        }
 181.261 +
 181.262 +        @Override
 181.263 +        public Path subpath(int beginIndex, int endIndex) {
 181.264 +            return wrap(delegate.subpath(beginIndex, endIndex));
 181.265 +        }
 181.266 +
 181.267 +        @Override
 181.268 +        public boolean startsWith(Path other) {
 181.269 +            return delegate.startsWith(unwrap(other));
 181.270 +        }
 181.271 +
 181.272 +        @Override
 181.273 +        public boolean endsWith(Path other) {
 181.274 +            return delegate.endsWith(unwrap(other));
 181.275 +        }
 181.276 +
 181.277 +        @Override
 181.278 +        public Path normalize() {
 181.279 +            return wrap(delegate.normalize());
 181.280 +        }
 181.281 +
 181.282 +        @Override
 181.283 +        public Path resolve(Path other) {
 181.284 +            return wrap(delegate.resolve(unwrap(other)));
 181.285 +        }
 181.286 +
 181.287 +        @Override
 181.288 +        public Path resolve(String other) {
 181.289 +            return wrap(delegate.resolve(other));
 181.290 +        }
 181.291 +
 181.292 +        @Override
 181.293 +        public Path relativize(Path other) {
 181.294 +            return wrap(delegate.relativize(unwrap(other)));
 181.295 +        }
 181.296 +
 181.297 +        @Override
 181.298 +        public void setAttribute(String attribute, Object value, LinkOption... options)
 181.299 +            throws IOException
 181.300 +        {
 181.301 +            delegate.setAttribute(attribute, value, options);
 181.302 +        }
 181.303 +
 181.304 +        @Override
 181.305 +        public Object getAttribute(String attribute, LinkOption... options)
 181.306 +            throws IOException
 181.307 +        {
 181.308 +            // assume that unwrapped objects aren't exposed
 181.309 +            return delegate.getAttribute(attribute, options);
 181.310 +        }
 181.311 +
 181.312 +        @Override
 181.313 +        public Map<String,?> readAttributes(String attributes, LinkOption... options)
 181.314 +            throws IOException
 181.315 +        {
 181.316 +            // assume that unwrapped objects aren't exposed
 181.317 +            return delegate.readAttributes(attributes, options);
 181.318 +        }
 181.319 +
 181.320 +        @Override
 181.321 +        public <V extends FileAttributeView> V getFileAttributeView(Class<V> type,
 181.322 +                                                                    LinkOption... options)
 181.323 +        {
 181.324 +            return delegate.getFileAttributeView(type, options);
 181.325 +        }
 181.326 +
 181.327 +        @Override
 181.328 +        public void delete() throws IOException {
 181.329 +            delegate.delete();
 181.330 +        }
 181.331 +
 181.332 +        @Override
 181.333 +        public void deleteIfExists() throws IOException {
 181.334 +            delegate.deleteIfExists();
 181.335 +        }
 181.336 +
 181.337 +        @Override
 181.338 +        public Path createSymbolicLink(Path target, FileAttribute<?>... attrs)
 181.339 +            throws IOException
 181.340 +        {
 181.341 +            delegate.createSymbolicLink(unwrap(target), attrs);
 181.342 +            return this;
 181.343 +        }
 181.344 +
 181.345 +        @Override
 181.346 +        public Path createLink(Path existing) throws IOException {
 181.347 +            delegate.createLink(unwrap(existing));
 181.348 +            return this;
 181.349 +        }
 181.350 +
 181.351 +        @Override
 181.352 +        public Path readSymbolicLink() throws IOException {
 181.353 +            return wrap(delegate.readSymbolicLink());
 181.354 +        }
 181.355 +
 181.356 +        @Override
 181.357 +        public URI toUri() {
 181.358 +            String ssp = delegate.toUri().getSchemeSpecificPart();
 181.359 +            return URI.create(fs.provider().getScheme() + ":" + ssp);
 181.360 +        }
 181.361 +
 181.362 +        @Override
 181.363 +        public Path toAbsolutePath() {
 181.364 +            return wrap(delegate.toAbsolutePath());
 181.365 +        }
 181.366 +
 181.367 +        @Override
 181.368 +        public Path toRealPath(boolean resolveLinks) throws IOException {
 181.369 +            return wrap(delegate.toRealPath(resolveLinks));
 181.370 +        }
 181.371 +
 181.372 +        @Override
 181.373 +        public Path copyTo(Path target, CopyOption... options) throws IOException {
 181.374 +            return wrap(delegate.copyTo(unwrap(target), options));
 181.375 +        }
 181.376 +
 181.377 +        @Override
 181.378 +        public Path moveTo(Path target, CopyOption... options) throws IOException {
 181.379 +            return wrap(delegate.copyTo(unwrap(target), options));
 181.380 +        }
 181.381 +
 181.382 +        private DirectoryStream<Path> wrap(final DirectoryStream<Path> stream) {
 181.383 +            return new DirectoryStream<Path>() {
 181.384 +                @Override
 181.385 +                public Iterator<Path> iterator() {
 181.386 +                    final Iterator<Path> itr = stream.iterator();
 181.387 +                    return new Iterator<Path>() {
 181.388 +                        @Override
 181.389 +                        public boolean hasNext() {
 181.390 +                            return itr.hasNext();
 181.391 +                        }
 181.392 +                        @Override
 181.393 +                        public Path next() {
 181.394 +                            return wrap(itr.next());
 181.395 +                        }
 181.396 +                        @Override
 181.397 +                        public void remove() {
 181.398 +                            itr.remove();
 181.399 +                        }
 181.400 +                    };
 181.401 +                }
 181.402 +                @Override
 181.403 +                public void close() throws IOException {
 181.404 +                    stream.close();
 181.405 +                }
 181.406 +            };
 181.407 +        }
 181.408 +
 181.409 +        @Override
 181.410 +        public DirectoryStream<Path> newDirectoryStream() throws IOException {
 181.411 +            return wrap(delegate.newDirectoryStream());
 181.412 +        }
 181.413 +
 181.414 +        @Override
 181.415 +        public DirectoryStream<Path> newDirectoryStream(String glob)
 181.416 +            throws IOException
 181.417 +        {
 181.418 +            return wrap(delegate.newDirectoryStream(glob));
 181.419 +        }
 181.420 +
 181.421 +        @Override
 181.422 +        public DirectoryStream<Path> newDirectoryStream(DirectoryStream.Filter<? super Path> filter)
 181.423 +            throws IOException
 181.424 +        {
 181.425 +            return wrap(delegate.newDirectoryStream(filter));
 181.426 +        }
 181.427 +
 181.428 +        @Override
 181.429 +        public Path createFile(FileAttribute<?>... attrs) throws IOException {
 181.430 +            delegate.createFile(attrs);
 181.431 +            return this;
 181.432 +        }
 181.433 +
 181.434 +        @Override
 181.435 +        public Path createDirectory(FileAttribute<?>... attrs)
 181.436 +            throws IOException
 181.437 +        {
 181.438 +            delegate.createDirectory(attrs);
 181.439 +            return this;
 181.440 +        }
 181.441 +
 181.442 +        @Override
 181.443 +        public SeekableByteChannel newByteChannel(Set<? extends OpenOption> options,
 181.444 +                                                       FileAttribute<?>... attrs)
 181.445 +            throws IOException
 181.446 +        {
 181.447 +            return delegate.newByteChannel(options, attrs);
 181.448 +        }
 181.449 +
 181.450 +        @Override
 181.451 +        public SeekableByteChannel newByteChannel(OpenOption... options)
 181.452 +            throws IOException
 181.453 +        {
 181.454 +            return delegate.newByteChannel(options);
 181.455 +        }
 181.456 +
 181.457 +        @Override
 181.458 +        public InputStream newInputStream(OpenOption... options) throws IOException {
 181.459 +            return delegate.newInputStream();
 181.460 +        }
 181.461 +
 181.462 +        @Override
 181.463 +        public OutputStream newOutputStream(OpenOption... options)
 181.464 +            throws IOException
 181.465 +        {
 181.466 +            return delegate.newOutputStream(options);
 181.467 +        }
 181.468 +
 181.469 +        @Override
 181.470 +        public boolean isHidden() throws IOException {
 181.471 +            return delegate.isHidden();
 181.472 +        }
 181.473 +
 181.474 +        @Override
 181.475 +        public void checkAccess(AccessMode... modes) throws IOException {
 181.476 +            delegate.checkAccess(modes);
 181.477 +        }
 181.478 +
 181.479 +        @Override
 181.480 +        public boolean exists() {
 181.481 +            return delegate.exists();
 181.482 +        }
 181.483 +
 181.484 +        @Override
 181.485 +        public boolean notExists() {
 181.486 +            return delegate.notExists();
 181.487 +        }
 181.488 +
 181.489 +        @Override
 181.490 +        public FileStore getFileStore() throws IOException {
 181.491 +            return delegate.getFileStore();
 181.492 +        }
 181.493 +
 181.494 +        @Override
 181.495 +        public WatchKey register(WatchService watcher,
 181.496 +                                      WatchEvent.Kind<?>[] events,
 181.497 +                                      WatchEvent.Modifier... modifiers)
 181.498 +        {
 181.499 +            throw new UnsupportedOperationException();
 181.500 +        }
 181.501 +
 181.502 +        @Override
 181.503 +        public  WatchKey register(WatchService watcher,
 181.504 +                                      WatchEvent.Kind<?>... events)
 181.505 +        {
 181.506 +            throw new UnsupportedOperationException();
 181.507 +        }
 181.508 +
 181.509 +
 181.510 +        @Override
 181.511 +        public Iterator<Path> iterator() {
 181.512 +            final Iterator<Path> itr = delegate.iterator();
 181.513 +            return new Iterator<Path>() {
 181.514 +                @Override
 181.515 +                public boolean hasNext() {
 181.516 +                    return itr.hasNext();
 181.517 +                }
 181.518 +                @Override
 181.519 +                public Path next() {
 181.520 +                    return wrap(itr.next());
 181.521 +                }
 181.522 +                @Override
 181.523 +                public void remove() {
 181.524 +                    itr.remove();
 181.525 +                }
 181.526 +            };
 181.527 +        }
 181.528 +
 181.529 +        @Override
 181.530 +        public int compareTo(Path other) {
 181.531 +            return delegate.compareTo(unwrap(other));
 181.532 +        }
 181.533 +
 181.534 +        @Override
 181.535 +        public boolean isSameFile(Path other) throws IOException {
 181.536 +            return delegate.isSameFile(unwrap(other));
 181.537 +        }
 181.538 +
 181.539 +
 181.540 +        @Override
 181.541 +        public boolean equals(Object other) {
 181.542 +            if (!(other instanceof PassThroughPath))
 181.543 +                return false;
 181.544 +            return delegate.equals(unwrap((PassThroughPath)other));
 181.545 +        }
 181.546 +
 181.547 +        @Override
 181.548 +        public int hashCode() {
 181.549 +            return delegate.hashCode();
 181.550 +        }
 181.551 +
 181.552 +        @Override
 181.553 +        public String toString() {
 181.554 +            return delegate.toString();
 181.555 +        }
 181.556 +    }
 181.557 +}
   182.1 --- a/test/java/nio/file/Path/delete_on_close.sh	Thu Jan 21 11:12:37 2010 -0800
   182.2 +++ b/test/java/nio/file/Path/delete_on_close.sh	Fri Jan 22 09:34:17 2010 -0800
   182.3 @@ -40,7 +40,7 @@
   182.4  
   182.5  OS=`uname -s`
   182.6  case "$OS" in
   182.7 -    Windows_* )
   182.8 +    Windows_* | CYGWIN* )
   182.9          CLASSPATH="${TESTCLASSES};${TESTSRC}"
  182.10          ;;
  182.11      * )
   183.1 --- a/test/java/nio/file/TestUtil.java	Thu Jan 21 11:12:37 2010 -0800
   183.2 +++ b/test/java/nio/file/TestUtil.java	Fri Jan 22 09:34:17 2010 -0800
   183.3 @@ -30,17 +30,20 @@
   183.4      private TestUtil() {
   183.5      }
   183.6  
   183.7 -    public static Path createTemporaryDirectory() throws IOException {
   183.8 -        Path tmpdir = Paths.get(System.getProperty("java.io.tmpdir"));
   183.9 +    static Path createTemporaryDirectory(String where) throws IOException {
  183.10 +        Path top = FileSystems.getDefault().getPath(where);
  183.11          Random r = new Random();
  183.12 -
  183.13          Path dir;
  183.14          do {
  183.15 -            dir = tmpdir.resolve("name" + r.nextInt());
  183.16 +            dir = top.resolve("name" + r.nextInt());
  183.17          } while (dir.exists());
  183.18          return dir.createDirectory();
  183.19      }
  183.20  
  183.21 +    static Path createTemporaryDirectory() throws IOException {
  183.22 +        return createTemporaryDirectory(System.getProperty("java.io.tmpdir"));
  183.23 +    }
  183.24 +
  183.25      static void removeAll(Path dir) {
  183.26          Files.walkFileTree(dir, new FileVisitor<Path>() {
  183.27              @Override
   184.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   184.2 +++ b/test/java/nio/file/WatchService/OverflowEventIsLoner.java	Fri Jan 22 09:34:17 2010 -0800
   184.3 @@ -0,0 +1,122 @@
   184.4 +/*
   184.5 + * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
   184.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   184.7 + *
   184.8 + * This code is free software; you can redistribute it and/or modify it
   184.9 + * under the terms of the GNU General Public License version 2 only, as
  184.10 + * published by the Free Software Foundation.
  184.11 + *
  184.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  184.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  184.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  184.15 + * version 2 for more details (a copy is included in the LICENSE file that
  184.16 + * accompanied this code).
  184.17 + *
  184.18 + * You should have received a copy of the GNU General Public License version
  184.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  184.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  184.21 + *
  184.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  184.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
  184.24 + * have any questions.
  184.25 + */
  184.26 +
  184.27 +/* @test
  184.28 + * @bug 6907760
  184.29 + * @summary Check that the OVERFLOW event is not retrieved with other events
  184.30 + * @library ..
  184.31 + */
  184.32 +
  184.33 +import java.nio.file.*;
  184.34 +import static java.nio.file.StandardWatchEventKind.*;
  184.35 +import java.io.IOException;
  184.36 +import java.util.List;
  184.37 +import java.util.concurrent.TimeUnit;
  184.38 +
  184.39 +public class OverflowEventIsLoner {
  184.40 +
  184.41 +    static void drainEvents(WatchService watcher,
  184.42 +                            WatchEvent.Kind<?> expectedKind,
  184.43 +                            int count)
  184.44 +        throws IOException, InterruptedException
  184.45 +    {
  184.46 +        // wait for key to be signalled - the timeout is long to allow for
  184.47 +        // polling implementations
  184.48 +        WatchKey key = watcher.poll(15, TimeUnit.SECONDS);
  184.49 +        if (key != null && count == 0)
  184.50 +            throw new RuntimeException("Key was signalled (unexpected)");
  184.51 +        if (key == null && count > 0)
  184.52 +            throw new RuntimeException("Key not signalled (unexpected)");
  184.53 +
  184.54 +        int nread = 0;
  184.55 +        boolean gotOverflow = false;
  184.56 +        do {
  184.57 +            List<WatchEvent<?>> events = key.pollEvents();
  184.58 +            for (WatchEvent<?> event: events) {
  184.59 +                WatchEvent.Kind<?> kind = event.kind();
  184.60 +                if (kind == expectedKind) {
  184.61 +                    // expected event kind
  184.62 +                    if (++nread > count)
  184.63 +                        throw new RuntimeException("More events than expected!!");
  184.64 +                } else if (kind == OVERFLOW) {
  184.65 +                    // overflow event should not be retrieved with other events
  184.66 +                    if (events.size() > 1)
  184.67 +                        throw new RuntimeException("Overflow retrieved with other events");
  184.68 +                    gotOverflow = true;
  184.69 +                } else {
  184.70 +                    throw new RuntimeException("Unexpected event '" + kind + "'");
  184.71 +                }
  184.72 +            }
  184.73 +            if (!key.reset())
  184.74 +                throw new RuntimeException("Key is no longer valid");
  184.75 +            key = watcher.poll(2, TimeUnit.SECONDS);
  184.76 +        } while (key != null);
  184.77 +
  184.78 +        // check that all expected events were received or there was an overflow
  184.79 +        if (nread < count && !gotOverflow)
  184.80 +            throw new RuntimeException("Insufficient events");
  184.81 +    }
  184.82 +
  184.83 +
  184.84 +    static void test(Path dir) throws IOException, InterruptedException {
  184.85 +        WatchService watcher = dir.getFileSystem().newWatchService();
  184.86 +        try {
  184.87 +            WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE);
  184.88 +
  184.89 +            // create a lot of files
  184.90 +            int n = 1024;
  184.91 +            Path[] files = new Path[n];
  184.92 +            for (int i=0; i<n; i++) {
  184.93 +                files[i] = dir.resolve("foo" + i).createFile();
  184.94 +            }
  184.95 +
  184.96 +            // give time for events to accumulate (improve chance of overflow)
  184.97 +            Thread.sleep(1000);
  184.98 +
  184.99 +            // check that we see the create events (or overflow)
 184.100 +            drainEvents(watcher, ENTRY_CREATE, n);
 184.101 +
 184.102 +            // delete the files
 184.103 +            for (int i=0; i<n; i++) {
 184.104 +                files[i].delete();
 184.105 +            }
 184.106 +
 184.107 +            // give time for events to accumulate (improve chance of overflow)
 184.108 +            Thread.sleep(1000);
 184.109 +
 184.110 +            // check that we see the delete events (or overflow)
 184.111 +            drainEvents(watcher, ENTRY_DELETE, n);
 184.112 +        } finally {
 184.113 +            watcher.close();
 184.114 +        }
 184.115 +    }
 184.116 +
 184.117 +    public static void main(String[] args) throws Exception {
 184.118 +        Path dir = TestUtil.createTemporaryDirectory();
 184.119 +        try {
 184.120 +            test(dir);
 184.121 +        } finally {
 184.122 +            TestUtil.removeAll(dir);
 184.123 +        }
 184.124 +    }
 184.125 +}
   185.1 --- a/test/java/security/Provider/Turkish.java	Thu Jan 21 11:12:37 2010 -0800
   185.2 +++ b/test/java/security/Provider/Turkish.java	Fri Jan 22 09:34:17 2010 -0800
   185.3 @@ -25,6 +25,7 @@
   185.4   * @test
   185.5   * @bug 6220064
   185.6   * @summary make sure everything works ok in the Turkish local (dotted/dotless i problem)
   185.7 + * @run main/othervm Turkish
   185.8   * @author Andreas Sterbenz
   185.9   */
  185.10  
   186.1 --- a/test/java/util/Currency/PropertiesTest.sh	Thu Jan 21 11:12:37 2010 -0800
   186.2 +++ b/test/java/util/Currency/PropertiesTest.sh	Fri Jan 22 09:34:17 2010 -0800
   186.3 @@ -34,7 +34,7 @@
   186.4      PS=":"
   186.5      FS="/"
   186.6      ;;
   186.7 -  Windows* )
   186.8 +  Windows* | CYGWIN* )
   186.9      PS=";"
  186.10      FS="\\"
  186.11      ;;
   187.1 --- a/test/java/util/PluggableLocale/ExecTest.sh	Thu Jan 21 11:12:37 2010 -0800
   187.2 +++ b/test/java/util/PluggableLocale/ExecTest.sh	Fri Jan 22 09:34:17 2010 -0800
   187.3 @@ -62,7 +62,7 @@
   187.4      PS=":"
   187.5      FS="/"
   187.6      ;;
   187.7 -  Windows* )
   187.8 +  Windows* | CYGWIN* )
   187.9      PS=";"
  187.10      FS="\\"
  187.11      ;;
   188.1 --- a/test/java/util/ResourceBundle/Bug6299235Test.sh	Thu Jan 21 11:12:37 2010 -0800
   188.2 +++ b/test/java/util/ResourceBundle/Bug6299235Test.sh	Fri Jan 22 09:34:17 2010 -0800
   188.3 @@ -35,7 +35,7 @@
   188.4      PATHSEP=":"
   188.5      FILESEP="/"
   188.6      ;;
   188.7 -  Windows* )
   188.8 +  Windows* | CYGWIN* )
   188.9      PATHSEP=";"
  188.10      FILESEP="\\"
  188.11      ;;
  188.12 @@ -63,7 +63,7 @@
  188.13  fi
  188.14  
  188.15  if [ -d "${JRE_EXT_DIR}" ]; then
  188.16 -    NEW_EXT_DIR=${JRE_EXT_DIR}${PATHSEP}${TESTSRC}
  188.17 +    NEW_EXT_DIR="${JRE_EXT_DIR}${PATHSEP}${TESTSRC}"
  188.18  else
  188.19      NEW_EXT_DIR=${TESTSRC}
  188.20  fi
   189.1 --- a/test/java/util/ResourceBundle/Control/ExpirationTest.sh	Thu Jan 21 11:12:37 2010 -0800
   189.2 +++ b/test/java/util/ResourceBundle/Control/ExpirationTest.sh	Fri Jan 22 09:34:17 2010 -0800
   189.3 @@ -69,7 +69,7 @@
   189.4  HAS_S=NO
   189.5  
   189.6  case "`uname`" in
   189.7 -Windows*)
   189.8 +Windows* | CYGWIN* )
   189.9      DEL=";"
  189.10      ;;
  189.11  SunOS)
   190.1 --- a/test/java/util/ServiceLoader/basic.sh	Thu Jan 21 11:12:37 2010 -0800
   190.2 +++ b/test/java/util/ServiceLoader/basic.sh	Fri Jan 22 09:34:17 2010 -0800
   190.3 @@ -50,9 +50,9 @@
   190.4        SEP='\;' ;;
   190.5  esac
   190.6  
   190.7 -JARD=`pwd`/x.jar
   190.8 -EXTD=`pwd`/x.ext
   190.9 -TESTD=`pwd`/x.test
  190.10 +JARD=x.jar
  190.11 +EXTD=x.ext
  190.12 +TESTD=x.test
  190.13  
  190.14  if [ \! -d $EXTD ]; then
  190.15      # Initialize
   191.1 --- a/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Thu Jan 21 11:12:37 2010 -0800
   191.2 +++ b/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Fri Jan 22 09:34:17 2010 -0800
   191.3 @@ -92,7 +92,7 @@
   191.4        TMP="/tmp"
   191.5        ;;
   191.6  
   191.7 -   Windows_95 | Windows_98 | Windows_NT | Windows_ME )
   191.8 +   Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN* )
   191.9        VAR="A different value for Win32"
  191.10        DEFAULT_JDK=/usr/local/java/jdk1.2/win32
  191.11        FILESEP="\\"
   192.1 --- a/test/javax/script/CommonSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   192.2 +++ b/test/javax/script/CommonSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   192.3 @@ -49,6 +49,12 @@
   192.4      OS="Windows"
   192.5      FS="\\"
   192.6      ;;
   192.7 +  CYGWIN* )
   192.8 +    PS=";"
   192.9 +    OS="Windows"
  192.10 +    FS="\\"
  192.11 +    isCygwin=true
  192.12 +    ;;
  192.13    * )
  192.14      echo "Unrecognized system!"
  192.15      exit 1;
   193.1 --- a/test/javax/script/ProviderTest.sh	Thu Jan 21 11:12:37 2010 -0800
   193.2 +++ b/test/javax/script/ProviderTest.sh	Fri Jan 22 09:34:17 2010 -0800
   193.3 @@ -46,5 +46,5 @@
   193.4  echo "Running test ..."
   193.5  
   193.6  $JAVA -classpath \
   193.7 -  ${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar \
   193.8 +  "${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
   193.9    ProviderTest
   194.1 --- a/test/sun/jvmstat/testlibrary/utils.sh	Thu Jan 21 11:12:37 2010 -0800
   194.2 +++ b/test/sun/jvmstat/testlibrary/utils.sh	Fri Jan 22 09:34:17 2010 -0800
   194.3 @@ -40,7 +40,7 @@
   194.4  
   194.5      OS=`uname -s`
   194.6      case ${OS} in
   194.7 -    Windows_*)
   194.8 +    Windows_* | CYGWIN*)
   194.9          PS=";"
  194.10          FS="\\"
  194.11          ;;
  194.12 @@ -54,7 +54,7 @@
  194.13  verify_os() {
  194.14      OS=`uname -s`
  194.15      case ${OS} in
  194.16 -    Windows_95 | Windows_98 | Windows_ME)
  194.17 +    Windows_95 | Windows_98 | Windows_ME | CYGWIN* )
  194.18          echo "Test bypassed: jvmstat feature not supported on ${OS}"
  194.19          exit 0
  194.20          ;;
   195.1 --- a/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Thu Jan 21 11:12:37 2010 -0800
   195.2 +++ b/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh	Fri Jan 22 09:34:17 2010 -0800
   195.3 @@ -45,7 +45,7 @@
   195.4  s^@TEST-SRC@/^${TESTCLASSES}${DFILESEP}^g
   195.5  EOF
   195.6      ;;
   195.7 -Windows_95 | Windows_98 | Windows_NT | Windows_ME)
   195.8 +Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN*)
   195.9      PATHSEP=";"
  195.10      FILESEP="\\"
  195.11      DFILESEP=$FILESEP$FILESEP
   196.1 --- a/test/sun/misc/URLClassPath/ClassnameCharTest.sh	Thu Jan 21 11:12:37 2010 -0800
   196.2 +++ b/test/sun/misc/URLClassPath/ClassnameCharTest.sh	Fri Jan 22 09:34:17 2010 -0800
   196.3 @@ -44,7 +44,7 @@
   196.4      PS=":"
   196.5      FS="/"
   196.6      ;;
   196.7 -  Windows* )
   196.8 +  Windows* | CYGWIN* )
   196.9      PS=";"
  196.10      FS="\\"
  196.11      ;;
  196.12 @@ -59,6 +59,6 @@
  196.13  ${TESTJAVA}${FS}bin${FS}jar xvf testclasses.jar "fo o.class"
  196.14  ${TESTJAVA}${FS}bin${FS}javac -d ${TESTCLASSES} ${TESTSRC}${FS}ClassnameCharTest.java
  196.15  
  196.16 -${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES}${PS}${TESTCLASSES}${FS}sun${FS}misc${FS}URLClassPath ClassnameCharTest
  196.17 +${TESTJAVA}${FS}bin${FS}java -classpath "${TESTCLASSES}${PS}${TESTCLASSES}${FS}sun${FS}misc${FS}URLClassPath" ClassnameCharTest
  196.18  
  196.19  rm -rf "fo o.class" testclasses.jar
   197.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   197.2 +++ b/test/sun/security/krb5/ktab/KeyString.java	Fri Jan 22 09:34:17 2010 -0800
   197.3 @@ -0,0 +1,39 @@
   197.4 +/*
   197.5 + * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
   197.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   197.7 + *
   197.8 + * This code is free software; you can redistribute it and/or modify it
   197.9 + * under the terms of the GNU General Public License version 2 only, as
  197.10 + * published by the Free Software Foundation.
  197.11 + *
  197.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  197.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  197.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  197.15 + * version 2 for more details (a copy is included in the LICENSE file that
  197.16 + * accompanied this code).
  197.17 + *
  197.18 + * You should have received a copy of the GNU General Public License version
  197.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  197.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  197.21 + *
  197.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  197.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
  197.24 + * have any questions.
  197.25 + */
  197.26 +/*
  197.27 + * @test
  197.28 + * @bug 6917791
  197.29 + * @summary KeyTabEntry, when the byte value smaller then 16, the string drop '0'
  197.30 + */
  197.31 +
  197.32 +import sun.security.krb5.internal.ktab.KeyTabEntry;
  197.33 +
  197.34 +public class KeyString {
  197.35 +    public static void main(String[] args) throws Exception {
  197.36 +        KeyTabEntry e = new KeyTabEntry(null, null, null, 1, 1, new byte[8]);
  197.37 +        // "0x" plus eight "00"
  197.38 +        if (e.getKeyString().length() != 18) {
  197.39 +            throw new Exception("key bytes length not correct");
  197.40 +        }
  197.41 +    }
  197.42 +}
   198.1 --- a/test/sun/tools/common/ApplicationSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   198.2 +++ b/test/sun/tools/common/ApplicationSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   198.3 @@ -45,7 +45,11 @@
   198.4    # "java" process.
   198.5    if [ "$OS" = "Windows" ]; then
   198.6      sleep 2
   198.7 -    realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
   198.8 +    if [ "${isCygwin}" = "true" ] ; then
   198.9 +      realpid=`ps -p ${pid} | tail -1 | awk '{print $4;}'`
  198.10 +    else
  198.11 +      realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
  198.12 +    fi
  198.13      pid=${realpid}
  198.14    fi
  198.15                                                                                                       
   199.1 --- a/test/sun/tools/common/CommonSetup.sh	Thu Jan 21 11:12:37 2010 -0800
   199.2 +++ b/test/sun/tools/common/CommonSetup.sh	Fri Jan 22 09:34:17 2010 -0800
   199.3 @@ -67,6 +67,11 @@
   199.4      PS=";"
   199.5      OS="Windows"
   199.6      ;;
   199.7 +  CYGWIN* )
   199.8 +    PS=";"
   199.9 +    OS="Windows"
  199.10 +    isCygwin=true
  199.11 +    ;;
  199.12    * )
  199.13      PS=":"
  199.14      ;;
   200.1 --- a/test/sun/tools/jps/jps-help.sh	Thu Jan 21 11:12:37 2010 -0800
   200.2 +++ b/test/sun/tools/jps/jps-help.sh	Fri Jan 22 09:34:17 2010 -0800
   200.3 @@ -35,7 +35,7 @@
   200.4  rm -f jps.out 2>/dev/null
   200.5  ${JPS} -? > jps.out 2>&1
   200.6  
   200.7 -diff jps.out ${TESTSRC}/usage.out
   200.8 +diff -w jps.out ${TESTSRC}/usage.out
   200.9  if [ $? != 0 ]
  200.10  then
  200.11    echo "Output of jps -? differ from expected output. Failed."
  200.12 @@ -46,7 +46,7 @@
  200.13  rm -f jps.out 2>/dev/null
  200.14  ${JPS} -help > jps.out 2>&1
  200.15  
  200.16 -diff jps.out ${TESTSRC}/usage.out
  200.17 +diff -w jps.out ${TESTSRC}/usage.out
  200.18  if [ $? != 0 ]
  200.19  then
  200.20    echo "Output of jps -help differ from expected output. Failed."
   201.1 --- a/test/sun/tools/jstat/jstatHelp.sh	Thu Jan 21 11:12:37 2010 -0800
   201.2 +++ b/test/sun/tools/jstat/jstatHelp.sh	Fri Jan 22 09:34:17 2010 -0800
   201.3 @@ -35,7 +35,7 @@
   201.4  rm -f jstat.out 2>/dev/null
   201.5  ${JSTAT} -? > jstat.out 2>&1
   201.6  
   201.7 -diff jstat.out ${TESTSRC}/usage.out
   201.8 +diff -w jstat.out ${TESTSRC}/usage.out
   201.9  if [ $? != 0 ]
  201.10  then
  201.11    echo "Output of jstat -? differ from expected output. Failed."
  201.12 @@ -45,7 +45,7 @@
  201.13  rm -f jstat.out 2>/dev/null
  201.14  ${JSTAT} -help > jstat.out 2>&1
  201.15  
  201.16 -diff jstat.out ${TESTSRC}/usage.out
  201.17 +diff -w jstat.out ${TESTSRC}/usage.out
  201.18  if [ $? != 0 ]
  201.19  then
  201.20    echo "Output of jstat -help differ from expected output. Failed."
   202.1 --- a/test/sun/tools/jstat/jstatOptions1.sh	Thu Jan 21 11:12:37 2010 -0800
   202.2 +++ b/test/sun/tools/jstat/jstatOptions1.sh	Fri Jan 22 09:34:17 2010 -0800
   202.3 @@ -35,4 +35,4 @@
   202.4  rm -f jstat.out 2>/dev/null
   202.5  ${JSTAT} -options > jstat.out 2>&1
   202.6  
   202.7 -diff jstat.out ${TESTSRC}/options1.out
   202.8 +diff -w jstat.out ${TESTSRC}/options1.out
   203.1 --- a/test/sun/tools/jstatd/jstatdUsage1.sh	Thu Jan 21 11:12:37 2010 -0800
   203.2 +++ b/test/sun/tools/jstatd/jstatdUsage1.sh	Fri Jan 22 09:34:17 2010 -0800
   203.3 @@ -37,7 +37,7 @@
   203.4  
   203.5  ${JSTATD} -? > ${JSTATD_1_OUT} 2>&1
   203.6  
   203.7 -diff ${JSTATD_1_OUT} ${TESTSRC}/usage.out
   203.8 +diff -w ${JSTATD_1_OUT} ${TESTSRC}/usage.out
   203.9  if [ $? != 0 ]
  203.10  then
  203.11    echo "Output of jstatd -? differs from expected output. Failed."
  203.12 @@ -46,7 +46,7 @@
  203.13  
  203.14  ${JSTATD} -help > ${JSTATD_2_OUT} 2>&1
  203.15  
  203.16 -diff ${JSTATD_2_OUT} ${TESTSRC}/usage.out
  203.17 +diff -w ${JSTATD_2_OUT} ${TESTSRC}/usage.out
  203.18  if [ $? != 0 ]
  203.19  then
  203.20    echo "Output of jstatd -help differs from expected output. Failed."
   204.1 --- a/test/sun/tools/native2ascii/Native2AsciiTests.sh	Thu Jan 21 11:12:37 2010 -0800
   204.2 +++ b/test/sun/tools/native2ascii/Native2AsciiTests.sh	Fri Jan 22 09:34:17 2010 -0800
   204.3 @@ -32,7 +32,7 @@
   204.4  if [ "${TESTJAVA}" = "" ]; then TESTJAVA=$1; shift; fi
   204.5  
   204.6  case `uname -s` in
   204.7 -  Windows*) OS=Windows;;
   204.8 +  Windows* | CYGWIN*) OS=Windows;;
   204.9    SunOS|Linux) OS=Unix;;
  204.10  esac
  204.11  
  204.12 @@ -45,12 +45,14 @@
  204.13  
  204.14    # Strip carriage returns from output when comparing with n2a test output
  204.15    # on win32 systems
  204.16 -  if [ OS = Windows ]; then
  204.17 -     tr -d '\015' <$out >$out.1
  204.18 +  if [ ${OS} = Windows ]; then
  204.19 +     sed -e 's@\\r@@g' $out >$out.1
  204.20 +     sed -e 's@\\r@@g' $expected >$out.expected
  204.21    else
  204.22       cp $out $out.1
  204.23 +     cp $expected $out.expected
  204.24    fi
  204.25 -  if (set -x; diff -c $expected $out.1); then
  204.26 +  if (set -x; diff -c $out.expected $out.1); then
  204.27      echo "$bug passed"
  204.28    else
  204.29      echo "$bug failed"
   205.1 --- a/test/tools/launcher/ChangeDataModel.sh	Thu Jan 21 11:12:37 2010 -0800
   205.2 +++ b/test/tools/launcher/ChangeDataModel.sh	Fri Jan 22 09:34:17 2010 -0800
   205.3 @@ -29,6 +29,9 @@
   205.4  
   205.5  OS=`uname -s`;
   205.6  
   205.7 +# To remove CR from output, needed for java apps in CYGWIN, harmless otherwise
   205.8 +SED_CR="sed -e s@\\r@@g"
   205.9 +
  205.10  case "$OS" in
  205.11  	Windows* | CYGWIN* )
  205.12  	  PATHSEP=";"
  205.13 @@ -79,10 +82,10 @@
  205.14  
  205.15  # Verify data model flag for default data model is accepted
  205.16  
  205.17 -DM=`$JAVA GetDataModel`
  205.18 +DM=`$JAVA GetDataModel | ${SED_CR}`
  205.19  case "$DM" in
  205.20          32 )
  205.21 -		DM2=`${JAVA} -d32 GetDataModel`	
  205.22 +		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
  205.23  		if [ "${DM2}" != "32" ]
  205.24  		then
  205.25  	  	echo "Data model flag -d32 not accepted or had improper effect."
  205.26 @@ -91,7 +94,7 @@
  205.27          ;;
  205.28  
  205.29          64 )
  205.30 -		DM2=`${JAVA} -d64 GetDataModel`	
  205.31 +		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
  205.32  		if [ "${DM2}" != "64" ]
  205.33  		then
  205.34  	  	echo "Data model flag -d64 not accepted or had improper effect."
  205.35 @@ -227,10 +230,10 @@
  205.36  else
  205.37  # Negative tests for non-dual mode platforms to ensure the other data model is 
  205.38  # rejected
  205.39 -	DM=`$JAVA GetDataModel`
  205.40 +	DM=`$JAVA GetDataModel | ${SED_CR}`
  205.41  	case "$DM" in
  205.42  	   32 )
  205.43 -		DM2=`${JAVA} -d64 GetDataModel`	
  205.44 +		DM2=`${JAVA} -d64 GetDataModel | ${SED_CR}`	
  205.45  		if [ "x${DM2}" != "x" ]
  205.46  		then
  205.47  		   echo "Data model flag -d64 was accepted."
  205.48 @@ -239,7 +242,7 @@
  205.49             ;;
  205.50  
  205.51  	   64 )
  205.52 -		DM2=`${JAVA} -d32 GetDataModel`	
  205.53 +		DM2=`${JAVA} -d32 GetDataModel | ${SED_CR}`	
  205.54  		if [ "x${DM2}" != "x" ]
  205.55  		  then
  205.56  		    echo "Data model flag -d32 was accepted."
   206.1 --- a/test/tools/launcher/ClassPathWildCard.sh	Thu Jan 21 11:12:37 2010 -0800
   206.2 +++ b/test/tools/launcher/ClassPathWildCard.sh	Fri Jan 22 09:34:17 2010 -0800
   206.3 @@ -145,7 +145,7 @@
   206.4  
   206.5  OS=`uname -s`
   206.6  case $OS in 
   206.7 -    Windows*|Cygwin*)
   206.8 +    Windows*|CYGWIN*)
   206.9          PATHSEP=";"
  206.10          ExecJava "" "${PATHSEP}NOOPDIR"
  206.11          ExecJava "w" "${PATHSEP}NOOPDIR"
   207.1 --- a/test/tools/launcher/DefaultLocaleTest.sh	Thu Jan 21 11:12:37 2010 -0800
   207.2 +++ b/test/tools/launcher/DefaultLocaleTest.sh	Fri Jan 22 09:34:17 2010 -0800
   207.3 @@ -48,7 +48,7 @@
   207.4  OS=`uname`
   207.5  
   207.6  case "$OS" in
   207.7 -        Windows* | CYGWIN* )
   207.8 +        Windows* )
   207.9              JAVAC="${TESTJAVA}/bin/javac -d . "
  207.10              JAVA="${TESTJAVA}/bin/java -classpath . "
  207.11              JAVAW="${TESTJAVA}/bin/javaw -classpath . "
  207.12 @@ -64,6 +64,22 @@
  207.13              echo "Test passes"
  207.14              exit 0
  207.15          ;;
  207.16 +        CYGWIN* )
  207.17 +            JAVAC="${TESTJAVA}/bin/javac -d . "
  207.18 +            JAVA="${TESTJAVA}/bin/java -classpath . "
  207.19 +            JAVAW="${TESTJAVA}/bin/javaw -classpath . "
  207.20 +
  207.21 +            ${JAVAC} ${TESTSRC}/DefaultLocaleTest.java
  207.22 +            ${JAVA} DefaultLocaleTest | sed -e s@\\r@@g > x.out
  207.23 +            ${JAVAW} DefaultLocaleTest `cat x.out`
  207.24 +            if [ $? -ne 0 ]
  207.25 +            then
  207.26 +                echo "Test fails"
  207.27 +                exit 1
  207.28 +            fi
  207.29 +            echo "Test passes"
  207.30 +            exit 0
  207.31 +        ;;
  207.32          * )
  207.33          echo "Non-windows environment; test vacuously succeeds."
  207.34          exit 0;
   208.1 --- a/test/tools/launcher/UnicodeTest.sh	Thu Jan 21 11:12:37 2010 -0800
   208.2 +++ b/test/tools/launcher/UnicodeTest.sh	Fri Jan 22 09:34:17 2010 -0800
   208.3 @@ -54,7 +54,7 @@
   208.4  
   208.5  echo "creating test source files"
   208.6  "$JAVAC" -d . "${TESTSRC}"/UnicodeTest.java
   208.7 -CLASS_NAME=`"$JAVA" UnicodeTest`
   208.8 +CLASS_NAME=`"$JAVA" UnicodeTest | sed -e 's@\\r@@g' `
   208.9  
  208.10  if [ "$CLASS_NAME" = "" ]
  208.11  then