Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dab9bb7

Browse files
committedJan 13, 2016
replace preprocessor __try/__except hack with patch
1 parent 10eecce commit dab9bb7

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed
 

‎makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,6 +2278,9 @@ ifneq (7,$(openjdk-version))
22782278
if [ -f openjdk-patches/$(notdir $(<)).8.patch ]; then \
22792279
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.patch; \
22802280
fi
2281+
if [ -f openjdk-patches/$(notdir $(<)).8.$(platform).patch ]; then \
2282+
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.$(platform).patch; \
2283+
fi
22812284
endif
22822285
if [ -f openjdk-patches/$(notdir $(<)).patch ]; then \
22832286
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).patch; \
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- openjdk/java_props_md.c
2+
+++ openjdk/java_props_md.c
3+
@@ -212,17 +212,17 @@
4+
* SHELL32 DLL is delay load DLL and we can use the trick with
5+
* __try/__except block.
6+
*/
7+
- __try {
8+
+ /* __try { */
9+
/*
10+
* For Windows Vista and later (or patched MS OS) we need to use
11+
* [SHGetKnownFolderPath] call to avoid MAX_PATH length limitation.
12+
* Shell32.dll (version 6.0.6000 or later)
13+
*/
14+
hr = SHGetKnownFolderPath(&FOLDERID_Profile, KF_FLAG_DONT_VERIFY, NULL, &u_path);
15+
- } __except(EXCEPTION_EXECUTE_HANDLER) {
16+
+ /* } __except(EXCEPTION_EXECUTE_HANDLER) { */
17+
/* Exception: no [SHGetKnownFolderPath] entry */
18+
- hr = E_FAIL;
19+
- }
20+
+ /* hr = E_FAIL; */
21+
+ /* } */
22+
23+
if (FAILED(hr)) {
24+
WCHAR path[MAX_PATH+1];

‎openjdk-src.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ ifeq ($(platform),windows)
252252
-D_JAVASOFT_WIN32_TYPEDEF_MD_H_ \
253253
-D_WIN32_WINNT=0x0600 \
254254
-Ds6_words=_s6_words \
255-
-Ds6_bytes=_s6_bytes \
256-
"-D__try=if (1)" \
257-
"-D__except(a)=else"
255+
-Ds6_bytes=_s6_bytes
258256

259257
ifeq ($(arch),x86_64)
260258
openjdk-cflags += "-I$(root)/win64/include"

0 commit comments

Comments
 (0)
Please sign in to comment.