jdk8u-dev icon indicating copy to clipboard operation
jdk8u-dev copied to clipboard

8031199: _MSC_VER is only defined on _WIN32 Backport

Open luwang1103 opened this issue 1 year ago • 5 comments
trafficstars

hi,

When compiling jdk8u from x86_64, there is an alarm message as shown below. jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:719:3: note: in expansion of macro ‘TRACE1’ 719 | TRACE1("[GSSLibStub_getCredName] pName=%" PRIuPTR "", (uintptr_t) nameHdl); | ^~~~~~ jdk/src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function ‘Java_sun_security_jgss_wrapper_GSSLibStub_importContext’: jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h:92:52: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]

PRIuPTR is defined in jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h

#if _MSC_VER >= 1800 #include<inttypes.h> #endif

// Visual Studio 2010-2012 doesn't provide inttypes.h so provide appropriate definitions here. #if _MSC_VER < 1800 #ifdef _LP64 #define PRIuPTR "I64u" #else #define PRIuPTR "u" #endif #endif

Upon checking the code, it was found that the custom macro PRIuPTR was used in the Linux system. The header file # include<inttypes.h> should be used in linux. so, It is necessary to limit the scope of use of custom macros to visual studio 2010-2012.

Thanks!


Progress

  • [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8031199 needs maintainer approval

Integration blocker

 ⚠️ Title mismatch between PR and JBS for issue JDK-8031199

Issue

  • JDK-8031199: _MSC_VER is only defined on _WIN32 (Bug - P4) ⚠️ Title mismatch between PR and JBS. ⚠️ Issue is already resolved. Consider making this a "backport pull request" by setting the PR title to Backport <hash> with the hash of the original commit. See Backports.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/540/head:pull/540
$ git checkout pull/540

Update a local copy of the PR:
$ git checkout pull/540
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/540/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 540

View PR using the GUI difftool:
$ git pr show -t 540

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/540.diff

Webrev

Link to Webrev Comment

luwang1103 avatar Jul 08 '24 07:07 luwang1103

:wave: Welcome back luwang1103! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Jul 08 '24 07:07 bridgekeeper[bot]

❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.

openjdk[bot] avatar Jul 08 '24 08:07 openjdk[bot]

Webrevs

mlbridge[bot] avatar Jul 08 '24 08:07 mlbridge[bot]

:warning: @luwang1103 the given backport hash 844e14af0baeffec701b3a206c82942a5553e6a1 is an ancestor of your proposed change. Please update the title with the hash for the change you are backporting.

openjdk[bot] avatar Jul 09 '24 01:07 openjdk[bot]

Please enable GHA testing on this repo.

phohensee avatar Jul 26 '24 20:07 phohensee

@luwang1103 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Aug 23 '24 21:08 bridgekeeper[bot]

@luwang1103 This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Sep 20 '24 22:09 bridgekeeper[bot]