Changeset 332


Ignore:
Timestamp:
Feb 22, 2012, 7:36:01 PM (9 years ago)
Author:
dmik
Message:

jdk: Make sure DllMain? in JAWTOS2.DLL is called.

This also fixes the duplicate symbol error.

Location:
trunk/openjdk/jdk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/jdk/make/sun/awt/Makefile

    r278 r332  
    9595
    9696FILES_cpp += jdk_DllMain.cpp
     97CXXFLAGS_OPT/jdk_DllMain.obj += -DHAVE_DLLMAIN
     98CXXFLAGS_DBG/jdk_DllMain.obj += -DHAVE_DLLMAIN
    9799
    98100#
  • trunk/openjdk/jdk/src/os2/native/common/jdk_DllMain.cpp

    r274 r332  
    4343static HMODULE dllHandle = 0;
    4444
    45 BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
     45#ifdef HAVE_DLLMAIN
     46extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD ul_reason_for_call,
     47                               LPVOID);
     48#endif
     49
     50static BOOL WINAPI DefaultDllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
    4651{
     52    BOOL rc = TRUE;
     53
     54#ifdef HAVE_DLLMAIN
     55    rc = DllMain(hinst, reason, reserved);
     56#endif
     57
    4758    // call destructors when detaching the DLL from the process
    4859    if (reason == 0)
    4960        __ctordtorTerm();
    5061
    51     return TRUE;
     62    return rc;
    5263}
    5364
     
    6374    switch (ulFlag) {
    6475        case 0 :
    65             dllHandle = RegisterLxDll(hModule, DllMain, NULL,
     76            dllHandle = RegisterLxDll(hModule, DefaultDllMain, NULL,
    6677                                      ODINNT_MAJOR_VERSION,
    6778                                      ODINNT_MINOR_VERSION,
Note: See TracChangeset for help on using the changeset viewer.