diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-15 11:28:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-15 11:28:41 +0100 |
commit | 6ceac089b6a8fee5aef14307b0561e98202947c5 (patch) | |
tree | bf105ef7acee480dc41c498fa8b7f0ba77a7effb /config.h.in | |
parent | 61f993a096adee992be9b5333f6c0090440f00ed (diff) | |
download | rspamd-6ceac089b6a8fee5aef14307b0561e98202947c5.tar.gz rspamd-6ceac089b6a8fee5aef14307b0561e98202947c5.zip |
Fix some portability issues.
Diffstat (limited to 'config.h.in')
-rw-r--r-- | config.h.in | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/config.h.in b/config.h.in index 04e6416ae..93721f82e 100644 --- a/config.h.in +++ b/config.h.in @@ -102,6 +102,18 @@ #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 @@ -339,7 +351,9 @@ typedef off_t goffset; #ifndef PARAM_H_HAS_BITSET /* Bit map related macros. */ -#define NBBY 8 /* number of bits in a byte */ +#ifndef NBBY +# define NBBY 8 /* number of bits in a byte */ +#endif #define setbit(a, \ i) (((unsigned char *)(a))[(i) / NBBY] |= 1 << ((i) % NBBY)) #define clrbit(a, \ |