Skip to content

Commit 748994c

Browse files
committed
add LTC_ALIGN() macro
1 parent 5bc034f commit 748994c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/headers/tomcrypt_cfg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ typedef unsigned long ltc_mp_digit;
288288
#define LTC_HAVE_ROTATE_BUILTIN
289289
#endif
290290

291+
#if defined(__GNUC__)
292+
#define LTC_ALIGN(n) __attribute__((aligned(n)))
293+
#else
294+
#define LTC_ALIGN(n)
295+
#endif
296+
291297
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
292298
# define LTC_DEPRECATED(s) __attribute__((deprecated("replaced by " #s)))
293299
# define PRIVATE_LTC_DEPRECATED_PRAGMA(s) _Pragma(#s)

src/headers/tomcrypt_mac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ typedef struct {
482482
#ifdef LTC_GCM_TABLES
483483
unsigned char PC[16][256][16] /* 16 tables of 8x128 */
484484
#ifdef LTC_GCM_TABLES_SSE2
485-
__attribute__ ((aligned (16)))
485+
LTC_ALIGN(16)
486486
#endif
487487
;
488488
#endif

0 commit comments

Comments
 (0)