[STLPORT] Make stl thread-safe

Define _STLP_THREADS to make stl thread safe.
Also remove defined(__BUILDING_STLPORT) from the preprocessor conditions for which STLPInterlockedExchangePointer is defined, because that function is used in _threads.h, which can get included by apps using the stl through stl headers.
This commit is contained in:
Timo Kreuzer 2023-09-21 23:38:02 +03:00
parent 97e53c6963
commit 7b38f80119
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2010
* Jérôme Gardou
* Jérôme Gardou
*
*
* This material is provided "as is", with absolutely no warranty expressed
@ -302,6 +302,9 @@
// Calling convention
#define _STLP_CALL __cdecl
// Always build multithreaded code
#define _STLP_THREADS
#if 0
#ifdef _M_AMD64

View file

@ -205,7 +205,7 @@ _STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char* lpOutput
* to avoid macro definition conflict. */
# if !defined (_WIN64)
/* Under 32 bits platform we rely on a simple InterlockedExchange call. */
# if defined (__cplusplus) && defined(__BUILDING_STLPORT)
# if defined (__cplusplus)
/* We do not define this function if we are not in a C++ translation unit just
* because of the 'inline' keyword portability issue it would introduce. We will
* have to fix it the day we need this function for a C translation unit.