#if !defined(BYTE_ORDER)
# error "Undefined or unknown BYTE_ORDER"
#endif
-
-#ifdef _MSC_VER
-# define RSPAMD_PACKED(name) \
- __pragma(pack(push, 1)) struct name __pragma(pack(pop))
-#elif defined(__GNUC__)
-# define RSPAMD_PACKED(name) struct __attribute__((packed)) name
-#else
-# define RSPAMD_PACKED(name) struct name
-#endif
-
-
-#ifndef RSPAMD_ALIGNED
-#if defined(_MSC_VER)
-# define RSPAMD_ALIGNED(x) __declspec(align(x))
-#elif defined(__GNUC__)
-# define RSPAMD_ALIGNED(x) __attribute__((aligned(x)))
-#else
-# define RSPAMD_ALIGNED(x)
-#endif
-#endif
-
-
-
#cmakedefine HAVE_SYS_QUEUE_H 1
#cmakedefine HAVE_SYS_MMAN_H 1
#cmakedefine HAVE_SYS_SOCKET_H 1
typedef off_t goffset;
#endif
-#ifndef ALIGN
-#if defined(_MSC_VER)
-# define ALIGN(x) __declspec(align(x))
-#else
-# define ALIGN(x) __attribute__((aligned(x)))
-#endif
-#endif
-
#ifndef PARAM_H_HAS_BITSET
/* Bit map related macros. */
#ifndef NBBY
((((const unsigned char *)(a))[(i) / NBBY] & (1 << ((i) % NBBY))) == 0)
#endif
+#ifdef _MSC_VER
+# define RSPAMD_PACKED(name) \
+ __pragma(pack(push, 1)) struct name __pragma(pack(pop))
+#elif defined(__GNUC__)
+# define RSPAMD_PACKED(name) struct __attribute__((packed)) name
+#else
+# define RSPAMD_PACKED(name) struct name
+#endif
+
+#ifndef RSPAMD_ALIGNED
+#if defined(_MSC_VER)
+# define RSPAMD_ALIGNED(x) __declspec(align(x))
+#elif defined(__GNUC__)
+# define RSPAMD_ALIGNED(x) __attribute__((aligned(x)))
+#else
+# define RSPAMD_ALIGNED(x)
+#endif
+#endif
+
#ifndef BITSPERBYTE
# define BITSPERBYTE (NBBY * sizeof (char))
#endif
#include "blake2.h"
#include "cryptobox.h"
-struct rspamd_http_keypair {
+struct RSPAMD_ALIGNED(32) rspamd_http_keypair {
guchar pk[rspamd_cryptobox_PKBYTES];
- guchar sk[rspamd_cryptobox_SKBYTES];
+ guchar RSPAMD_ALIGNED(32) sk[rspamd_cryptobox_SKBYTES];
guchar id[BLAKE2B_OUTBYTES];
- guchar nm[rspamd_cryptobox_NMBYTES];
+ guchar RSPAMD_ALIGNED(32) nm[rspamd_cryptobox_NMBYTES];
gboolean has_nm;
ref_entry_t ref;
};