summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-05 12:55:56 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-05 12:55:56 -0400
commit634359bb169311646f6369b21f0c90a9819fe2ce (patch)
tree0cf7913c96892c35c9aa3526bec096f7ca0b0e4b /src/config.h
parent14f790c80acf0f9f005ce9e7a94246954533163b (diff)
downloadbfs-634359bb169311646f6369b21f0c90a9819fe2ce.tar.xz
thread: Define thread_local
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index e3048c4..862a839 100644
--- a/src/config.h
+++ b/src/config.h
@@ -59,6 +59,9 @@
#if __has_include(<sys/xattr.h>)
# define BFS_HAS_SYS_XATTR_H true
#endif
+#if __has_include(<threads.h>)
+# define BFS_HAS_THREADS_H true
+#endif
#if __has_include(<util.h>)
# define BFS_HAS_UTIL_H true
#endif
@@ -74,6 +77,7 @@
#define BFS_HAS_SYS_PARAM_H true
#define BFS_HAS_SYS_SYSMACROS_H __GLIBC__
#define BFS_HAS_SYS_XATTR_H __linux__
+#define BFS_HAS_THREADS_H (!__STDC_NO_THREADS__)
#define BFS_HAS_UTIL_H __NetBSD__
#endif // !__has_include
@@ -105,6 +109,9 @@
#ifndef BFS_USE_SYS_XATTR_H
# define BFS_USE_SYS_XATTR_H BFS_HAS_SYS_XATTR_H
#endif
+#ifndef BFS_USE_THREADS_H
+# define BFS_USE_THREADS_H BFS_HAS_THREADS_H
+#endif
#ifndef BFS_USE_UTIL_H
# define BFS_USE_UTIL_H BFS_HAS_UTIL_H
#endif