From 40acdaeb86c516b68e3442f3a008e8d21e514bda Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 3 Apr 2015 11:41:56 -0400 Subject: [PATCH] Rename p_thread_callback_base to p_thread_callback_boringssl. This fixes the Windows build. Otherwise this collides with the symbol in Chromium's //base. (The 'base' suffix is the name of the library, not some Windows-ism.) Change-Id: I65d755f08991978bd2040d53c401082b2fee65fa Reviewed-on: https://boringssl-review.googlesource.com/4217 Reviewed-by: Adam Langley --- crypto/thread_win.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crypto/thread_win.c b/crypto/thread_win.c index ee48f34a..240444f8 100644 --- a/crypto/thread_win.c +++ b/crypto/thread_win.c @@ -127,14 +127,14 @@ static void NTAPI thread_local_destructor(PVOID module, * * Force a reference to _tls_used to make the linker create the TLS directory * if it's not already there. (E.g. if __declspec(thread) is not used). Force - * a reference to p_thread_callback_base to prevent whole program optimization - * from discarding the variable. */ + * a reference to p_thread_callback_boringssl to prevent whole program + * optimization from discarding the variable. */ #ifdef _WIN64 #pragma comment(linker, "/INCLUDE:_tls_used") -#pragma comment(linker, "/INCLUDE:p_thread_callback_base") +#pragma comment(linker, "/INCLUDE:p_thread_callback_boringssl") #else #pragma comment(linker, "/INCLUDE:__tls_used") -#pragma comment(linker, "/INCLUDE:_p_thread_callback_base") +#pragma comment(linker, "/INCLUDE:_p_thread_callback_boringssl") #endif /* .CRT$XLA to .CRT$XLZ is an array of PIMAGE_TLS_CALLBACK pointers that are @@ -149,7 +149,7 @@ static void NTAPI thread_local_destructor(PVOID module, * * See VC\crt\src\tlssup.c for reference. */ -/* The linker must not discard p_thread_callback_base. (We force a reference +/* The linker must not discard p_thread_callback_boringssl. (We force a reference * to this variable with a linker /INCLUDE:symbol pragma to ensure that.) If * this variable is discarded, the OnThreadExit function will never be * called. */ @@ -159,15 +159,15 @@ static void NTAPI thread_local_destructor(PVOID module, #pragma const_seg(".CRT$XLC") /* When defining a const variable, it must have external linkage to be sure the * linker doesn't discard it. */ -extern const PIMAGE_TLS_CALLBACK p_thread_callback_base; -const PIMAGE_TLS_CALLBACK p_thread_callback_base = thread_local_destructor; +extern const PIMAGE_TLS_CALLBACK p_thread_callback_boringssl; +const PIMAGE_TLS_CALLBACK p_thread_callback_boringssl = thread_local_destructor; /* Reset the default section. */ #pragma const_seg() #else #pragma data_seg(".CRT$XLC") -PIMAGE_TLS_CALLBACK p_thread_callback_base = thread_local_destructor; +PIMAGE_TLS_CALLBACK p_thread_callback_boringssl = thread_local_destructor; /* Reset the default section. */ #pragma data_seg()