Commit 64454448 authored by Niels Möller's avatar Niels Möller

Configure check for __builtin_bswap64.

parent 27cb6438
......@@ -9,6 +9,9 @@
2018-01-08 Niels Möller <nisse@lysator.liu.se>
* configure.ac: Check for __builtin_bswap64, define
HAVE_BUILTIN_BSWAP64 if available.
* ctr.c (ctr_fill): New function. Use in ctr_crypt.
* ctr.c (ctr_crypt): For in-place operation, increase max buffer
......
......@@ -203,6 +203,22 @@ LSH_FUNC_STRERROR
AC_CHECK_FUNCS(secure_getenv getline)
AC_C_BIGENDIAN
AC_CACHE_CHECK([for __builtin_bswap64],
nettle_cv_c_builtin_bswap64,
[AC_TRY_COMPILE([
#include <stdint.h>
],[
uint64_t x = 17;
uint64_t y = __builtin_bswap64(x);
],
nettle_cv_c_builtin_bswap64=yes,
nettle_cv_c_builtin_bswap64=no)])
AH_TEMPLATE([HAVE_BUILTIN_BSWAP64], [Define if __builtin_bswap64 is available])
if test "x$nettle_cv_c_builtin_bswap64" = "xyes" ; then
AC_DEFINE(HAVE_BUILTIN_BSWAP64)
fi
LSH_GCC_ATTRIBUTES
# According to Simon Josefsson, looking for uint32_t and friends in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment