Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Remove conflicts from blake2 build.
Vsevolod Stakhov committed 11 years ago
commit 286d48cad5b7a9616667ee42433205626cec92d8
parent feb0d4f
4 files changed +23 -7
modified external/blake2/Makefile.am
@@ -3,7 +3,7 @@ noinst_HEADERS= blake2.h \

noinst_LTLIBRARIES=	libblake2.la libblake2_static.la

-
blake2_common_cflags=	-O3
+
blake2_common_cflags=	-I$(top_srcdir)/compat -O3
libblake2_la_SOURCES=	blake2b-ref.c
libblake2_la_CFLAGS=	$(blake2_common_cflags) -shared
libblake2_static_la_SOURCES=	$(libblake2_la_SOURCES)
modified external/blake2/blake2-impl.h
@@ -14,8 +14,23 @@
#ifndef __BLAKE2_IMPL_H__
#define __BLAKE2_IMPL_H__

+
#include <pkg_config.h>
#include <stdint.h>

+
#ifdef HAVE_SYS_ENDIAN_H
+
#include <sys/endian.h>
+
#elif HAVE_ENDIAN_H
+
#include <endian.h>
+
#elif HAVE_MACHINE_ENDIAN_H
+
#include <machine/endian.h>
+
#endif
+

+
#ifdef __BYTE_ORDER
+
# if __BYTE_ORDER == __LITTLE_ENDIAN
+
#  define NATIVE_LITTLE_ENDIAN
+
# endif
+
#endif
+

static inline uint32_t load32( const void *src )
{
#if defined(NATIVE_LITTLE_ENDIAN)
modified external/blake2/blake2.h
@@ -17,10 +17,12 @@
#include <stddef.h>
#include <stdint.h>

-
#if defined(_MSC_VER)
-
#define ALIGN(x) __declspec(align(x))
-
#else
-
#define ALIGN(x) __attribute__((aligned(x)))
+
#ifndef BLAKE_ALIGN
+
# if defined(_MSC_VER)
+
#  define BLAKE_ALIGN(x) __declspec(align(x))
+
# else
+
#  define BLAKE_ALIGN(x) __attribute__((aligned(x)))
+
# endif
#endif

#if defined(__cplusplus)
@@ -54,7 +56,7 @@ extern "C" {
    uint8_t  personal[BLAKE2B_PERSONALBYTES];  // 64
  } blake2b_param;

-
  ALIGN( 64 ) typedef struct __blake2b_state
+
  BLAKE_ALIGN( 64 ) typedef struct __blake2b_state
  {
    uint64_t h[8];
    uint64_t t[2];
modified libpkg/private/pkg.h
@@ -40,7 +40,6 @@
#include <archive.h>
#include <sqlite3.h>
#include <openssl/sha.h>
-
#include <blake2.h>
#include <stdbool.h>
#include <uthash.h>
#include <utlist.h>