Please review the following change to get JDK10 to build on OSX 10.12 and above.

https://bugs.openjdk.java.net/browse/JDK-8184022
http://cr.openjdk.java.net/~phh/8184022/webrev.00/

I’d very much appreciate a sponsor for this fix. Imo, successful JDK10 builds 
on all supported platforms would be sufficient testing, but please let me know 
what I can do to help.

Slightly revised from the RFE:

JDK-8182299<https://bugs.openjdk.java.net/browse/JDK-8182299> enabled 
previously disabled clang warnings and was intended to also enable builds on 
OSX 10 + Xcode 8. Due to a mixup, this code in 
jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m

  #if defined(MAC_OS_X_VERSION_10_12) && \
     MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12 && \
     __LP64__
     / 10.12 changed `mask` to NSEventMask (unsigned long long) for x86_64 
builds.
  - (NSEvent *)nextEventMatchingMask:(NSEventMask)mask
  #else
  - (NSEvent *)nextEventMatchingMask:(NSUInteger)mask
  #endif
  untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)deqFlag {

works fine with OSX versions earlier than 10.12, but fails to compile starting 
with OSX 10.12 due to MAC_OSX_VERSION_MAX_ALLOWED being defined on the compile 
command line as 10.7.

The fix is to remove that definition, since it places an artificial upper bound 
on the OSX version under which JDK10 can be built. A source code search reveals 
no uses of MAC_OSX_VERSION_MAX_ALLOWED other than in NSApplicationAWT.m and 
hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp. The latter won't be affected by 
this change, since it checks for a version > 10.5, which is always true in 
JDK10.

Thanks,

Paul

Reply via email to