]> source.dussan.org Git - rspamd.git/commitdiff
Small fixes.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Feb 2015 10:52:31 +0000 (10:52 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Feb 2015 10:52:31 +0000 (10:52 +0000)
contrib/blake2/blake2-impl.h
contrib/blake2/blake2.h
src/libmime/CMakeLists.txt
test/CMakeLists.txt
test/rspamd_http_test.c

index 5ac7a430fb9ada88cd4adad0c489e412a814939f..2a937904b9326705f1673695d74cdcfc725950dd 100644 (file)
 #ifndef __BLAKE2_IMPL_H__
 #define __BLAKE2_IMPL_H__
 
+#include "config.h"
 #include <stdint.h>
 
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define NATIVE_LITTLE_ENDIAN
+#endif
+
 static inline uint32_t load32( const void *src )
 {
 #if defined(NATIVE_LITTLE_ENDIAN)
index 7011c57f59759fcd679a1e324955a8a38b6a0709..7d611f9a4c3c5c2a8b8ad118199d616254deb047 100644 (file)
 #include <stddef.h>
 #include <stdint.h>
 
-#ifndef BLAKE_ALIGN
+#ifndef BLAKE_ALIGNED
 #if defined(_MSC_VER)
-# define BLAKE_ALIGN(x) __declspec(align(x))
+# define BLAKE_ALIGNED(x) __declspec(align(x))
 #else
-# define BLAKE_ALIGN(x) __attribute__((aligned(x)))
+# define BLAKE_ALIGNED(x) __attribute__((aligned(x)))
 #endif
 #endif
 
@@ -56,7 +56,7 @@ extern "C" {
     uint8_t  personal[BLAKE2B_PERSONALBYTES];  // 64
   } blake2b_param;
 
-  BLAKE_ALIGN( 64 ) typedef struct __blake2b_state
+  BLAKE_ALIGNED( 64 ) typedef struct __blake2b_state
   {
     uint64_t h[8];
     uint64_t t[2];
index c9c4318b848d145a0d5bf93b7470b20019de6eeb..94f2f6e89929dc77cc72c77a1d4ac9cbc6d8eeb7 100644 (file)
@@ -16,7 +16,7 @@ SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES LINKER_LANGUAGE C)
 SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB")
 TARGET_LINK_LIBRARIES(rspamd-mime rspamd-server)
 TARGET_LINK_LIBRARIES(rspamd-mime rspamd-stat)
-TARGET_LINK_LIBRARIES(rspamd-mime rspamd-util)      
+TARGET_LINK_LIBRARIES(rspamd-mime rspamd-util)
 IF(CMAKE_COMPILER_IS_GNUCC)
        SET_TARGET_PROPERTIES(rspamd-mime PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB -fno-strict-aliasing")
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
index 0684a60262b51a25a9b429aedf633bd80ea47698..99c82519955c35fa79279d72c3bee90707df035f 100644 (file)
@@ -17,10 +17,13 @@ ADD_EXECUTABLE(rspamd-test EXCLUDE_FROM_ALL ${TESTSRC})
 SET_TARGET_PROPERTIES(rspamd-test PROPERTIES LINKER_LANGUAGE C)
 SET_TARGET_PROPERTIES(rspamd-test PROPERTIES COMPILE_FLAGS "-DRSPAMD_TEST")
 
+TARGET_LINK_LIBRARIES(rspamd-test rspamd-stat)
 TARGET_LINK_LIBRARIES(rspamd-test rspamd-mime)
 TARGET_LINK_LIBRARIES(rspamd-test rspamd-server)
 TARGET_LINK_LIBRARIES(rspamd-test rspamd-util)
 TARGET_LINK_LIBRARIES(rspamd-test rspamd-lua)
+TARGET_LINK_LIBRARIES(rspamd-test rspamd-cryptobox)
+TARGET_LINK_LIBRARIES(rspamd-test stemmer)
 
 TARGET_LINK_LIBRARIES(rspamd-test event)
 IF(HAVE_LIBEVENT2)
index 581a4c28408395ca4229191d9cba0598fd1c0c47..cdcfef967f0f7458863322070f38641f13779d8f 100644 (file)
@@ -27,6 +27,7 @@
 #include "http.h"
 #include "tests.h"
 #include "ottery.h"
+#include "cryptobox.h"
 
 static const int file_blocks = 8;
 static const int pconns = 100;