Ticket #996: mutex.inl.patch

File mutex.inl.patch, 964 bytes (added by Anthony Williams, 15 years ago)
  • mutex.inl

    RCS file: /cvsroot/boost/boost/libs/thread/src/mutex.inl,v
    retrieving revision 1.5.10.4
    diff -u -r1.5.10.4 mutex.inl
     
    2424        version_info.dwMajorVersion >= 4)
    2525    {
    2626        if (HMODULE kernel_module = GetModuleHandle(TEXT("KERNEL32.DLL")))
    27             g_TryEnterCriticalSection = reinterpret_cast<TryEnterCriticalSection_type>(GetProcAddress(kernel_module, TEXT("TryEnterCriticalSection")));
     27        {
     28            g_TryEnterCriticalSection = reinterpret_cast<TryEnterCriticalSection_type>(
     29#if defined(BOOST_NO_ANSI_APIS)
     30                GetProcAddressW(kernel_module, L"TryEnterCriticalSection")
     31#else
     32                GetProcAddress(kernel_module, "TryEnterCriticalSection")
     33#endif       
     34                );
     35        }
    2836    }
    2937}
    3038