Skip to content
Myr

stbi: fix thread local selector

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* GCC < 5 supports __thread and GCC >= 5 supports C11 with _Thread_local * Skip _Thread_local for MSVC because it may not be supported

authored by Recep Aslantas · committed by Recep Aslantas · parent f54acd4 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:stb_image.h+4 added-4 removed
572 unmodified lines
573574#ifndef STBI_NO_THREAD_LOCALS575 #if defined(__cplusplus) && __cplusplus >= 201103L576 #define STBI_THREAD_LOCAL thread_local577 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L578 #define STBI_THREAD_LOCAL _Thread_local579 #elif defined(__GNUC__)577 #elif defined(__GNUC__) && __GNUC__ < 5578 #define STBI_THREAD_LOCAL __thread579 #elif defined(_MSC_VER)580 #define STBI_THREAD_LOCAL __declspec(thread)581 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)582 #define STBI_THREAD_LOCAL _Thread_local583 #endif584#endif584#endif585586#ifdef _MSC_VER587typedef unsigned short stbi__uint16;588typedef signed short stbi__int16;
7068 unmodified lines