8075717: Replace INTERNAL_BUILD with DEBUG in awt

Reviewed-by: serb, azvegint
This commit is contained in:
Magnus Ihse Bursie 2015-03-24 10:52:08 +01:00
parent e7e3187500
commit c8ac9172fc
5 changed files with 19 additions and 28 deletions
jdk
make/lib
src/java.desktop
unix/native/libawt_xawt
windows/native/libawt/windows

@ -236,10 +236,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
endif
ifeq ($(MILESTONE), internal)
LIBAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt/mapfile-vers
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBAWT_MAPFILE :=
@ -347,10 +343,6 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
endif
endif
ifeq ($(MILESTONE), internal)
LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
endif
LIBAWT_XAWT_LDFLAGS_SUFFIX := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
ifeq ($(OPENJDK_TARGET_OS), linux)

@ -368,9 +368,9 @@ const char *getStrFor(JNIEnv *env, jstring val)
if (length > CONV_BUFFER_SIZE-1)
{
length = CONV_BUFFER_SIZE-1;
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "Note: Detail is too long: %d chars\n", length);
#endif /* INTERNAL_BUILD */
#endif /* DEBUG */
}
(*env)->GetStringUTFRegion(env, val, 0, length, convertionBuffer);
@ -507,9 +507,9 @@ void update_supported_actions(JNIEnv *env) {
}
}
} else {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "Cannot load g_vfs_get_supported_uri_schemes\n");
#endif /* INTERNAL_BUILD */
#endif /* DEBUG */
}
}
@ -522,23 +522,23 @@ gboolean gtk2_show_uri_load(JNIEnv *env) {
const char *gtk_version = fp_gtk_check_version(2, 14, 0);
if (gtk_version != NULL) {
// The gtk_show_uri is available from GTK+ 2.14
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf (stderr, "The version of GTK is %s. "
"The gtk_show_uri function is supported "
"since GTK+ 2.14.\n", gtk_version);
#endif /* INTERNAL_BUILD */
#endif /* DEBUG */
} else {
// Loading symbols only if the GTK version is 2.14 and higher
fp_gtk_show_uri = dl_symbol("gtk_show_uri");
const char *dlsym_error = dlerror();
if (dlsym_error) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf (stderr, "Cannot load symbol: %s \n", dlsym_error);
#endif /* INTERNAL_BUILD */
#endif /* DEBUG */
} else if (fp_gtk_show_uri == NULL) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "dlsym(gtk_show_uri) returned NULL\n");
#endif /* INTERNAL_BUILD */
#endif /* DEBUG */
} else {
update_supported_actions(env);
success = TRUE;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2015, 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
@ -49,7 +49,7 @@
#include <X11/XKBlib.h>
#if defined(DEBUG) || defined(INTERNAL_BUILD)
#if defined(DEBUG)
static jmethodID lockIsHeldMID = NULL;
static void
@ -2346,4 +2346,3 @@ Java_sun_awt_X11_XlibWrapper_SetBitmapShape
(*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT);
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2015, 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
@ -42,7 +42,7 @@ gboolean gnome_load() {
// we are trying to load the library without a version suffix
vfs_handle = dlopen(JNI_LIB_NAME("gnomevfs-2"), RTLD_LAZY);
if (vfs_handle == NULL) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "can not load libgnomevfs-2.so\n");
#endif
return FALSE;
@ -51,13 +51,13 @@ gboolean gnome_load() {
dlerror(); /* Clear errors */
gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init");
if (gnome_vfs_init == NULL){
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "dlsym( gnome_vfs_init) returned NULL\n");
#endif
return FALSE;
}
if ((errmsg = dlerror()) != NULL) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "can not find symbol gnome_vfs_init %s \n", errmsg);
#endif
return FALSE;
@ -69,7 +69,7 @@ gboolean gnome_load() {
if (gnome_handle == NULL) {
gnome_handle = dlopen(JNI_LIB_NAME("gnome-2"), RTLD_LAZY);
if (gnome_handle == NULL) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "can not load libgnome-2.so\n");
#endif
return FALSE;
@ -78,7 +78,7 @@ gboolean gnome_load() {
dlerror(); /* Clear errors */
gnome_url_show = (GNOME_URL_SHOW_TYPE*)dlsym(gnome_handle, "gnome_url_show");
if ((errmsg = dlerror()) != NULL) {
#ifdef INTERNAL_BUILD
#ifdef DEBUG
fprintf(stderr, "can not find symble gnome_url_show\n");
#endif
return FALSE;

@ -228,7 +228,7 @@ extern JavaVM *jvm;
/*
* checks if the current thread is/isn't the toolkit thread
*/
#if defined(DEBUG) || defined(INTERNAL_BUILD)
#if defined(DEBUG)
#define CHECK_IS_TOOLKIT_THREAD() \
if (GetCurrentThreadId() != AwtToolkit::MainThread()) \
{ JNU_ThrowInternalError(env,"Operation is not permitted on non-toolkit thread!\n"); }