diff options
author | Niels Möller <nisse@lysator.liu.se> | 2018-01-08 22:14:54 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2018-01-09 07:31:54 +0100 |
commit | 64454448808cc261cebd4ed791110db291806a5e (patch) | |
tree | 06f37b54530f95490fcc63521cfee3a3cf8cde2e | |
parent | 27cb643877539156a948dff4431a76ec2644e610 (diff) | |
download | nettle-64454448808cc261cebd4ed791110db291806a5e.tar.gz |
Configure check for __builtin_bswap64.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 16 |
2 files changed, 19 insertions, 0 deletions
@@ -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 diff --git a/configure.ac b/configure.ac index 8668263c..8fb1cb2a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |