1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-24 04:25:10 -07:00

Fallback to _Thread_local on C11 regardless of the platform

This commit is contained in:
Frank Denis 2023-09-01 23:43:21 +02:00
parent a04c8687ac
commit 8ad54cb636

View File

@ -96,13 +96,13 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
# endif
#endif
#if !defined(TLS) && !defined(__STDC_NO_THREADS__) && \
defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define TLS _Thread_local
#endif
#ifndef TLS
# ifdef _WIN32
# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)
# define TLS _Thread_local
# else
# define TLS __declspec(thread)
# endif
# define TLS __declspec(thread)
# else
# define TLS
# endif