changeset 2325:219b84b9533a jdk7-b93

Merge
author mikejwre
date Wed, 12 May 2010 17:19:58 -0700
parents fa09af0e5b7c 7bbb5f3b6eed
children d352cd74ef71 7a1873e045cb
files
diffstat 16 files changed, 227 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/make/com/sun/java/pack/Makefile	Thu May 06 18:26:09 2010 -0700
+++ b/make/com/sun/java/pack/Makefile	Wed May 12 17:19:58 2010 -0700
@@ -152,7 +152,7 @@
 	$(prep-target)
 	$(LINKER)  $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
 ifdef MT
-	$(MT) /manifest $(TEMPDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
+	$(MT) /manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
 endif
 	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
 	$(install-module-file)
--- a/make/common/Defs-windows.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/Defs-windows.gmk	Wed May 12 17:19:58 2010 -0700
@@ -86,6 +86,11 @@
     MSVCPNN_DLL = msvcp90.dll
     MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
   endif
+  ifeq ($(COMPILER_VERSION), VS2010)
+    MSVCRNN_DLL = msvcr100.dll
+    MSVCPNN_DLL = msvcp100.dll
+    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+  endif
 endif
 
 ifeq ($(ARCH_DATA_MODEL), 64)
@@ -94,6 +99,11 @@
     MSVCPNN_DLL = msvcp90.dll
     MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
   endif
+  ifeq ($(COMPILER_VERSION), VS2010)
+    MSVCRNN_DLL = msvcr100.dll
+    MSVCPNN_DLL = msvcp100.dll
+    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
+  endif
 endif
 
 EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
@@ -155,6 +165,7 @@
     # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
     AUTOMATIC_PCH_OPTION =
     GX_OPTION = -GX
+    GZ_OPTION = -GZ
     ifeq ($(ARCH_DATA_MODEL), 32)
       CC_OPT/HIGHEST = -Ox -Gy -Os -GB
       CC_OPT/HIGHER  = -Ox -Gy -Os -GB
@@ -171,6 +182,7 @@
     AUTOMATIC_PCH_OPTION = -YX
     # Also known as VC7 compiler
     GX_OPTION = -GX
+    GZ_OPTION = -GZ
     ifeq ($(ARCH_DATA_MODEL), 32)
       # Lowered opt level to try and reduce footprint, dll size especially.
       #     Was: CC_OPT/HIGHEST = -O2 -G6
@@ -190,6 +202,7 @@
     AUTOMATIC_PCH_OPTION =
     # VS2005 compiler, only with Platform SDK right now?
     GX_OPTION = -EHsc
+    GZ_OPTION = -RTC1
     ifeq ($(ARCH_DATA_MODEL), 32)
       CC_OPT/HIGHEST = -O2
       CC_OPT/HIGHER  = -O1
@@ -204,6 +217,23 @@
     # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
     AUTOMATIC_PCH_OPTION =
     GX_OPTION = -EHsc
+    GZ_OPTION = -RTC1
+    ifeq ($(ARCH_DATA_MODEL), 32)
+      CC_OPT/HIGHEST = -O2
+      CC_OPT/HIGHER  = -O1
+      CC_OPT/LOWER   = -O1
+    else
+      CC_OPT/HIGHEST = -O2
+      CC_OPT/HIGHER  = -O1
+      CC_OPT/LOWER   = -O1
+    endif
+  endif
+
+  ifeq ($(COMPILER_VERSION), VS2010)
+    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+    AUTOMATIC_PCH_OPTION =
+    GX_OPTION = -EHsc
+    GZ_OPTION = -RTC1
     ifeq ($(ARCH_DATA_MODEL), 32)
       CC_OPT/HIGHEST = -O2
       CC_OPT/HIGHER  = -O1
@@ -282,6 +312,13 @@
   CFLAGS_OPT      = $(CC_OPT)
   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
 
+  # REMIND: I don't see where CFLAGS_VS2005 is used. I suspect its
+  # pulled in as a combined "CFLAGS_$(COMPILER_VERSION)" string
+  # but the lack of this isn't causing any apparent build problems
+  # with VS 2010 but it could be causing compiler warnings.
+  # For now, I  will add it for all cases :
+  CFLAGS_VS2010 += -Zc:wchar_t-
+  #
   # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
   # by default. However, we expect the wchar_t to be a typedef to the
   # unsigned short data type. The -Zc:wchar_t- option restores the old
@@ -317,6 +354,7 @@
 
   # VS2008 has bufferoverflow baked in:
   LFLAGS_VS2008 = 
+  LFLAGS_VS2010 = 
 
   # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
   BASELFLAGS = -nologo /opt:REF /incremental:no
--- a/make/common/Modules.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/Modules.gmk	Wed May 12 17:19:58 2010 -0700
@@ -357,6 +357,9 @@
 	$(MKDIR) -p $(JDK_MODULE_IMAGE_DIR)/bin
 	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
 	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
+    ifeq ($(COMPILER_VERSION), VS2010)
+	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
+    endif
     ifeq ($(ARCH_DATA_MODEL), 32)
       ifeq ($(COMPILER_VERSION), VS2003)
 	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_MODULE_IMAGE_DIR)/bin
--- a/make/common/Release.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/Release.gmk	Wed May 12 17:19:58 2010 -0700
@@ -749,6 +749,8 @@
 	$(RM) `$(FIND) $(JRE_IMAGE_DIR)/lib -name 'ir.idl'`
 
 # Construct an initial jre image (initial jdk jre) no trimming or stripping
+# See "initial-image-jdk-setup" for an explanation of the rm of
+# drive names like C:
 initial-image-jre:: initial-image-jre-setup \
 		    $(JRE_LICENSES) $(JRE_DOCFILES) \
 		    $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) \
@@ -759,6 +761,10 @@
 	$(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet
 	@# Copy in lib directory
 	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
+  ifeq ($(USING_CYGWIN),true)
+	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
+	  $(RM) -rf $(OUTPUTDIR)/[A-Za-z]:
+  endif
 	@# Make sure all directories are read/execute for everyone
 	$(CHMOD) a+rx `$(FIND) $(JRE_IMAGE_DIR) -type d`
 	@# Remove some files from the jre area
@@ -858,11 +864,27 @@
 ######################################################
 # Note: cpio ($(CPIO)) sometimes leaves directories without rx access.
 
+# REMIND: the $(RM) calls for patterns like c:, d: following $(CPIO)
+# are because the 1.7.x versions of cygwin's cpio command drops these
+# in the working directory if the output path begins with that pattern
+# The one for the output jre subdirectory gets there because cpio sees its
+# own dropping in the input jre subdirectory. Need to remove both of these.
+# We can remove these RM's if someone figures out how to stop cpio from
+# leaving these there.
+# Note that its a real problem not because this directory can end up in the
+# bundle (I think it won't since it not in bin or lib and those are the
+# only places from which we copy everything), but because the presence
+# of this file causes cygwin's find to bomb out, thus breaking the build
+# in "install".
 initial-image-jdk-setup:
 	$(RM) -r $(JDK_IMAGE_DIR)
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/jre
 	($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \
 	      | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre )
+  ifeq ($(USING_CYGWIN),true)
+	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
+	  $(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]:
+  endif
 	$(RM) -rf $(JDK_IMAGE_DIR)/jre/man
 	$(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d`
 
@@ -923,6 +945,9 @@
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/bin
 	$(CP) $(BINDIR)/*$(EXE_SUFFIX) $(JDK_IMAGE_DIR)/bin
 	$(CP) $(BINDIR)/jli.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
+    ifeq ($(COMPILER_VERSION), VS2010)
+	$(CP) $(BINDIR)/msvc*100.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
+    endif
     ifeq ($(ARCH_DATA_MODEL), 32)
       ifeq ($(COMPILER_VERSION), VS2003)
 	$(CP) $(BINDIR)/msvc*71.$(LIBRARY_SUFFIX) $(JDK_IMAGE_DIR)/bin
--- a/make/common/shared/Compiler-msvc.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/shared/Compiler-msvc.gmk	Wed May 12 17:19:58 2010 -0700
@@ -67,7 +67,7 @@
       COMPILER_VERSION=VS2005
       REBASE     = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
       MTL        = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
-      MT         = $(MSDEVTOOLS_PATH)mt
+      MT         = $(MSDEVTOOLS_PATH)/mt
       ifndef COMPILER_PATH
 	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
       endif
@@ -83,6 +83,17 @@
 	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
       endif
     endif
+    ifeq ($(CC_MAJORVER), 16)
+      COMPILER_NAME=Visual Studio 10
+      COMPILER_VERSION=VS2010
+      #rebase and midl moved out of Visual Studio into the SDK:
+      REBASE     = $(MSDEVTOOLS_PATH)/rebase
+      MTL        = $(MSDEVTOOLS_PATH)/midl.exe
+      MT         = $(MSDEVTOOLS_PATH)mt
+      ifndef COMPILER_PATH
+	COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
+      endif
+    endif
   else
     # else ARCH_DATA_MODEL is 64
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
@@ -122,6 +133,15 @@
       COMPILER_VERSION=VS2008
       RC = $(MSSDK61)/Bin/X64/rc.exe
       MT = $(MSSDK61)/Bin/X64/mt.exe
+      MTL = $(MSSDK61)/Bin/X64/midl.exe
+    endif
+    ifeq ($(CC_MAJORVER), 16)
+      COMPILER_NAME=Microsoft Visual Studio 10 (16.00.30319.01)
+      COMPILER_VERSION=VS2010
+      RC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe
+      RSC = $(MSDEVTOOLS_PATH)/Bin/x64/rc.exe
+      MT = $(MSDEVTOOLS_PATH)/Bin/x64/mt.exe
+      MTL = $(MSDEVTOOLS_PATH)/Bin/X64/midl.exe
     endif
     # This will cause problems if ALT_COMPILER_PATH is defined to ""
     # which is a directive to use the PATH.
--- a/make/common/shared/Defs-versions.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/shared/Defs-versions.gmk	Wed May 12 17:19:58 2010 -0700
@@ -165,10 +165,10 @@
   REQUIRED_DXSDK_VER          = 0x0900
   ifeq ($(CC_VERSION),msvc)
     ifeq ($(ARCH_DATA_MODEL), 32)
-      REQUIRED_COMPILER_NAME    = Visual Studio 9
-      REQUIRED_COMPILER_VERSION = VS2008
-      REQUIRED_CC_VER           = 15.00.21022.08
-      REQUIRED_LINK_VER         = 9.00.21022.08
+      REQUIRED_COMPILER_NAME    = Visual Studio 10
+      REQUIRED_COMPILER_VERSION = VS2010
+      REQUIRED_CC_VER           = 16.00.30319.01
+      REQUIRED_LINK_VER         = 10.00.30319.01
     else
       ifeq ($(ARCH), ia64)
         REQUIRED_COMPILER_NAME    = Microsoft Platform SDK - November 2001 Edition
@@ -177,10 +177,10 @@
         REQUIRED_LINK_VER         = 7.00.9337.7
       endif
       ifeq ($(ARCH), amd64)
-        REQUIRED_COMPILER_NAME    = Microsoft Windows SDK with Visual Studio 9 (6001.18000.367)
-        REQUIRED_COMPILER_VERSION = VS2008
-        REQUIRED_CC_VER           = 15.00.21022.08
-        REQUIRED_LINK_VER         = 9.00.21022.08
+        REQUIRED_COMPILER_NAME    = Visual Studio 10
+        REQUIRED_COMPILER_VERSION = VS2010
+        REQUIRED_CC_VER           = 16.00.30319.01
+        REQUIRED_LINK_VER         = 10.00.30319.01
       endif
     endif
   endif
--- a/make/common/shared/Defs-windows.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/shared/Defs-windows.gmk	Wed May 12 17:19:58 2010 -0700
@@ -248,26 +248,34 @@
   # If we still don't have it, look for VSnnCOMNTOOLS (newest first),
   # set by installer?
   ifeq ($(_msvc_dir),)
-    ifdef VS90COMNTOOLS  # /Common/Tools directory, use ../../Vc
-      xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
-      _vs90tools     :=$(call FullPath,$(xVS90COMNTOOLS))
+    ifdef VS100COMNTOOLS  # /Common/Tools directory, use ../../Vc
+      xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
+      _vs100tools     :=$(call FullPath,$(xVS100COMNTOOLS))
     endif
-    ifneq ($(_vs90tools),)
-      _msvc_dir   :=$(_vs90tools)/../../Vc
+    ifneq ($(_vs100tools),)
+      _msvc_dir   :=$(_vs100tools)/../../Vc
     else
-      ifdef VS80COMNTOOLS  # /Common/Tools directory, use ../../Vc
-        xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
-        _vs80tools     :=$(call FullPath,$(xVS80COMNTOOLS))
+      ifdef VS90COMNTOOLS  # /Common/Tools directory, use ../../Vc
+        xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
+        _vs90tools     :=$(call FullPath,$(xVS90COMNTOOLS))
       endif
-      ifneq ($(_vs80tools),)
-        _msvc_dir   :=$(_vs80tools)/../../Vc
+      ifneq ($(_vs90tools),)
+        _msvc_dir   :=$(_vs90tools)/../../Vc
       else
-        ifdef VS71COMNTOOLS  # /Common/Tools directory, use ../../Vc7
-          xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
-          _vs71tools     :=$(call FullPath,$(xVS71COMNTOOLS))
+        ifdef VS80COMNTOOLS  # /Common/Tools directory, use ../../Vc
+          xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
+          _vs80tools     :=$(call FullPath,$(xVS80COMNTOOLS))
         endif
-        ifneq ($(_vs71tools),)
-          _msvc_dir   :=$(_vs71tools)/../../Vc7
+        ifneq ($(_vs80tools),)
+          _msvc_dir   :=$(_vs80tools)/../../Vc
+        else
+          ifdef VS71COMNTOOLS  # /Common/Tools directory, use ../../Vc7
+            xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
+            _vs71tools     :=$(call FullPath,$(xVS71COMNTOOLS))
+          endif
+          ifneq ($(_vs71tools),)
+            _msvc_dir   :=$(_vs71tools)/../../Vc7
+          endif
         endif
       endif
     endif
@@ -276,12 +284,15 @@
     _compiler_bin :=$(_msvc_dir)/Bin
     # Assume PlatformSDK is in VS71 (will be empty if VS90)
     _ms_sdk       :=$(call FullPath,$(_msvc_dir)/PlatformSDK)
-    # Assume VS90, then VS80, then VS71
-    _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT)
+    # Assume VS100, then VS90, then VS80, then VS71
+    _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
     ifeq ($(_redist_sdk),)
-      _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT)
+      _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC90.CRT)
       ifeq ($(_redist_sdk),)
-        _redist_sdk   :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin)
+        _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC80.CRT)
+        ifeq ($(_redist_sdk),)
+          _redist_sdk   :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin)
+        endif
       endif
     endif
   endif
@@ -316,23 +327,40 @@
   endif
 endif
 
-# Compilers for 64bit are from SDK
+# Compilers for 64bit may be from SDK. For VS 2010 we use those.
+# The Express compilers don't contain 64 bit compilers, so in
+# that case, you additionally need the SDK. At this time,
+# there's no 64 bit SDK available that has VS 2010.
+# Presumably SDK v7.1 will provide that and we may want to update
+# the logic here to work with that.
+# However official builds will use the Professional version.
 ifeq ($(ARCH_DATA_MODEL), 64)
-  xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/"
-  VS2008 :=$(call FullPath,$(xVS2008))
-  ifneq ($(VS2008),)
-    _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH)
-    xMSSDK61      :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
-    MSSDK61       :=$(call FullPath,$(xMSSDK61))
-    _redist_sdk   :=$(VS2008)/VC/redist/x86/Microsoft.VC90.CRT
+  ifdef VS100COMNTOOLS  # /Common7/Tools directory, use ../../Vc
+    xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
+    _vs100tools     :=$(call FullPath,$(xVS100COMNTOOLS))
+  endif
+  ifneq ($(_vs100tools),)
+    _compiler_bin :=$(_vs100tools)/../../Vc/bin/amd64
+    _redist_sdk   :=$(_vs100tools)/../../Vc/redist/x64/Microsoft.VC100.CRT
+    xMSSDK70      :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
+    MSSDK70       :=$(call FullPath,$(xMSSDK70))
   else
-    ifneq ($(_ms_sdk),)
-      ifeq ($(ARCH), ia64)
-        _compiler_bin :=$(_ms_sdk)/Bin/Win64
-      endif
-      ifeq ($(ARCH), amd64)
-        _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
-        _redist_sdk   :=$(_ms_sdk)/redist/win64/AMD64
+    xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/"
+    VS2008 :=$(call FullPath,$(xVS2008))
+    ifneq ($(VS2008),)
+      _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH)
+      xMSSDK61      :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
+      MSSDK61       :=$(call FullPath,$(xMSSDK61))
+      _redist_sdk   :=$(VS2008)/VC/redist/x86/Microsoft.VC90.CRT
+    else
+      ifneq ($(_ms_sdk),)
+        ifeq ($(ARCH), ia64)
+          _compiler_bin :=$(_ms_sdk)/Bin/Win64
+        endif
+        ifeq ($(ARCH), amd64)
+          _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
+          _redist_sdk   :=$(_ms_sdk)/redist/win64/AMD64
+        endif
       endif
     endif
   endif
@@ -454,10 +482,14 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
   _NEEDS_MSVCRNN = true
 else
-  ifeq ($(VS2008),)
-    _NEEDS_MSVCRNN = false
-  else
+  ifneq ($(VS2010),)
     _NEEDS_MSVCRNN = true
+  else 
+    ifneq ($(VS2008),)
+      _NEEDS_MSVCRNN = true
+    else
+      _NEEDS_MSVCRNN = false
+    endif
   endif
 endif
 
@@ -557,6 +589,17 @@
 endif
 CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
 
+# CABARC: path to cabarc.exe (used in creating install bundles)
+ifdef ALT_CABARC
+  xALT_CABARC :="$(subst \,/,$(ALT_CABARC))"
+  CABARC  =$(xALT_CABARC)
+else
+  _CABARC1 :=$(_system_root)/system32/cabarc.exe
+  _CABARC2 :=$(DEVTOOLS_PATH)cabarc.exe
+  CABARC  :=$(call FileExists,$(_CABARC1),$(_CABARC2))
+endif
+CABARC:=$(call AltCheckSpaces,CABARC)
+
 # MSIVAL2: path to msival2.exe (used in validating install msi files)
 ifdef ALT_MSIVAL2
   xALT_MSIVAL2 :="$(subst \,/,$(ALT_MSIVAL2))"
--- a/make/common/shared/Platform.gmk	Thu May 06 18:26:09 2010 -0700
+++ b/make/common/shared/Platform.gmk	Wed May 12 17:19:58 2010 -0700
@@ -275,7 +275,12 @@
   endif
   ARCH_FAMILY = $(ARCH)
   # Where is unwanted output to be delivered?
-  DEV_NULL = NUL
+  # MKS uses the special file "NUL", cygwin uses the customary unix file.
+  ifeq ($(USING_CYGWIN),true)
+    DEV_NULL = /dev/null
+  else
+    DEV_NULL = NUL
+  endif
   export DEV_NULL
   # Classpath separator
   CLASSPATH_SEPARATOR = ;
--- a/src/share/bin/main.c	Thu May 06 18:26:09 2010 -0700
+++ b/src/share/bin/main.c	Wed May 12 17:19:58 2010 -0700
@@ -33,14 +33,16 @@
 #include "defines.h"
 
 #ifdef _MSC_VER
-#if _MSC_VER > 1400
+#if _MSC_VER > 1400 && _MSC_VER < 1600
 
 /*
  * When building for Microsoft Windows, main has a dependency on msvcr??.dll.
  *
- * When using Visual Studio 2005 or later, that must be recorded in
+ * When using Visual Studio 2005 or 2008, that must be recorded in
  * the [java,javaw].exe.manifest file.
  *
+ * As of VS2010 (ver=1600), the runtimes again no longer need manifests.
+ *
  * Reference:
  *     C:/Program Files/Microsoft SDKs/Windows/v6.1/include/crtdefs.h
  */
@@ -67,7 +69,7 @@
         "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
 
 #endif  /* _M_AMD64 */
-#endif  /* _MSC_VER > 1400 */
+#endif  /* _MSC_VER > 1400 && _MSC_VER < 1600 */
 #endif  /* _MSC_VER */
 
 /*
--- a/src/windows/bin/java_md.c	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/bin/java_md.c	Wed May 12 17:19:58 2010 -0700
@@ -148,11 +148,18 @@
          * assumed to be present in the "JRE path" directory.  If it is not found
          * there (or "JRE path" fails to resolve), skip the explicit load and let
          * nature take its course, which is likely to be a failure to execute.
+         * This is clearly completely specific to the exact compiler version
+         * which isn't very nice, but its hardly the only place.
+         * No attempt to look for compiler versions in between 2003 and 2010
+         * as we aren't supporting building with those.
          */
 #ifdef _MSC_VER
 #if _MSC_VER < 1400
 #define CRT_DLL "msvcr71.dll"
 #endif
+#if _MSC_VER >= 1600
+#define CRT_DLL "msvcr100.dll"
+#endif
 #ifdef CRT_DLL
         if (GetJREPath(crtpath, MAXPATHLEN)) {
             (void)JLI_StrCat(crtpath, "\\bin\\" CRT_DLL);   /* Add crt dll */
--- a/src/windows/native/sun/jkernel/DownloadDialog.cpp	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/jkernel/DownloadDialog.cpp	Wed May 12 17:19:58 2010 -0700
@@ -29,7 +29,10 @@
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+/* REMIND : 0x500 means Windows 2000 .. seems like we can update
+ * for Windows XP when we move the SDK and build platform
+ */
+#define _WIN32_WINNT 0x0500
 #endif
 #define _ATL_APARTMENT_THREADED
 
--- a/src/windows/native/sun/jkernel/DownloadHelper.cpp	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/jkernel/DownloadHelper.cpp	Wed May 12 17:19:58 2010 -0700
@@ -29,7 +29,10 @@
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+/* REMIND : 0x500 means Windows 2000 .. seems like we can update
+ * for Windows XP when we move the SDK and build platform
+ */
+#define _WIN32_WINNT 0x0500
 #endif
 #define _ATL_APARTMENT_THREADED
 
--- a/src/windows/native/sun/jkernel/stdafx.h	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/jkernel/stdafx.h	Wed May 12 17:19:58 2010 -0700
@@ -36,7 +36,10 @@
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+/* REMIND : 0x500 means Windows 2000 .. seems like we can update
+ * for Windows XP when we move the SDK and build platform
+ */
+#define _WIN32_WINNT 0x0500
 #endif
 #define _ATL_APARTMENT_THREADED
 
--- a/src/windows/native/sun/windows/awt_DesktopProperties.cpp	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/windows/awt_DesktopProperties.cpp	Wed May 12 17:19:58 2010 -0700
@@ -233,7 +233,19 @@
     //
     NONCLIENTMETRICS    ncmetrics;
 
-    ncmetrics.cbSize = sizeof(ncmetrics);
+    // Fix for 6944516: specify correct size for ncmetrics on WIN2K/XP
+    // Microsoft recommend to subtract the size of  'iPaddedBorderWidth' field
+    // when running on XP. However this can't be referenced at compile time
+    // with the older SDK, so there use 'lfMessageFont' plus its size.
+    if (!IS_WINVISTA) {
+#if defined(_MSC_VER) && (_MSC_VER >= 1600) {
+        ncmetrics.cbSize = offsetof(NONCLIENTMETRICS, iPaddedBorderWidth);
+#else
+        ncmetrics.cbSize = offsetof(NONCLIENTMETRICS,lfMessageFont) + sizeof(LOGFONT);
+#endif
+    } else {
+        ncmetrics.cbSize = sizeof(ncmetrics);
+    }
     VERIFY( SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncmetrics.cbSize, &ncmetrics, FALSE) );
 
     SetFontProperty( TEXT("win.frame.captionFont"), ncmetrics.lfCaptionFont );
--- a/src/windows/native/sun/windows/awt_DnDDS.cpp	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/windows/awt_DnDDS.cpp	Wed May 12 17:19:58 2010 -0700
@@ -29,21 +29,16 @@
 //we need <new> inclusion for STL "new" oprators set.
 #define bad_alloc zbad_alloc
 #include <new>
+
+#if defined(_DEBUG) || defined(DEBUG)
+extern void * operator new(size_t size, const char * filename, int linenumber);
+void * operator new(size_t size) {return operator new(size, "stl", 1);}
+#endif
+#include <map>
+
 #pragma pop_macro("bad_alloc")
 //"bad_alloc" is undefined from here
 
-//we need to include any STL container before <awt.h> inclusion due to
-//"new" re-redefinition that is in conflict with in-place new allocator
-//applied in STL.
-#if defined(_DEBUG) || defined(DEBUG)
-    //forward declaration of "new" operator from <awt.h>
-    extern void * operator new(size_t size, const char * filename, int linenumber);
-    //"new" operator definition that is consistent with re-defined
-    //in <awt.h> "delete" operator
-    void * operator new(size_t size) {return operator new(size, "stl", 1);}
-#endif
-#include <map>
-
 #include <awt.h>
 #include <shlobj.h>
 
--- a/src/windows/native/sun/windows/awt_TextArea.cpp	Thu May 06 18:26:09 2010 -0700
+++ b/src/windows/native/sun/windows/awt_TextArea.cpp	Wed May 12 17:19:58 2010 -0700
@@ -758,7 +758,7 @@
                     si.cbSize = sizeof(SCROLLINFO);
                     si.fMask = SIF_POS | SIF_RANGE | SIF_PAGE;
                     int actualScrollLines =
-                        abs(platfScrollLines * (*delta_accum / WHEEL_DELTA));
+                        abs((int)(platfScrollLines * (*delta_accum / WHEEL_DELTA)));
                     for (int i = 0; i < actualScrollLines; i++) {
                         if (::GetScrollInfo(hWnd, sb_type, &si)) {
                             if ((wm_msg == WM_VSCROLL)