--- old/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2016-06-23 12:14:29.800348768 +0530 +++ new/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c 2016-06-23 12:14:29.600348768 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -573,9 +573,9 @@ (JNIEnv *env, jclass clazz, jlong display, jlong which, jlong device_spec) { AWT_CHECK_HAVE_LOCK_RETURN(0); - return (jlong) XkbGetMap( (Display *) jlong_to_ptr(display), + return ptr_to_jlong(XkbGetMap( (Display *) jlong_to_ptr(display), (unsigned int) which, - (unsigned int) device_spec); + (unsigned int) device_spec)); } JNIEXPORT jlong JNICALL Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap (JNIEnv *env, jclass clazz, jlong display, jlong which, jlong xkb) @@ -596,7 +596,7 @@ { AWT_CHECK_HAVE_LOCK_RETURN(JNI_FALSE); Bool b; - b = XkbTranslateKeyCode((XkbDescPtr)xkb, (unsigned int)keycode, (unsigned int)mods, + b = XkbTranslateKeyCode((XkbDescPtr) jlong_to_ptr(xkb), (unsigned int)keycode, (unsigned int)mods, (unsigned int *)jlong_to_ptr(mods_rtrn), (KeySym *)jlong_to_ptr(keysym_rtrn)); //printf("native, input: keycode:0x%0X; mods:0x%0X\n", keycode, mods); @@ -2211,7 +2211,7 @@ JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XSynchronize(JNIEnv *env, jclass clazz, jlong display, jboolean onoff) { - return (jint) XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False)); + return ptr_to_jlong(XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False))); } JNIEXPORT jboolean JNICALL