Changeset 263 for trunk/openjdk


Ignore:
Timestamp:
Feb 21, 2011, 12:02:20 AM (14 years ago)
Author:
dmik
Message:

make: Global DLL rename by adding the 'j' prefix to avoid possible conflicts with system DLLs (#52)

Location:
trunk/openjdk
Files:
77 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/hotspot/src/os/windows/vm/hpi_windows.cpp

    r2 r263  
    2626# include "incls/_hpi_windows.cpp.incl"
    2727
     28#ifdef __WIN32OS2__   
     29# define HPI_LIBNAME "jhpi"
     30#else
     31# define HPI_LIBNAME "hpi"
     32#endif
     33
    2834typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *);
    2935
     
    4046
    4147#ifdef PRODUCT
    42     const char *hpi_lib = "\\hpi.dll";
     48    const char *hpi_lib = "\\" HPI_LIBNAME ".dll";
    4349#else
    4450    char *ptr = strrchr(lib_name, '\\');
    4551    //  On Win98 GetModuleFileName() returns the path in the upper case.
    4652    assert(_strnicmp(ptr, "\\jvm",4) == 0, "invalid library name");
    47     const char *hpi_lib = (_strnicmp(ptr, "\\jvm_g",6) == 0) ? "\\hpi_g.dll" : "\\hpi.dll";
     53    const char *hpi_lib = (_strnicmp(ptr, "\\jvm_g",6) == 0) ?
     54        "\\" HPI_LIBNAME "_g.dll" : "\\" HPI_LIBNAME ".dll";
    4855#endif
    4956
  • trunk/openjdk/hotspot/src/share/vm/classfile/classLoader.cpp

    r2 r263  
    560560  char path[JVM_MAXPATHLEN];
    561561  char ebuf[1024];
     562#ifdef __WIN32OS2__ 
     563  hpi::dll_build_name(path, sizeof(path), Arguments::get_dll_dir(), "jzip");
     564#else 
    562565  hpi::dll_build_name(path, sizeof(path), Arguments::get_dll_dir(), "zip");
     566#endif
    563567  void* handle = hpi::dll_load(path, ebuf, sizeof ebuf);
    564568  if (handle == NULL) {
  • trunk/openjdk/hotspot/src/share/vm/runtime/arguments.cpp

    r2 r263  
    18881888        }
    18891889#ifdef JVMTI_KERNEL
    1890         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
     1890        if (
     1891#ifdef __WIN32OS2__
     1892            (strcmp(name, "jhprof") == 0) ||
     1893#else
     1894            (strcmp(name, "hprof") == 0) ||
     1895#endif
     1896            (strcmp(name, "jdwp") == 0)) {
    18911897          warning("profiling and debugging agents are not supported with Kernel VM");
    18921898        } else
     
    19081914        }
    19091915#ifdef JVMTI_KERNEL
    1910         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
     1916        if (
     1917#ifdef __WIN32OS2__
     1918            (strcmp(name, "jhprof") == 0) ||
     1919#else
     1920            (strcmp(name, "hprof") == 0) ||
     1921#endif
     1922            (strcmp(name, "jdwp") == 0)) {
    19111923          warning("profiling and debugging agents are not supported with Kernel VM");
    19121924        } else
  • trunk/openjdk/hotspot/src/share/vm/runtime/os.cpp

    r2 r263  
    339339    // always able to find it when the loading executable is outside the JDK.
    340340    // In order to keep working with 1.2 we ignore any loading errors.
     341#if __WIN32OS2__   
     342    dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "jverify");
     343#else   
    341344    dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "verify");
     345#endif   
    342346    dll_load(buffer, ebuf, sizeof(ebuf));
    343347
  • trunk/openjdk/jdk/make/com/sun/java/pack/Makefile

    r2 r263  
    3333PRODUCT = sun
    3434PGRM = unpack200
     35
     36ifeq ($(PLATFORM), os2)
     37LIBRARY_SHORT = junpack
     38endif
     39
    3540include $(BUILDDIR)/common/Defs.gmk
    3641
  • trunk/openjdk/jdk/make/java/hpi/windows/Makefile

    r222 r263  
    3333LIB_LOCATION = $(BINDIR)
    3434
     35ifeq ($(PLATFORM), os2)
     36LIBRARY_SHORT = jhpi
     37endif
     38
    3539include $(BUILDDIR)/common/Defs.gmk
    3640
     
    6670DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    6771$(DEF_FILE): $(MAKEFILE_LIST)
    68         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     72        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    6973        @$(ECHO) 'EXPORTS \n \
    7074  DLL_Initialize = "_DLL_Initialize@8" \n \
  • trunk/openjdk/jdk/make/java/instrument/Makefile

    r222 r263  
    3232PRODUCT = sun
    3333
    34 LIBRARY_SHORT = instrmnt
     34ifeq ($(PLATFORM), os2)
     35LIBRARY_SHORT = jinstr
     36endif
    3537
    3638# Configure the CFLAGS for this library.  Use static binding so that there
     
    126128DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    127129$(DEF_FILE): $(MAKEFILE_LIST)
    128         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     130        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    129131        @$(ECHO) 'EXPORTS \n \
    130132  Agent_OnAttach = "_Agent_OnAttach@12" \n \
  • trunk/openjdk/jdk/make/java/java/Makefile

    r222 r263  
    5555
    5656$(DEF_FILE): $(MAKEFILE_LIST)
    57         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     57        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    5858        @$(ECHO) 'EXPORTS \n \
    5959  Canonicalize = _Canonicalize \n \
  • trunk/openjdk/jdk/make/java/java_crw_demo/Makefile

    r203 r263  
    2929LIBRARY_OUTPUT = java_crw_demo
    3030
     31ifeq ($(PLATFORM), os2)
    3132LIBRARY_SHORT = javacrwd
     33endif
    3234
    3335# Configure the CFLAGS for this library.
  • trunk/openjdk/jdk/make/java/java_hprof_demo/Makefile

    r99 r263  
    2828PRODUCT = sun
    2929LIBRARY_OUTPUT = hprof_jvmti
     30
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jhprof
     33endif
    3034
    3135# Configure the CFLAGS for this library.
  • trunk/openjdk/jdk/make/java/jli/Makefile

    r222 r263  
    105105DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    106106$(DEF_FILE): $(MAKEFILE_LIST)
    107         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     107        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    108108        @$(ECHO) 'EXPORTS \n \
    109109  _JLI_ParseManifest \n \
  • trunk/openjdk/jdk/make/java/management/Makefile

    r203 r263  
    2929PRODUCT = java
    3030
    31 LIBRARY_SHORT = mngemnt
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jmngmnt
     33endif
    3234
    3335include $(BUILDDIR)/common/Defs.gmk
  • trunk/openjdk/jdk/make/java/net/Makefile

    r101 r263  
    2828LIBRARY = net
    2929PRODUCT = sun
     30
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jnet
     33endif
     34
    3035include $(BUILDDIR)/common/Defs.gmk
    3136
  • trunk/openjdk/jdk/make/java/nio/Makefile

    r104 r263  
    3333PRODUCT = java
    3434OTHER_JAVACFLAGS += -Xmaxwarns 1000 -Xlint:serial -Werror
     35
     36ifeq ($(PLATFORM), os2)
     37LIBRARY_SHORT = jnio
     38endif
     39
    3540include $(BUILDDIR)/common/Defs.gmk
    3641
  • trunk/openjdk/jdk/make/java/npt/Makefile

    r222 r263  
    2828PRODUCT = sun
    2929LIBRARY_OUTPUT = npt
     30
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jnpt
     33endif
    3034
    3135# Configure the CFLAGS for this library.
     
    7175DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    7276$(DEF_FILE): $(MAKEFILE_LIST)
    73         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     77        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    7478        @$(ECHO) 'EXPORTS \n \
    7579  nptInitialize = "_nptInitialize@12" \n \
  • trunk/openjdk/jdk/make/java/verify/Makefile

    r2 r263  
    3232LIBRARY = verify
    3333include $(BUILDDIR)/common/Defs.gmk
     34
     35ifeq ($(PLATFORM), os2)
     36LIBRARY_SHORT = jverify
     37endif
    3438
    3539#
  • trunk/openjdk/jdk/make/java/zip/Makefile

    r222 r263  
    2929LIBRARY = zip
    3030PRODUCT = sun
     31
     32ifeq ($(PLATFORM), os2)
     33LIBRARY_SHORT = jzip
     34endif
     35
    3136include $(BUILDDIR)/common/Defs.gmk
    3237
     
    7378DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    7479$(DEF_FILE): $(MAKEFILE_LIST)
    75         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     80        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    7681        @$(ECHO) 'EXPORTS \n \
    7782  ZIP_CRC32 = _ZIP_CRC32 \n \
  • trunk/openjdk/jdk/make/jpda/transport/shmem/Makefile

    r250 r263  
    3131LIBRARY  = dt_shmem
    3232PRODUCT = jbug
     33
     34ifeq ($(PLATFORM), os2)
     35LIBRARY_SHORT = jdtshmem
     36endif
    3337
    3438# Mapfile only used on Solaris/Linux
     
    7983DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    8084$(DEF_FILE): $(MAKEFILE_LIST)
    81         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     85        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    8286        @$(ECHO) 'EXPORTS \n \
    8387  jdwpTransport_OnLoad = "_jdwpTransport_OnLoad@16" \n \
  • trunk/openjdk/jdk/make/jpda/transport/socket/Makefile

    r249 r263  
    3030BUILDDIR = ../../..
    3131LIBRARY = dt_socket
    32 LIBRARY_SHORT = dt_sock
    3332PRODUCT = jbug
     33
     34ifeq ($(PLATFORM), os2)
     35LIBRARY_SHORT = jdtsock
     36endif
    3437
    3538# Mapfile only used on Solaris/Linux
     
    9497DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    9598$(DEF_FILE): $(MAKEFILE_LIST)
    96         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     99        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    97100        @$(ECHO) 'EXPORTS \n \
    98101  jdwpTransport_OnLoad = "_jdwpTransport_OnLoad@16" \n \
  • trunk/openjdk/jdk/make/mkdemo/jvmti/hprof/Makefile

    r232 r263  
    2929include $(BUILDDIR)/common/Defs.gmk
    3030
     31ifeq ($(PLATFORM), os2)
     32DEMONAME_SHORT = jhprof
     33endif
     34
    3135DEMO_ROOT       = $(SHARE_SRC)/demo/jvmti/$(DEMONAME)
    3236DEMO_TOPFILES   = ./README.txt
  • trunk/openjdk/jdk/make/sun/awt/Makefile

    r234 r263  
    2828LIBRARY = awt
    2929PRODUCT = sun
     30
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jawtos2
     33endif
    3034
    3135#
  • trunk/openjdk/jdk/make/sun/cmm/lcms/Makefile

    r208 r263  
    2828LIBRARY = lcms
    2929PRODUCT = sun
     30
     31ifeq ($(PLATFORM), os2)
     32LIBRARY_SHORT = jlcms
     33endif
    3034
    3135include $(BUILDDIR)/common/Defs.gmk
  • trunk/openjdk/jdk/make/sun/font/Makefile

    r213 r263  
    3333PRODUCT = sun
    3434
    35 LIBRARY_SHORT = fontmgr
     35ifeq ($(PLATFORM), os2)
     36LIBRARY_SHORT = jfontmgr
     37endif
    3638
    3739# Indicate we want the C++ compiler to do the linking.
  • trunk/openjdk/jdk/make/sun/image/generic/Makefile

    r257 r263  
    3333PRODUCT = sun
    3434
    35 LIBRARY_SHORT = mlibimg
     35ifeq ($(PLATFORM), os2)
     36LIBRARY_SHORT = jmlibimg
     37endif
    3638
    3739include $(BUILDDIR)/common/Defs.gmk
     
    5860DEF_FILE = $(OBJDIR)/$(LIBRARY).def
    5961$(DEF_FILE): $(MAKEFILE_LIST)
    60         @$(ECHO) "LIBRARY $(LIBRARY) INITINSTANCE TERMINSTANCE" > $@
     62        @$(ECHO) "LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE" > $@
    6163        @$(ECHO) 'EXPORTS \n \
    6264  j2d_mlib_ImageConvMxN = _j2d_mlib_ImageConvMxN \n \
  • trunk/openjdk/jdk/make/sun/jpeg/Makefile

    r2 r263  
    2929PRODUCT = sun
    3030include $(BUILDDIR)/common/Defs.gmk
     31
     32ifeq ($(PLATFORM), os2)
     33LIBRARY_SHORT = jjpeg
     34endif
    3135
    3236#
  • trunk/openjdk/jdk/make/sun/rmi/rmi/Makefile

    r74 r263  
    3232PRODUCT = sun
    3333LIBRARY = rmi
     34
     35ifeq ($(PLATFORM), os2)
     36LIBRARY = jrmi
     37endif
     38
    3439include $(BUILDDIR)/common/Defs.gmk
    3540
  • trunk/openjdk/jdk/make/sun/security/mscapi/Makefile

    r203 r263  
    9494PRODUCT = sun
    9595
    96 LIBRARY_SHORT = smscapi
     96ifeq ($(PLATFORM), os2)
     97LIBRARY_SHORT = jsmscapi
     98endif
    9799
    98100#
  • trunk/openjdk/jdk/make/sun/splashscreen/Makefile

    r208 r263  
    3030include $(BUILDDIR)/common/Defs.gmk
    3131
    32 LIBRARY_SHORT = splshscr
     32ifeq ($(PLATFORM), os2)
     33LIBRARY_SHORT = jsplash
     34endif
    3335
    3436#
  • trunk/openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java

    r2 r263  
    8585
    8686    static {
     87        boolean isOS2 = java.security.AccessController.doPrivileged(
     88            new sun.security.action.GetPropertyAction("os.name")).
     89                startsWith("OS/2");
    8790        java.security.AccessController.doPrivileged(
    88             new sun.security.action.LoadLibraryAction("jpeg"));
     91            new sun.security.action.LoadLibraryAction(isOS2 ? "jjpeg"
     92                                                            : "jpeg"));
    8993        initReaderIDs(ImageInputStream.class,
    9094                      JPEGQTable.class,
  • trunk/openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java

    r2 r263  
    6868        }
    6969        try {
     70            boolean isOS2 = java.security.AccessController.doPrivileged(
     71                new sun.security.action.GetPropertyAction("os.name")).
     72                    startsWith("OS/2");
    7073            java.security.AccessController.doPrivileged(
    71                 new sun.security.action.LoadLibraryAction("jpeg"));
     74                new sun.security.action.LoadLibraryAction(isOS2 ? "jjpeg"
     75                                                                : "jpeg"));
    7276            // Stuff it all into one lib for first pass
    7377            //java.security.AccessController.doPrivileged(
  • trunk/openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java

    r2 r263  
    177177
    178178    static {
     179        boolean isOS2 = java.security.AccessController.doPrivileged(
     180            new sun.security.action.GetPropertyAction("os.name")).
     181                startsWith("OS/2");
    179182        java.security.AccessController.doPrivileged(
    180             new sun.security.action.LoadLibraryAction("jpeg"));
     183            new sun.security.action.LoadLibraryAction(isOS2 ? "jjpeg"
     184                                                            : "jpeg"));
    181185        initWriterIDs(ImageOutputStream.class,
    182186                      JPEGQTable.class,
  • trunk/openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java

    r2 r263  
    7676        }
    7777        try {
     78            boolean isOS2 = java.security.AccessController.doPrivileged(
     79                new sun.security.action.GetPropertyAction("os.name")).
     80                    startsWith("OS/2");
    7881            java.security.AccessController.doPrivileged(
    79                 new sun.security.action.LoadLibraryAction("jpeg"));
     82                new sun.security.action.LoadLibraryAction(isOS2 ? "jjpeg"
     83                                                                : "jpeg"));
    8084        } catch (Throwable e) { // Fail on any Throwable
    8185            // if it can't be loaded, deregister and return
  • trunk/openjdk/jdk/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java

    r2 r263  
    8484        // If loading from stand alone build uncomment this.
    8585        // System.loadLibrary("unpack");
     86        boolean isOS2 = java.security.AccessController.doPrivileged(
     87            new sun.security.action.GetPropertyAction("os.name")).
     88                startsWith("OS/2");
    8689        java.security.AccessController.doPrivileged(
    87                 new sun.security.action.LoadLibraryAction("unpack"));
     90            new sun.security.action.LoadLibraryAction(isOS2 ? "junpack"
     91                                                            : "unpack"));
    8892        initIDs();
    8993    }
  • trunk/openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java

    r256 r263  
    172172    }
    173173
    174     private static final boolean isOS2 = AccessController
    175         .doPrivileged(new PrivilegedAction<Boolean>() {
    176             public Boolean run() {
    177                 return System.getProperty("os.name").startsWith("OS/2");
    178             }
    179         });
     174    private static final boolean isOS2 = AccessController.doPrivileged(
     175        new sun.security.action.GetPropertyAction("os.name")).startsWith("OS/2");
    180176
    181177    protected static final String INFO_NAME = "Gervill";
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java

    r2 r263  
    776776                continue;
    777777            }
    778             if ("dt_shmem".equals(connector.transport().name())) {
     778            final String shmemLib =
     779                System.getProperty("os.name").startsWith("OS/2") ? "jdtshmem"
     780                                                                 : "dt_shmem";
     781            if (shmemLib.equals(connector.transport().name())) {
    779782                return true;
    780783            }
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/jdi/ProcessAttachingConnector.java

    r249 r263  
    123123
    124124        TransportService ts = null;
    125         final String sockLib = System.getProperty("os.name").startsWith("OS/2") ? "dt_sock" : "dt_socket";
     125        final String sockLib = System.getProperty("os.name").startsWith("OS/2") ? "jdtsock" : "dt_socket";
    126126        if (lib.equals(sockLib)) {
    127127            ts = new SocketTransportService();
    128128        } else {
    129             if (lib.equals("dt_shmem")) {
     129            final String shmemLib = System.getProperty("os.name").startsWith("OS/2") ? "jdtshmem" : "dt_shmem";
     130            if (lib.equals(shmemLib)) {
    130131                try {
    131132                    Class c = Class.forName("com.sun.tools.jdi.SharedMemoryTransportService");
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/jdi/RawCommandLineLauncher.java

    r249 r263  
    5858            transport = new Transport() {
    5959                public String name() {
     60                    if (System.getProperty("os.name").startsWith("OS/2"))
     61                        return "jdtshmem";
    6062                    return "dt_shmem";
    6163                }
     
    7274                public String name() {
    7375                    if (System.getProperty("os.name").startsWith("OS/2"))
    74                         return "dt_sock";
     76                        return "jdtsock";
    7577                    return "dt_socket";
    7678                }
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java

    r249 r263  
    7070            public String name() {
    7171                if (System.getProperty("os.name").startsWith("OS/2"))
    72                     return "dt_sock";
     72                    return "jdtsock";
    7373                return "dt_socket";     // for compatability reasons
    7474            }
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/jdi/SocketListeningConnector.java

    r249 r263  
    6060            public String name() {
    6161                if (System.getProperty("os.name").startsWith("OS/2"))
    62                     return "dt_sock";
     62                    return "jdtsock";
    6363                return "dt_socket";     // for compatability reasons
    6464            }
  • trunk/openjdk/jdk/src/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java

    r249 r263  
    6969            transport = new Transport() {
    7070                public String name() {
     71                    if (System.getProperty("os.name").startsWith("OS/2"))
     72                        return "jdtshmem";
    7173                    return "dt_shmem";
    7274                }
     
    8385                public String name() {
    8486                    if (System.getProperty("os.name").startsWith("OS/2"))
    85                         return "dt_sock";
     87                        return "jdtsock";
    8688                    return "dt_socket";
    8789                }
  • trunk/openjdk/jdk/src/share/classes/java/awt/SplashScreen.java

    r208 r263  
    109109            // SplashScreen class is now a singleton
    110110            if (!wasClosed && theInstance == null) {
    111                 if (System.getProperty("os.name").startsWith("OS/2")) {
    112                     java.security.AccessController.doPrivileged(
    113                         new sun.security.action.LoadLibraryAction("splshscr"));
    114                 } else {
    115                     java.security.AccessController.doPrivileged(
    116                         new sun.security.action.LoadLibraryAction("splashscreen"));
    117                 }
     111                boolean isOS2 = java.security.AccessController.doPrivileged(
     112                    new sun.security.action.GetPropertyAction("os.name")).
     113                        startsWith("OS/2");
     114                java.security.AccessController.doPrivileged(
     115                    new sun.security.action.LoadLibraryAction(isOS2 ? "jsplash"
     116                                                                    : "splashscreen"));
    118117                long ptr = _getInstance();
    119118                if (ptr != 0 && _isVisible(ptr)) {
  • trunk/openjdk/jdk/src/share/classes/java/awt/Toolkit.java

    r2 r263  
    16081608    static void loadLibraries() {
    16091609        if (!loaded) {
     1610            boolean isOS2 = java.security.AccessController.doPrivileged(
     1611                new sun.security.action.GetPropertyAction("os.name")).
     1612                    startsWith("OS/2");
    16101613            java.security.AccessController.doPrivileged(
    1611                           new sun.security.action.LoadLibraryAction("awt"));
     1614                new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     1615                                                                : "awt"));
    16121616            loaded = true;
    16131617        }
  • trunk/openjdk/jdk/src/share/classes/java/awt/event/NativeLibLoader.java

    r2 r263  
    5454     */
    5555    static void loadLibraries() {
     56        boolean isOS2 = java.security.AccessController.doPrivileged(
     57            new sun.security.action.GetPropertyAction("os.name")).
     58                startsWith("OS/2");
    5659        java.security.AccessController.doPrivileged(
    57                 new sun.security.action.LoadLibraryAction("awt"));
     60            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     61                                                            : "awt"));
    5862    }
    5963}
  • trunk/openjdk/jdk/src/share/classes/java/awt/image/ColorModel.java

    r2 r263  
    204204    static void loadLibraries() {
    205205        if (!loaded) {
     206            boolean isOS2 = java.security.AccessController.doPrivileged(
     207                new sun.security.action.GetPropertyAction("os.name")).
     208                    startsWith("OS/2");
    206209            java.security.AccessController.doPrivileged(
    207                   new sun.security.action.LoadLibraryAction("awt"));
     210                new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     211                                                                : "awt"));
    208212            loaded = true;
    209213        }
  • trunk/openjdk/jdk/src/share/classes/java/lang/System.java

    r2 r263  
    10981098        // Load the zip library now in order to keep java.util.zip.ZipFile
    10991099        // from trying to use itself to load this library later.
    1100         loadLibrary("zip");
     1100        loadLibrary(getProperty("os.name").startsWith("OS/2") ? "jzip" : "zip");
    11011101
    11021102        // Setup Java signal handlers for HUP, TERM, and INT (where available).
  • trunk/openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java

    r2 r263  
    5858     */
    5959    static {
     60        boolean isOS2 = java.security.AccessController.doPrivileged(
     61            new sun.security.action.GetPropertyAction("os.name")).
     62                startsWith("OS/2");
    6063        java.security.AccessController.doPrivileged(
    61                   new sun.security.action.LoadLibraryAction("net"));
     64            new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     65                                                            : "net"));
    6266    }
    6367
  • trunk/openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java

    r2 r263  
    7474     */
    7575    static {
     76        boolean isOS2 = java.security.AccessController.doPrivileged(
     77            new sun.security.action.GetPropertyAction("os.name")).
     78                startsWith("OS/2");
    7679        java.security.AccessController.doPrivileged(
    77                   new sun.security.action.LoadLibraryAction("net"));
     80            new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     81                                                            : "net"));
    7882    }
    7983
  • trunk/openjdk/jdk/src/share/classes/java/net/DatagramPacket.java

    r2 r263  
    4747     */
    4848    static {
     49        boolean isOS2 = java.security.AccessController.doPrivileged(
     50            new sun.security.action.GetPropertyAction("os.name")).
     51                startsWith("OS/2");
    4952        java.security.AccessController.doPrivileged(
    50                   new sun.security.action.LoadLibraryAction("net"));
     53            new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     54                                                            : "net"));
    5155        init();
    5256    }
  • trunk/openjdk/jdk/src/share/classes/java/net/InetAddress.java

    r2 r263  
    232232        preferIPv6Address = java.security.AccessController.doPrivileged(
    233233            new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
    234         AccessController.doPrivileged(new LoadLibraryAction("net"));
     234        boolean isOS2 = java.security.AccessController.doPrivileged(
     235            new GetPropertyAction("os.name")).startsWith("OS/2");
     236        AccessController.doPrivileged(new LoadLibraryAction(isOS2 ? "jnet"
     237                                                                  : "net"));
    235238        init();
    236239    }
  • trunk/openjdk/jdk/src/share/classes/java/net/NetworkInterface.java

    r2 r263  
    5353
    5454    static {
    55         AccessController.doPrivileged(new LoadLibraryAction("net"));
     55        boolean isOS2 = java.security.AccessController.doPrivileged(
     56            new GetPropertyAction("os.name")).startsWith("OS/2");
     57        AccessController.doPrivileged(new LoadLibraryAction(isOS2 ? "jnet"
     58                                                                  : "net"));
    5659        init();
    5760    }
  • trunk/openjdk/jdk/src/share/classes/sun/awt/NativeLibLoader.java

    r2 r263  
    5454     */
    5555    static void loadLibraries() {
     56        boolean isOS2 = java.security.AccessController.doPrivileged(
     57            new sun.security.action.GetPropertyAction("os.name")).
     58                startsWith("OS/2");
    5659        java.security.AccessController.doPrivileged(
    57             new sun.security.action.LoadLibraryAction("awt"));
     60            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     61                                                            : "awt"));
    5862    }
    5963}
  • trunk/openjdk/jdk/src/share/classes/sun/awt/image/ImagingLib.java

    r203 r263  
    9898                        try {
    9999                            if (System.getProperty("os.name").startsWith("OS/2")) {
    100                                 System.loadLibrary("mlibimg");
     100                                System.loadLibrary("jmlibimg");
    101101                            } else {
    102102                                System.loadLibrary("mlib_image");
  • trunk/openjdk/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java

    r2 r263  
    5454
    5555    static {
     56        boolean isOS2 = java.security.AccessController.doPrivileged(
     57            new sun.security.action.GetPropertyAction("os.name")).
     58                startsWith("OS/2");
    5659        java.security.AccessController.doPrivileged(
    57                   new sun.security.action.LoadLibraryAction("jpeg"));
     60            new sun.security.action.LoadLibraryAction(isOS2 ? "jjpeg"
     61                                                            : "jpeg"));
    5862        initIDs(InputStreamClass);
    5963        RGBcolormodel = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
  • trunk/openjdk/jdk/src/share/classes/sun/awt/image/NativeLibLoader.java

    r2 r263  
    5454     */
    5555    static void loadLibraries() {
    56         java.security.AccessController.doPrivileged
    57                 (new sun.security.action.LoadLibraryAction("awt"));
     56        boolean isOS2 = java.security.AccessController.doPrivileged(
     57            new sun.security.action.GetPropertyAction("os.name")).
     58                startsWith("OS/2");
     59        java.security.AccessController.doPrivileged(
     60            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     61                                                            : "awt"));
    5862    }
    5963}
  • trunk/openjdk/jdk/src/share/classes/sun/font/FontManagerNativeLibrary.java

    r202 r263  
    3434            public Object run() {
    3535               /* REMIND do we really have to load awt here? */
    36                System.loadLibrary("awt");
     36               if (System.getProperty("os.name").startsWith("OS/2")) {
     37                   System.loadLibrary("jawtos2");
     38               } else {
     39                   System.loadLibrary("awt");
     40               }
    3741               if (SunGraphicsEnvironment.isOpenJDK() &&
    3842                   System.getProperty("os.name").startsWith("Windows")) {
     
    6064               }
    6165               if (System.getProperty("os.name").startsWith("OS/2")) {
    62                    System.loadLibrary("fontmgr");
     66                   System.loadLibrary("jfontmgr");
    6367               } else {
    6468                   System.loadLibrary("fontmanager");
  • trunk/openjdk/jdk/src/share/classes/sun/instrument/InstrumentationImpl.java

    r203 r263  
    273273    static {
    274274        if (System.getProperty("os.name").startsWith("OS/2")) {
    275             System.loadLibrary("instrmnt");
     275            System.loadLibrary("jinstr");
    276276        } else {
    277277            System.loadLibrary("instrument");
  • trunk/openjdk/jdk/src/share/classes/sun/java2d/Disposer.java

    r2 r263  
    5656
    5757    static {
     58        boolean isOS2 = java.security.AccessController.doPrivileged(
     59            new sun.security.action.GetPropertyAction("os.name")).
     60                startsWith("OS/2");
    5861        java.security.AccessController.doPrivileged(
    59             new sun.security.action.LoadLibraryAction("awt"));
     62            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     63                                                            : "awt"));
    6064        initIDs();
    6165        String type = (String) java.security.AccessController.doPrivileged(
  • trunk/openjdk/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java

    r2 r263  
    9292                     * disposer frameworks
    9393                     */
    94                     System.loadLibrary("awt");
    95                     System.loadLibrary("lcms");
     94                    if (System.getProperty("os.name").startsWith("OS/2")) {
     95                        System.loadLibrary("jawtos2");
     96                        System.loadLibrary("jlcms");
     97                    } else {
     98                        System.loadLibrary("awt");
     99                        System.loadLibrary("lcms");
     100                    }
    96101                    return null;
    97102                }
  • trunk/openjdk/jdk/src/share/classes/sun/management/ManagementFactory.java

    r203 r263  
    4949import java.security.PrivilegedExceptionAction;
    5050import sun.security.action.LoadLibraryAction;
     51import sun.security.action.GetPropertyAction;
    5152
    5253import java.util.ArrayList;
     
    483484
    484485    static {
    485         if (System.getProperty("os.name").startsWith("OS/2")) {
    486             AccessController.doPrivileged(new LoadLibraryAction("mngemnt"));
    487         } else {
    488             AccessController.doPrivileged(new LoadLibraryAction("management"));
    489         }
     486        boolean isOS2 = AccessController.doPrivileged(
     487            new GetPropertyAction("os.name")).startsWith("OS/2");
     488        AccessController.doPrivileged(new LoadLibraryAction(isOS2 ? "jmngmnt"
     489                                                                  : "management"));
    490490        jvm = new VMManagementImpl();
    491491    }
  • trunk/openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java

    r2 r263  
    8989                }});
    9090        if (b != null && b.booleanValue()) {
     91            boolean isOS2 = java.security.AccessController.doPrivileged(
     92                new sun.security.action.GetPropertyAction("os.name")).
     93                    startsWith("OS/2");
    9194            java.security.AccessController.doPrivileged(
    92                       new sun.security.action.LoadLibraryAction("net"));
     95                new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     96                                                                : "net"));
    9397            hasSystemProxies = init();
    9498        }
  • trunk/openjdk/jdk/src/share/classes/sun/nio/ch/Util.java

    r2 r263  
    354354                return;
    355355            loaded = true;
    356             java.security.AccessController
    357                 .doPrivileged(new sun.security.action.LoadLibraryAction("net"));
    358             java.security.AccessController
    359                 .doPrivileged(new sun.security.action.LoadLibraryAction("nio"));
     356            boolean isOS2 = java.security.AccessController.doPrivileged(
     357                new sun.security.action.GetPropertyAction("os.name")).
     358                    startsWith("OS/2");
     359            java.security.AccessController.doPrivileged(
     360                new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     361                                                                : "net"));
     362            java.security.AccessController.doPrivileged(
     363                new sun.security.action.LoadLibraryAction(isOS2 ? "jnio"
     364                                                                : "nio"));
    360365            // IOUtil must be initialized; Its native methods are called from
    361366            // other places in native nio code so they must be set up.
  • trunk/openjdk/jdk/src/share/classes/sun/rmi/server/MarshalInputStream.java

    r2 r263  
    112112     */
    113113    static {
     114        boolean isOS2 = java.security.AccessController.doPrivileged(
     115            new sun.security.action.GetPropertyAction("os.name")).
     116                startsWith("OS/2");
    114117        java.security.AccessController.doPrivileged(
    115             new sun.security.action.LoadLibraryAction("rmi"));
     118            new sun.security.action.LoadLibraryAction(isOS2 ? "jrmi"
     119                                                            : "rmi"));
    116120    }
    117121
  • trunk/openjdk/jdk/src/share/classes/sun/tools/attach/HotSpotVirtualMachine.java

    r203 r263  
    102102        try {
    103103            if (System.getProperty("os.name").startsWith("OS/2")) {
    104                 loadAgentLibrary("instrmnt", args);
     104                loadAgentLibrary("jinstr", args);
    105105            } else {
    106106                loadAgentLibrary("instrument", args);
  • trunk/openjdk/jdk/src/share/demo/jvmti/hprof/hprof.h

    r2 r263  
    7878/* How the options get to OnLoad: */
    7979
     80#ifdef __WIN32OS2__
     81#define AGENTNAME               "jhprof"
     82#else
    8083#define AGENTNAME               "hprof"
     84#endif
     85
    8186#define XRUN                    "-Xrun" AGENTNAME
    8287#define AGENTLIB                "-agentlib:" AGENTNAME
  • trunk/openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java

    r2 r263  
    244244
    245245    static {
     246        boolean isOS2 = java.security.AccessController.doPrivileged(
     247            new sun.security.action.GetPropertyAction("os.name")).
     248                startsWith("OS/2");
    246249        java.security.AccessController.doPrivileged(
    247             new sun.security.action.LoadLibraryAction("net"));
     250            new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     251                                                            : "net"));
    248252    }
    249253
  • trunk/openjdk/jdk/src/solaris/classes/sun/print/CUPSPrinter.java

    r2 r263  
    7777    static {
    7878        // load awt library to access native code
     79        boolean isOS2 = java.security.AccessController.doPrivileged(
     80            new sun.security.action.GetPropertyAction("os.name")).
     81                startsWith("OS/2");
    7982        java.security.AccessController.doPrivileged(
    80             new sun.security.action.LoadLibraryAction("awt"));
     83            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     84                                                            : "awt"));
    8185        libFound = initIDs();
    8286        if (libFound) {
  • trunk/openjdk/jdk/src/windows/classes/com/sun/tools/jdi/SharedMemoryAttachingConnector.java

    r2 r263  
    5151        transport = new Transport() {
    5252            public String name() {
     53                if (System.getProperty("os.name").startsWith("OS/2"))
     54                    return "jdtshmem";
    5355                return "dt_shmem";              // for compatability reasons
    5456            }
  • trunk/openjdk/jdk/src/windows/classes/com/sun/tools/jdi/SharedMemoryListeningConnector.java

    r2 r263  
    5050        transport = new Transport() {
    5151            public String name() {
     52                if (System.getProperty("os.name").startsWith("OS/2"))
     53                    return "jdtshmem";
    5254                return "dt_shmem";              // compatability
    5355            }
  • trunk/openjdk/jdk/src/windows/classes/com/sun/tools/jdi/SharedMemoryTransportService.java

    r2 r263  
    6767
    6868    SharedMemoryTransportService() {
    69         System.loadLibrary("dt_shmem");
     69        final String shmemLib =
     70            System.getProperty("os.name").startsWith("OS/2") ? "jdtshmem"
     71                                                             : "dt_shmem";
     72        System.loadLibrary(shmemLib);
    7073        initialize();
    7174    }
  • trunk/openjdk/jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java

    r2 r263  
    3434import java.util.*;
    3535import sun.security.action.LoadLibraryAction;
     36import sun.security.action.GetPropertyAction;
    3637
    3738import static sun.awt.shell.Win32ShellFolder2.*;
     
    5253    static {
    5354        // Load library here
    54         AccessController.doPrivileged(new LoadLibraryAction("awt"));
     55        boolean isOS2 = AccessController.doPrivileged(new GetPropertyAction("os.name")).startsWith("OS/2");
     56        AccessController.doPrivileged(new LoadLibraryAction(isOS2 ? "jawtos2" : "awt"));
    5557    }
    5658
  • trunk/openjdk/jdk/src/windows/classes/sun/awt/windows/WToolkit.java

    r2 r263  
    8787    public static void loadLibraries() {
    8888        if (!loaded) {
     89            boolean isOS2 = java.security.AccessController.doPrivileged(
     90                new sun.security.action.GetPropertyAction("os.name")).
     91                    startsWith("OS/2");
    8992            java.security.AccessController.doPrivileged(
    90                           new sun.security.action.LoadLibraryAction("awt"));
     93                new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     94                                                                : "awt"));
    9195            loaded = true;
    9296        }
  • trunk/openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java

    r2 r263  
    160160
    161161    static {
     162        boolean isOS2 = java.security.AccessController.doPrivileged(
     163            new sun.security.action.GetPropertyAction("os.name")).
     164                startsWith("OS/2");
    162165        java.security.AccessController.doPrivileged(
    163             new sun.security.action.LoadLibraryAction("net"));
     166            new sun.security.action.LoadLibraryAction(isOS2 ? "jnet"
     167                                                            : "net"));
    164168        init0();
    165169
  • trunk/openjdk/jdk/src/windows/classes/sun/print/Win32PrintServiceLookup.java

    r2 r263  
    5656
    5757    static {
     58        boolean isOS2 = java.security.AccessController.doPrivileged(
     59            new sun.security.action.GetPropertyAction("os.name")).
     60                startsWith("OS/2");
    5861        java.security.AccessController.doPrivileged(
    59                     new sun.security.action.LoadLibraryAction("awt"));
     62            new sun.security.action.LoadLibraryAction(isOS2 ? "jawtos2"
     63                                                            : "awt"));
    6064    }
    6165
  • trunk/openjdk/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java

    r203 r263  
    5252            public Object run() {
    5353                if (System.getProperty("os.name").startsWith("OS/2")) {
    54                     System.loadLibrary("smscapi");
     54                    System.loadLibrary("jsmscapi");
    5555                } else {
    5656                    System.loadLibrary("sunmscapi");
  • trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp

    r195 r263  
    7777    // an infinite loop if some W call were made inside AwtToolkit class
    7878    // initialization.
     79#ifdef __WIN32OS2__   
     80    HMODULE hmodAWT = GetModuleHandleA("jawtos2");
     81#else
    7982    HMODULE hmodAWT = GetModuleHandleA("awt");
     83#endif
    8084    LPSTR abspath = static_cast<LPSTR>(safe_Malloc(MAX_PATH));
    8185    if (abspath != NULL) {
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Mlib.cpp

    r203 r263  
    5050         */
    5151#ifdef __WIN32OS2__         
    52         hDLL = ::LoadLibrary(TEXT("mlibimg.dll"));
     52        hDLL = ::LoadLibrary(TEXT("jmlibimg.dll"));
    5353#else
    5454        hDLL = ::LoadLibrary(TEXT("mlib_image.dll"));
  • trunk/openjdk/jdk/src/windows/npt/npt_md.h

    r2 r263  
    3434#include <errno.h>
    3535
     36#ifdef __WIN32OS2__
     37#define NPT_LIBNAME "jnpt.dll"
     38#else
    3639#define NPT_LIBNAME "npt.dll"
     40#endif
    3741
    3842#define NPT_INITIALIZE(pnpt,version,options)                            \
Note: See TracChangeset for help on using the changeset viewer.