8042440: awt_Plugin no longer needed
authorddehaven
Mon, 05 May 2014 23:21:27 -0700
changeset 24552 deacebd7905a
parent 24551 cccf7dd14729
child 24553 6c9c0f5b07e0
8042440: awt_Plugin no longer needed Reviewed-by: serb, pchelko Contributed-by: David DeHaven <david.dehaven@oracle.com>
jdk/make/lib/Awt2dLibraries.gmk
jdk/make/mapfiles/libawt/mapfile-mawt-vers
jdk/make/mapfiles/libawt/mapfile-vers
jdk/make/mapfiles/libawt/mapfile-vers-linux
jdk/make/mapfiles/libawt_xawt/mapfile-vers
jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c
jdk/src/solaris/native/sun/awt/awt_Plugin.c
jdk/src/solaris/native/sun/awt/awt_Plugin.h
--- a/jdk/make/lib/Awt2dLibraries.gmk	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Mon May 05 23:21:27 2014 -0700
@@ -606,7 +606,6 @@
         debug_mem.c \
         debug_trace.c \
         debug_util.c \
-        awt_Plugin.c \
         gnome_interface.c \
         gtk2_interface.c \
         swing_GTKEngine.c \
--- a/jdk/make/mapfiles/libawt/mapfile-mawt-vers	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/make/mapfiles/libawt/mapfile-mawt-vers	Mon May 05 23:21:27 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2014, 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
@@ -249,11 +249,6 @@
 		Java_sun_awt_motif_XsessionWMcommand;
 		Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# Java Plugin
-		getAwtLockFunctions;
-		getAwtData;
-		getAwtDisplay;
-
 		# libfontmanager entry points
 		AWTIsHeadless;
 		AWTCountFonts;
--- a/jdk/make/mapfiles/libawt/mapfile-vers	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/make/mapfiles/libawt/mapfile-vers	Mon May 05 23:21:27 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2014, 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
@@ -173,13 +173,6 @@
 		Java_sun_awt_motif_XsessionWMcommand;
 		Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# Java Plugin
-                # This is in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently plugin needs this for backward compatability.
-		getAwtLockFunctions;
-		getAwtData;
-		getAwtDisplay;
-
 		# libfontmanager entry points
 		AWTIsHeadless;
 		GrPrim_Sg2dGetCompInfo;
--- a/jdk/make/mapfiles/libawt/mapfile-vers-linux	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/make/mapfiles/libawt/mapfile-vers-linux	Mon May 05 23:21:27 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2014, 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
@@ -152,13 +152,6 @@
                 # Evidently CDE needs this for backward compatability.
 		Java_sun_awt_motif_XsessionWMcommand;
 
-		# Java Plugin
-                # This is in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently plugin needs this for backward compatability.
-		getAwtLockFunctions;
-		getAwtData;
-		getAwtDisplay;
-
 		# libfontmanager entry points
 		AWTIsHeadless;
 		GrPrim_Sg2dGetCompInfo;
@@ -283,11 +276,6 @@
 		# CDE private entry point
 		Java_sun_awt_motif_XsessionWMcommand;
 
-		# Java Plugin
-		getAwtLockFunctions;
-		getAwtData;
-		getAwtDisplay;
-
 		# libfontmanager entry points
 		AWTIsHeadless;
 		AWTCountFonts;
--- a/jdk/make/mapfiles/libawt_xawt/mapfile-vers	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/make/mapfiles/libawt_xawt/mapfile-vers	Mon May 05 23:21:27 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2014, 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
@@ -449,12 +449,6 @@
         awt_Lock;
         awt_GetComponent;
 
-        # Java Plugin
-        # This is in awt_LoadLibrary.c and falls through to libmawt.
-        # Evidently plugin needs this for backward compatability.
-        getAwtLockFunctions;
-        getAwtData;
-        getAwtDisplay;
         #XAWT entry point for CDE
         Java_sun_awt_motif_XsessionWMcommand;
         Java_sun_awt_motif_XsessionWMcommand_New;
--- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Wed May 07 19:47:26 2014 +0400
+++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Mon May 05 23:21:27 2014 -0700
@@ -35,8 +35,6 @@
 #include <sys/param.h>
 #include <sys/utsname.h>
 
-#include "awt_Plugin.h"
-
 #ifdef AIX
 #include "porting_aix.h" /* For the 'dladdr' function. */
 #endif
@@ -236,55 +234,3 @@
 
     (*XsessionWMcommand)(env, jargv);
 }
-
-
-#define REFLECT_VOID_FUNCTION(name, arglist, paramlist)                 \
-typedef void name##_type arglist;                                       \
-void name arglist                                                       \
-{                                                                       \
-    static name##_type *name##_ptr = NULL;                              \
-    if (name##_ptr == NULL && awtHandle == NULL) {                      \
-        return;                                                         \
-    }                                                                   \
-    name##_ptr = (name##_type *)                                        \
-        dlsym(awtHandle, #name);                                        \
-    if (name##_ptr == NULL) {                                           \
-        return;                                                         \
-    }                                                                   \
-    (*name##_ptr)paramlist;                                             \
-}
-
-#define REFLECT_FUNCTION(return_type, name, arglist, paramlist)         \
-typedef return_type name##_type arglist;                                \
-return_type name arglist                                                \
-{                                                                       \
-    static name##_type *name##_ptr = NULL;                              \
-    if (name##_ptr == NULL && awtHandle == NULL) {                      \
-        return NULL;                                                    \
-    }                                                                   \
-    name##_ptr = (name##_type *)                                        \
-        dlsym(awtHandle, #name);                                        \
-    if (name##_ptr == NULL) {                                           \
-        return NULL;                                                    \
-    }                                                                   \
-    return (*name##_ptr)paramlist;                                      \
-}
-
-
-/*
- * These entry point must remain in libawt.so ***for Java Plugin ONLY***
- * Reflect this call over to the correct libawt_<toolkit>.so.
- */
-
-REFLECT_VOID_FUNCTION(getAwtLockFunctions,
-                      (void (**AwtLock)(JNIEnv *), void (**AwtUnlock)(JNIEnv *),
-                       void (**AwtNoFlushUnlock)(JNIEnv *), void *reserved),
-                      (AwtLock, AwtUnlock, AwtNoFlushUnlock, reserved))
-
-REFLECT_VOID_FUNCTION(getAwtData,
-                      (int32_t *awt_depth, Colormap *awt_cmap, Visual **awt_visual,
-                       int32_t *awt_num_colors, void *pReserved),
-                      (awt_depth, awt_cmap, awt_visual,
-                       awt_num_colors, pReserved))
-
-REFLECT_FUNCTION(Display *, getAwtDisplay, (void), ())
--- a/jdk/src/solaris/native/sun/awt/awt_Plugin.c	Wed May 07 19:47:26 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 1999, 2001, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifdef HEADLESS
-    #error This file should not be included in headless library
-#endif
-
-#include <jni.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <awt.h>
-#include <awt_p.h>
-
-/*
- * Fix 4221246: Provide utility function for Netscape to use to
- * get AWT display, depth, colormap, and number of colors.
- *
- */
-
-Display *getAwtDisplay(void)
-{
-  return awt_display;
-}
-
-void getExtAwtData(Display      *display,
-                   int32_t      screen,
-                   int32_t      *awt_depth,
-                   Colormap     *awt_cmap,
-                   Visual       **awt_visual,
-                   int32_t      *awt_num_colors,
-                   void         *pReserved)
-{
-  AwtGraphicsConfigDataPtr defaultConfig = NULL;
-
-#ifdef DEBUG
-  if (pReserved != NULL) {
-    jio_fprintf(stderr,
-                "getExtAwtData: warning: reserved pointer is not null\n");
-  }
-#endif
-
-  if (screen >= 0) {
-    defaultConfig = getDefaultConfig(screen);
-  }
-
-  if (defaultConfig) {
-    if (awt_depth != NULL) {
-      *awt_depth = defaultConfig->awt_depth;
-    }
-
-    if (awt_cmap != NULL) {
-      *awt_cmap = defaultConfig->awt_cmap;
-    }
-
-    if (awt_visual != NULL) {
-      *awt_visual = defaultConfig->awt_visInfo.visual;
-    }
-
-    if (awt_num_colors != NULL) {
-      *awt_num_colors = defaultConfig->awt_num_colors;
-    }
-  }
-}
-
-/*
- * getAwtData provided for compatibility with Solaris 1.2 Java Plug-in
- *
- */
-void getAwtData(int32_t          *awt_depth,
-                Colormap     *awt_cmap,
-                Visual       **awt_visual,
-                int32_t          *awt_num_colors,
-                void         *pReserved)
-{
-  Display *display = getAwtDisplay();
-
-  getExtAwtData(display,
-                DefaultScreen(display),
-                awt_depth,
-                awt_cmap,
-                awt_visual,
-                awt_num_colors,
-                pReserved);
-}
-
-/*
- * Fix 4221246: Provide utility funtion for Netscape to get
- * function pointers to AWT lock functions.
- *
- */
-
-static void awt_lock_wrapper(JNIEnv *env) {
-  AWT_LOCK();
-}
-
-static void awt_unlock_wrapper(JNIEnv *env) {
-  AWT_UNLOCK();
-}
-
-static void awt_noflush_unlock_wrapper(JNIEnv *env) {
-  AWT_NOFLUSH_UNLOCK();
-}
-
-void getAwtLockFunctions(void (**AwtLock)(JNIEnv *),
-                         void (**AwtUnlock)(JNIEnv *),
-                         void (**AwtNoFlushUnlock)(JNIEnv *),
-                         void *pReserved)
-{
-#ifdef DEBUG
-  if (pReserved != NULL) {
-    jio_fprintf(stderr,
-                "getAwtLockFunctions: warning: reserved pointer is not null\n");
-  }
-#endif
-
-  if (AwtLock != NULL) {
-    *AwtLock = awt_lock_wrapper;
-  }
-
-  if (AwtUnlock != NULL) {
-    *AwtUnlock = awt_unlock_wrapper;
-  }
-
-  if (AwtNoFlushUnlock != NULL) {
-    *AwtNoFlushUnlock = awt_noflush_unlock_wrapper;
-  }
-}
--- a/jdk/src/solaris/native/sun/awt/awt_Plugin.h	Wed May 07 19:47:26 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999, 2001, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Fix 4221246: Export functions for Netscape to use to get AWT info
- */
-
-#ifndef _AWT_PLUGIN_H_
-#define _AWT_PLUGIN_H_
-
-#include <jni.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-void getAwtLockFunctions(void (**AwtLock)(JNIEnv *),
-                         void (**AwtUnlock)(JNIEnv *),
-                         void (**AwtNoFlushUnlock)(JNIEnv *),
-                         void *);
-
-void getExtAwtData(Display *,
-                   int32_t,
-                   int32_t *,      /* awt_depth */
-                   Colormap *,     /* awt_cmap  */
-                   Visual **,      /* awt_visInfo.visual */
-                   int32_t *,      /* awt_num_colors */
-                   void *);
-
-void getAwtData(int32_t *, Colormap *, Visual **, int32_t *, void *);
-
-Display *getAwtDisplay(void);
-
-#endif /* _AWT_PLUGIN_H_ */