summaryrefslogtreecommitdiff
path: root/cipher/rijndael.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2012-11-21 11:47:35 +0100
committerWerner Koch <wk@gnupg.org>2012-11-21 11:47:35 +0100
commit6368ed542150956ff4ba8170a15bbc534143675c (patch)
tree2388176fc6735fbdd1a8c2f0dae01fabe8047c43 /cipher/rijndael.c
parenta96974de734beb51a733a89b3283bcf7b433b54c (diff)
downloadlibgcrypt-6368ed542150956ff4ba8170a15bbc534143675c.tar.gz
Use configure test for aligned attribute.
* configure.ac (HAVE_GCC_ATTRIBUTE_ALIGNED): New test and ac_define. * cipher/cipher-internal.h, cipher/rijndael.c, random/rndhw.c: Use new macro instead of a fixed test for __GNUC__. -- We assume that compilers that grok "__attribute__ ((aligned (16)))" implement that in the same way as gcc does. In case it turns out that this is not the case we will need to do two more things: Detect such different behaviour and come up with a construct to allows the use of that other style of alignment forcing.
Diffstat (limited to 'cipher/rijndael.c')
-rw-r--r--cipher/rijndael.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cipher/rijndael.c b/cipher/rijndael.c
index a2aedf01..b9ee8add 100644
--- a/cipher/rijndael.c
+++ b/cipher/rijndael.c
@@ -52,7 +52,7 @@
/* Helper macro to force alignment to 16 bytes. */
-#ifdef __GNUC__
+#ifdef HAVE_GCC_ATTRIBUTE_ALIGNED
# define ATTR_ALIGNED_16 __attribute__ ((aligned (16)))
#else
# define ATTR_ALIGNED_16
@@ -63,7 +63,7 @@
code. */
#undef USE_PADLOCK
#ifdef ENABLE_PADLOCK_SUPPORT
-# ifdef __GNUC__
+# ifdef HAVE_GCC_ATTRIBUTE_ALIGNED
# if (defined (__i386__) && SIZEOF_UNSIGNED_LONG == 4) || defined(__x86_64__)
# define USE_PADLOCK 1
# endif