diff --git a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c index ab20da49a25..fcc295dc877 100644 --- a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c +++ b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c @@ -290,8 +290,6 @@ static int (*main_fptr)(int argc, char **argv) = NULL; */ static void *apple_main (void *arg) { - objc_registerThreadWithCollector(); - if (main_fptr == NULL) { #ifdef STATIC_BUILD extern int main(int argc, char **argv); @@ -772,7 +770,7 @@ JLI_GetJavaVMInstance() void RegisterThread() { - objc_registerThreadWithCollector(); + // stubbed out for windows and *nixes. } static void diff --git a/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m b/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m index 2edec65f318..c3dcd20a092 100644 --- a/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m +++ b/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -332,7 +332,15 @@ AWT_ASSERT_APPKIT_THREAD; #define DRAGMASK (NSMouseMovedMask | NSLeftMouseDraggedMask | NSRightMouseDownMask | NSRightMouseDraggedMask | NSLeftMouseUpMask | NSRightMouseUpMask | NSFlagsChangedMask | NSKeyDownMask) -- (NSEvent *)nextEventMatchingMask:(NSUInteger)mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)deqFlag { +#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 { if (mask == DRAGMASK && [((NSString *)kCFRunLoopDefaultMode) isEqual:mode]) { postEventDuringEventSynthesis = YES; } @@ -449,4 +457,3 @@ AWT_ASSERT_APPKIT_THREAD; } } } - diff --git a/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m b/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m index 1eda7334665..ea8a689c768 100644 --- a/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m +++ b/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -394,8 +394,6 @@ SplashEventLoop(Splash * splash) { void * SplashScreenThread(void *param) { - objc_registerThreadWithCollector(); - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; Splash *splash = (Splash *) param; diff --git a/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c b/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c index d554bb3d5cd..1d0f8d56785 100644 --- a/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c +++ b/jdk/src/java.desktop/share/native/libjavajpeg/jdhuff.c @@ -455,10 +455,15 @@ static const int extend_test[16] = /* entry n is 2**(n-1) */ 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ - { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, - ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, - ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, - ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + { 0, + (int)(((unsigned)(~0)<<1) + 1), (int)(((unsigned)(~0)<<2) + 1), + (int)(((unsigned)(~0)<<3) + 1), (int)(((unsigned)(~0)<<4) + 1), + (int)(((unsigned)(~0)<<5) + 1), (int)(((unsigned)(~0)<<6) + 1), + (int)(((unsigned)(~0)<<7) + 1), (int)(((unsigned)(~0)<<8) + 1), + (int)(((unsigned)(~0)<<9) + 1), (int)(((unsigned)(~0)<<10) + 1), + (int)(((unsigned)(~0)<<11) + 1), (int)(((unsigned)(~0)<<12) + 1), + (int)(((unsigned)(~0)<<13) + 1), (int)(((unsigned)(~0)<<14) + 1), + (int)(((unsigned)(~0)<<15) + 1) }; #endif /* AVOID_TABLES */ diff --git a/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c b/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c index 8301209681e..ba589d75433 100644 --- a/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c +++ b/jdk/src/java.desktop/share/native/libjavajpeg/jdphuff.c @@ -215,10 +215,15 @@ static const int extend_test[16] = /* entry n is 2**(n-1) */ 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ - { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, - ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, - ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, - ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + { 0, + (int)(((unsigned)(~0)<<1) + 1), (int)(((unsigned)(~0)<<2) + 1), + (int)(((unsigned)(~0)<<3) + 1), (int)(((unsigned)(~0)<<4) + 1), + (int)(((unsigned)(~0)<<5) + 1), (int)(((unsigned)(~0)<<6) + 1), + (int)(((unsigned)(~0)<<7) + 1), (int)(((unsigned)(~0)<<8) + 1), + (int)(((unsigned)(~0)<<9) + 1), (int)(((unsigned)(~0)<<10) + 1), + (int)(((unsigned)(~0)<<11) + 1), (int)(((unsigned)(~0)<<12) + 1), + (int)(((unsigned)(~0)<<13) + 1), (int)(((unsigned)(~0)<<14) + 1), + (int)(((unsigned)(~0)<<15) + 1) }; #endif /* AVOID_TABLES */