mirror of
https://github.com/json-c/json-c.git
synced 2026-03-19 21:19:06 +08:00
meson: simplify __thread check and fix MinGW
> was missing. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -124,16 +124,12 @@ foreach d, h : decls
|
||||
endif
|
||||
endforeach
|
||||
|
||||
check_thread = cc.compiles('''
|
||||
__thread int x = 0;
|
||||
int main() { return x; }
|
||||
''',
|
||||
name: 'Check for __thread support')
|
||||
check_thread = cc.compiles('__thread int x;', name: 'Check for __thread support')
|
||||
|
||||
if check_thread
|
||||
conf_data.set('HAVE___THREAD', 1)
|
||||
conf_data.set('SPEC___THREAD', '__thread')
|
||||
elif cc.get_id().contains('msvc')
|
||||
elif cc.get_argument_syntax() == 'msvc'
|
||||
conf_data.set('SPEC___THREAD', '__declspec(thread)')
|
||||
endif
|
||||
|
||||
@@ -212,7 +208,6 @@ json_header = configure_file(
|
||||
configuration: jhconf_data
|
||||
)
|
||||
|
||||
|
||||
# Platform-specific flags
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user