refactor: fail without posix sigwait, remove from Config.h.in
based on 998a9d1735
This commit is contained in:
parent
1f950f4c2a
commit
6ff8b053af
3 changed files with 4 additions and 8 deletions
|
|
@ -117,6 +117,10 @@ macro(configure_unix_libs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_function_exists(sigwait HAVE_POSIX_SIGWAIT)
|
check_function_exists(sigwait HAVE_POSIX_SIGWAIT)
|
||||||
|
if (NOT HAVE_POSIX_SIGWAIT)
|
||||||
|
message(FATAL_ERROR "Missing posix sigwait")
|
||||||
|
endif()
|
||||||
|
|
||||||
check_function_exists(inet_aton HAVE_INET_ATON)
|
check_function_exists(inet_aton HAVE_INET_ATON)
|
||||||
|
|
||||||
# For some reason, the check_function_exists macro doesn't detect the
|
# For some reason, the check_function_exists macro doesn't detect the
|
||||||
|
|
@ -140,7 +144,6 @@ macro(configure_unix_libs)
|
||||||
# needed.
|
# needed.
|
||||||
list(APPEND libs nsl socket)
|
list(APPEND libs nsl socket)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# pthread is used on both Linux and Mac
|
# pthread is used on both Linux and Mac
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@
|
||||||
/* Define if you have the `inet_aton` function. */
|
/* Define if you have the `inet_aton` function. */
|
||||||
#cmakedefine HAVE_INET_ATON @HAVE_INET_ATON@
|
#cmakedefine HAVE_INET_ATON @HAVE_INET_ATON@
|
||||||
|
|
||||||
/* Define if you have a POSIX `sigwait` function. */
|
|
||||||
#cmakedefine HAVE_POSIX_SIGWAIT @HAVE_POSIX_SIGWAIT@
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||||
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -672,12 +672,8 @@ void *ArchMultithreadPosix::threadSignalHandler(void *)
|
||||||
// we exit the loop via thread cancellation in sigwait()
|
// we exit the loop via thread cancellation in sigwait()
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// wait
|
// wait
|
||||||
#if HAVE_POSIX_SIGWAIT
|
|
||||||
int signal = 0;
|
int signal = 0;
|
||||||
sigwait(&sigset, &signal);
|
sigwait(&sigset, &signal);
|
||||||
#else
|
|
||||||
sigwait(&sigset);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// if we get here then the signal was raised
|
// if we get here then the signal was raised
|
||||||
switch (signal) {
|
switch (signal) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue