summaryrefslogtreecommitdiffstats
path: root/config.h.in
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 12:50:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 12:50:56 +0100
commit006ac63208cdba554688083ecd1a5fc4031ba987 (patch)
treec77324d34d44ea41fea433c33f3df56432427b62 /config.h.in
parentfb2c15a39a8fc4321a3658c6fec96f6f8bee64a8 (diff)
downloadrspamd-006ac63208cdba554688083ecd1a5fc4031ba987.tar.gz
rspamd-006ac63208cdba554688083ecd1a5fc4031ba987.zip
Slightly optimize alignment
Diffstat (limited to 'config.h.in')
-rw-r--r--config.h.in50
1 files changed, 19 insertions, 31 deletions
diff --git a/config.h.in b/config.h.in
index 93721f82e..f53f51978 100644
--- a/config.h.in
+++ b/config.h.in
@@ -91,29 +91,6 @@
#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
@@ -341,14 +318,6 @@
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
@@ -364,6 +333,25 @@ typedef off_t goffset;
((((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