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
@@ -16,6 +16,7 @@
#include "fd-util.h"
#include "fileio.h"
#include "macro.h"
#include "missing_threads.h"
#include "process-util.h"
#include "stat-util.h"
#include "string-table.h"