Skip to content

Commit

Permalink
Set FLINT_TLS_PREFIX according to C standards
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 18, 2023
1 parent fd5b58b commit 9dca714
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/flint.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,10 @@ typedef struct __FLINT_FILE FLINT_FILE;
#endif

#if FLINT_USES_TLS
# if defined(__GNUC__)
# define FLINT_TLS_PREFIX __thread
# elif __STDC_VERSION__ >= 201112L
# if __STDC_VERSION__ < 202300L
# define FLINT_TLS_PREFIX _Thread_local
# elif defined(_MSC_VER)
# define FLINT_TLS_PREFIX __declspec(thread)
# else
# error "thread local prefix defined in C11 or later"
# define FLINT_TLS_PREFIX thread_local
# endif
#else
# define FLINT_TLS_PREFIX
Expand Down

0 comments on commit 9dca714

Please sign in to comment.