Skip to content

Commit 0290c58

Browse files
Explorer09BenBE
authored andcommitted
Smaller thread_extended_info_data_t check code
Use AC_CHECK_TYPES for checking thread_extended_info_data_t in configure. No need to write a custom test program for it. This is a follow-up of commit 7720dbd
1 parent 31c95c6 commit 0290c58

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

configure.ac

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -186,25 +186,7 @@ AC_CHECK_HEADERS([execinfo.h])
186186

187187
if test "$my_htop_platform" = darwin; then
188188
AC_CHECK_HEADERS([mach/mach_time.h])
189-
AC_CHECK_HEADERS([mach/thread_info.h])
190-
191-
AC_MSG_CHECKING(for thread_extended_info_data_t)
192-
AC_COMPILE_IFELSE([
193-
AC_LANG_PROGRAM(
194-
[#include <mach/thread_info.h>],
195-
[
196-
thread_extended_info_data_t teid;
197-
(void)teid;
198-
]
199-
)],
200-
[
201-
AC_DEFINE([HAVE_THREAD_EXTENDED_INFO_DATA_T], 1, [Define if thread_extended_info_data_t is available from <mach/thread_info.h>])
202-
AC_MSG_RESULT(yes)
203-
],
204-
[
205-
AC_MSG_RESULT(no)
206-
]
207-
)
189+
AC_CHECK_TYPES([thread_extended_info_data_t], [], [], [[#include <mach/thread_info.h>]])
208190
fi
209191

210192
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)