Include <threads.h> if possible to get thread_local definition

IN C23, thread_local is a reserved keyword and we shall therefore
do nothing to redefine it. glibc has it defined for older standard
version with the right conditions.

v2 by Yu Watanabe:
Move the definition to missing_threads.h like the way we define e.g.
missing syscalls or missing definitions, and include it by the users.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
This commit is contained in:
Cristian Rodríguez
2023-03-06 10:04:39 +09:00
committed by Yu Watanabe
co-authored by Yu Watanabe
parent efcde781de
commit 5545f336fd
22 changed files with 35 additions and 14 deletions
+1
View File
@@ -14,6 +14,7 @@
#include "logarithm.h"
#include "macro.h"
#include "missing_prctl.h"
#include "missing_threads.h"
#include "parse-util.h"
#include "user-util.h"