Ignore:
Timestamp:
Feb 21, 2011, 12:02:20 AM (15 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/jdk/src/share
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.