]> source.dussan.org Git - rspamd.git/commitdiff
Another workaround to avoid __int128 warning
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Jan 2016 10:36:24 +0000 (11:36 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Jan 2016 10:36:24 +0000 (11:36 +0100)
src/libcryptobox/poly1305/poly1305_internal.h [new file with mode: 0644]
src/libcryptobox/poly1305/ref-64.c

diff --git a/src/libcryptobox/poly1305/poly1305_internal.h b/src/libcryptobox/poly1305/poly1305_internal.h
new file mode 100644 (file)
index 0000000..21b7aa7
--- /dev/null
@@ -0,0 +1,19 @@
+#if defined(_MSC_VER)
+       #include <intrin.h>
+
+       typedef struct uint128_t {
+               unsigned long long lo;
+               unsigned long long hi;
+       } uint128_t;
+
+       #define POLY1305_NOINLINE __declspec(noinline)
+#elif defined(__GNUC__)
+       #pragma GCC system_header
+       #if defined(__SIZEOF_INT128__)
+               typedef unsigned __int128 uint128_t;
+       #else
+               typedef unsigned uint128_t __attribute__((mode(TI)));
+       #endif
+
+       #define POLY1305_NOINLINE __attribute__((noinline))
+#endif
index 01b8ff2c19c7dda3562a3ed56135baebb4790ac2..48d5fbcc6b91d2f4e242434999066e0d00e553c5 100644 (file)
@@ -6,30 +6,11 @@
 
 #include "config.h"
 #include "poly1305.h"
+#include "poly1305_internal.h"
 enum {
        POLY1305_BLOCK_SIZE = 16
 };
 
-#if defined(_MSC_VER)
-       #include <intrin.h>
-
-       typedef struct uint128_t {
-               unsigned long long lo;
-               unsigned long long hi;
-       } uint128_t;
-
-       #define POLY1305_NOINLINE __declspec(noinline)
-#elif defined(__GNUC__)
-       #pragma GCC system_header
-       #if defined(__SIZEOF_INT128__)
-               typedef unsigned __int128 uint128_t;
-       #else
-               typedef unsigned uint128_t __attribute__((mode(TI)));
-       #endif
-
-       #define POLY1305_NOINLINE __attribute__((noinline))
-#endif
-
 typedef struct poly1305_state_ref_t {
        uint64_t r[3];
        uint64_t h[3];