Differences From Artifact [1d8ffdf904]:
- File configure.ac — part of check-in [7db789ca8d] at 2022-12-29 15:06:17 on branch trunk — Improve check for pthread_attr_setinheritsched (user: js, size: 58517) [annotate] [blame] [check-ins using]
To Artifact [d7854aceb5]:
- File
configure.ac
— part of check-in
[15365e62aa]
at
2022-12-29 15:35:39
on branch trunk
— Fix pthread_attr_setinheritsched check
* The header was wrong due to still thinking about the check I improved
previously.
* It needs -Werror to not work with an implicit declaration.
* It must not use NULL as an argument, because the parameter could be
declared nonnull. (user: js, size: 58635) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | AC_CHECK_FUNC(sched_yield, [ AC_DEFINE(OF_HAVE_SCHED_YIELD, 1, [Whether we have sched_yield()]) ]) AC_CHECK_FUNCS(pthread_attr_getschedpolicy) AC_MSG_CHECKING(for pthread_attr_setinheritsched) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ | > > | | > > | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 | AC_CHECK_FUNC(sched_yield, [ AC_DEFINE(OF_HAVE_SCHED_YIELD, 1, [Whether we have sched_yield()]) ]) AC_CHECK_FUNCS(pthread_attr_getschedpolicy) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Werror" AC_MSG_CHECKING(for pthread_attr_setinheritsched) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ #include <pthread.h> ], [ pthread_attr_setinheritsched( (pthread_attr_t *)-1, 0); ]) ], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_ATTR_SETINHERITSCHED, 1, [Whether we have pthread_attr_setinheritsched]) ], [ AC_MSG_RESULT(no) ]) OBJCFLAGS="$old_OBJCFLAGS" AC_CHECK_HEADERS(pthread_np.h, [], [], [#include <pthread.h>]) AC_CHECK_FUNCS(pthread_set_name_np pthread_setname_np, break) ;; esac AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads]) |
︙ | ︙ |