replace preprocessor __try/__except hack with patch

This commit is contained in:
Joel Dice 2016-01-13 09:28:07 -08:00
parent 10eecce9cf
commit dab9bb7d1f
3 changed files with 28 additions and 3 deletions

View File

@ -2278,6 +2278,9 @@ ifneq (7,$(openjdk-version))
if [ -f openjdk-patches/$(notdir $(<)).8.patch ]; then \
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.patch; \
fi
if [ -f openjdk-patches/$(notdir $(<)).8.$(platform).patch ]; then \
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.$(platform).patch; \
fi
endif
if [ -f openjdk-patches/$(notdir $(<)).patch ]; then \
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).patch; \

View File

@ -0,0 +1,24 @@
--- openjdk/java_props_md.c
+++ openjdk/java_props_md.c
@@ -212,17 +212,17 @@
* SHELL32 DLL is delay load DLL and we can use the trick with
* __try/__except block.
*/
- __try {
+ /* __try { */
/*
* For Windows Vista and later (or patched MS OS) we need to use
* [SHGetKnownFolderPath] call to avoid MAX_PATH length limitation.
* Shell32.dll (version 6.0.6000 or later)
*/
hr = SHGetKnownFolderPath(&FOLDERID_Profile, KF_FLAG_DONT_VERIFY, NULL, &u_path);
- } __except(EXCEPTION_EXECUTE_HANDLER) {
+ /* } __except(EXCEPTION_EXECUTE_HANDLER) { */
/* Exception: no [SHGetKnownFolderPath] entry */
- hr = E_FAIL;
- }
+ /* hr = E_FAIL; */
+ /* } */
if (FAILED(hr)) {
WCHAR path[MAX_PATH+1];

View File

@ -252,9 +252,7 @@ ifeq ($(platform),windows)
-D_JAVASOFT_WIN32_TYPEDEF_MD_H_ \
-D_WIN32_WINNT=0x0600 \
-Ds6_words=_s6_words \
-Ds6_bytes=_s6_bytes \
"-D__try=if (1)" \
"-D__except(a)=else"
-Ds6_bytes=_s6_bytes
ifeq ($(arch),x86_64)
openjdk-cflags += "-I$(root)/win64/include"