8075717: Replace INTERNAL_BUILD with DEBUG in awt
authorihse
Tue, 24 Mar 2015 10:52:08 +0100
changeset 29734 1a77512b0417
parent 29733 70809c7bf9e5
child 29735 fa2eceb2988e
8075717: Replace INTERNAL_BUILD with DEBUG in awt Reviewed-by: serb, azvegint
jdk/make/lib/Awt2dLibraries.gmk
jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c
jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c
jdk/src/java.desktop/unix/native/libawt_xawt/xawt/gnome_interface.c
jdk/src/java.desktop/windows/native/libawt/windows/awt.h
--- a/jdk/make/lib/Awt2dLibraries.gmk	Mon Mar 23 11:19:41 2015 +0300
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Tue Mar 24 10:52:08 2015 +0100
@@ -236,10 +236,6 @@
   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 @@
       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)
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Mon Mar 23 11:19:41 2015 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Tue Mar 24 10:52:08 2015 +0100
@@ -368,9 +368,9 @@
     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 @@
             }
         }
     } 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 @@
      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;
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c	Mon Mar 23 11:19:41 2015 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c	Tue Mar 24 10:52:08 2015 +0100
@@ -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 @@
 
     (*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT);
 }
-
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/gnome_interface.c	Mon Mar 23 11:19:41 2015 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/xawt/gnome_interface.c	Tue Mar 24 10:52:08 2015 +0100
@@ -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 @@
          // 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 @@
      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 @@
      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 @@
      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;
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt.h	Mon Mar 23 11:19:41 2015 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt.h	Tue Mar 24 10:52:08 2015 +0100
@@ -228,7 +228,7 @@
 /*
  * 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"); }