Skip to content

Commit bc3b7e7

Browse files
authored
Merge pull request #5623 from martin-frbg/issue5366
Rename the DllMain copy used in static linking to OpenBLASDllMain
2 parents dafb996 + 8099562 commit bc3b7e7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

driver/others/memory.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ void DESTRUCTOR gotoblas_quit(void) {
16011601
}
16021602

16031603
#if defined(_MSC_VER) && !defined(__clang__)
1604-
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
1604+
BOOL APIENTRY OpenBLASDllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
16051605
{
16061606
switch (ul_reason_for_call)
16071607
{
@@ -1650,10 +1650,10 @@ static int on_process_term(void)
16501650
#endif
16511651

16521652
#ifdef _WIN64
1653-
static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
1653+
static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
16541654
#pragma const_seg()
16551655
#else
1656-
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
1656+
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
16571657
#pragma data_seg()
16581658
#endif
16591659

@@ -3473,7 +3473,7 @@ void DESTRUCTOR gotoblas_quit(void) {
34733473
}
34743474

34753475
#if defined(_MSC_VER) && !defined(__clang__)
3476-
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
3476+
BOOL APIENTRY OpenBLASDllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
34773477
{
34783478
switch (ul_reason_for_call)
34793479
{
@@ -3517,7 +3517,7 @@ static int on_process_term(void)
35173517
#else
35183518
#pragma data_seg(".CRT$XLB")
35193519
#endif
3520-
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
3520+
static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = OpenBLASDllMain;
35213521
#ifdef _WIN64
35223522
#pragma const_seg()
35233523
#else

0 commit comments

Comments
 (0)