configure: Use AC_CHECK_FUNCS to define HAVE_GETTID.

VKD3D_CHECK_FUNC does not use a fake prototype (char gettid(void);)
and does not include <unistd.h>.  It always fails with Clang 16 and
GCC 14 and other compilers which do not support implicit function
declarations.
This commit is contained in:
Florian Weimer 2023-12-18 11:07:37 +01:00 committed by Alexandre Julliard
parent 62f18f749b
commit cca03d1c0e
Notes: Alexandre Julliard 2024-01-02 23:09:41 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/528

View File

@ -157,7 +157,7 @@ VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
VKD3D_CHECK_FUNC([HAVE_SYNC_BOOL_COMPARE_AND_SWAP], [__sync_bool_compare_and_swap], [__sync_bool_compare_and_swap((int *)0, 0, 0)])
VKD3D_CHECK_FUNC([HAVE_ATOMIC_EXCHANGE_N], [__atomic_exchange_n], [__atomic_exchange_n((int *)0, 0, 0)])
VKD3D_CHECK_FUNC([HAVE_GETTID], [gettid], [gettid()])
AC_CHECK_FUNCS([gettid])
dnl Makefiles
case $host_os in