Check for memset_s availability the hard way.
This commit is contained in:
parent
bfeec26358
commit
90d270f7c5
12
configure.ac
12
configure.ac
@ -345,6 +345,17 @@ AS_CASE([$host_cpu],
|
||||
AC_DEFINE([CPU_ALIGNED_ACCESS_REQUIRED], [1], [data alignment is required])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for memset_s)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <string.h>
|
||||
]], [[
|
||||
char dummy[42];
|
||||
(void) memset_s(dummy, (rsize_t) sizeof dummy, 0, (rsize_t) sizeof dummy);
|
||||
]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_MEMSET_S], [1], [memset_s is available])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
||||
dnl Checks for functions and headers
|
||||
|
||||
AC_CHECK_FUNC(clock_gettime, , [AC_CHECK_LIB(rt, clock_gettime)])
|
||||
@ -352,7 +363,6 @@ AC_CHECK_FUNC(fegetenv, , [AC_CHECK_LIB(m, fegetenv)])
|
||||
|
||||
AS_IF([test "x$EMSCRIPTEN" = "x"],[
|
||||
AC_CHECK_FUNCS([arc4random arc4random_buf])
|
||||
AC_CHECK_FUNCS([memset_s])
|
||||
])
|
||||
AC_CHECK_FUNCS([mlock VirtualLock])
|
||||
AC_CHECK_FUNCS([SecureZeroMemory explicit_bzero posix_memalign])
|
||||
|
Loading…
Reference in New Issue
Block a user