Skip to content

Commit

Permalink
Fix meson/configure _Thread_local checks for C99 compatibility
Browse files Browse the repository at this point in the history
The type was missing from the definition, which happens to work
in current compilers for historic reasons.  Implicit ints were
actually removed from C in 1999.
  • Loading branch information
fweimer-rh authored and ueno committed Dec 12, 2022
1 parent da081be commit d39043f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ if test "$os_unix" = "yes"; then
[ac_cv_tls_keyword=
for keyword in _Thread_local __thread; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
[[static ]$keyword[ foo;]])],
[[static ]$keyword[ int foo;]])],
[ac_cv_tls_keyword=$keyword])
done])
if test -n "$ac_cv_tls_keyword"; then
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ if host_system != 'windows'
tls_test_code_template = '''
#include <stdlib.h>
int main (void) {
static @0@ foo;
static @0@ int foo;
return 0;
}
'''
Expand Down

0 comments on commit d39043f

Please sign in to comment.