diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-05 14:59:56 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-05 14:59:56 +0100 |
commit | d23f1ee2f96e00c108a63c9849aabc1608b81e8a (patch) | |
tree | 8cc77c681f2b3569de5e084da6a395835458514e /config.h.in | |
parent | aedcdfe854c351c7d441487a30d931acabc1ce82 (diff) | |
download | rspamd-d23f1ee2f96e00c108a63c9849aabc1608b81e8a.tar.gz rspamd-d23f1ee2f96e00c108a63c9849aabc1608b81e8a.zip |
[Rework] Use C++ version of the lua threads pool
Diffstat (limited to 'config.h.in')
-rw-r--r-- | config.h.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in index 85a1fe829..c52506f8e 100644 --- a/config.h.in +++ b/config.h.in @@ -419,6 +419,12 @@ extern uint64_t ottery_rand_uint64(void); #endif #endif +#ifdef __cplusplus + #define RSPAMD_CONSTRUCTOR(f) \ + static void f(void); \ + struct f##_t_ { f##_t_(void) { f(); } }; static f##_t_ f##_; \ + static void f(void) +#else #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) #define RSPAMD_CONSTRUCTOR(f) \ static void f(void) __attribute__((constructor)); \ @@ -430,6 +436,7 @@ extern uint64_t ottery_rand_uint64(void); /* In fact, everything else is not supported ¯\_(ツ)_/¯ */ #error incompatible compiler found, need gcc > 2.7 or clang #endif +#endif /* __cplusplus */ #ifdef __GNUC__ #define RSPAMD_CONST_FUNCTION __attribute__ ((const)) |