mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 08:18:48 +00:00
Apple have broken strtonum so check it works, from Teubel Gyorgy.
This commit is contained in:
parent
a25af7d0f3
commit
16b497e12b
11
configure.ac
11
configure.ac
@ -150,10 +150,19 @@ AC_REPLACE_FUNCS([ \
|
|||||||
strlcpy \
|
strlcpy \
|
||||||
strndup \
|
strndup \
|
||||||
strsep \
|
strsep \
|
||||||
strtonum \
|
|
||||||
])
|
])
|
||||||
AC_FUNC_STRNLEN
|
AC_FUNC_STRNLEN
|
||||||
|
|
||||||
|
# Check if strtonum works.
|
||||||
|
AC_MSG_CHECKING([for working strtonum])
|
||||||
|
AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||||
|
[#include <stdlib.h>],
|
||||||
|
[return (strtonum("0", 0, 1, NULL) == 0 ? 0 : 1);]
|
||||||
|
)],
|
||||||
|
[AC_DEFINE(HAVE_STRTONUM) AC_MSG_RESULT(yes)],
|
||||||
|
[AC_LIBOBJ(strtonum) AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
# Clang sanitizers wrap reallocarray even if it isn't available on the target
|
# Clang sanitizers wrap reallocarray even if it isn't available on the target
|
||||||
# system. When compiled it always returns NULL and crashes the program. To
|
# system. When compiled it always returns NULL and crashes the program. To
|
||||||
# detect this we need a more complicated test.
|
# detect this we need a more complicated test.
|
||||||
|
Loading…
Reference in New Issue
Block a user