From 5e19e65655b8a0e7c2c8e3968777cbfd8b9d3414 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 13 Mar 2009 22:13:21 +0000 Subject: [PATCH] fix compile on OpenBSD 4.4 --- config.h | 3 ++- integer.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 9e881586..de6b0d7f 100644 --- a/config.h +++ b/config.h @@ -128,8 +128,9 @@ const lword LWORD_MAX = W64LIT(0xffffffffffffffff); #else #define CRYPTOPP_NATIVE_DWORD_AVAILABLE #if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64) || defined(__sparc64__) - #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) + #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !(CRYPTOPP_GCC_VERSION == 40001 && defined(__APPLE__)) && CRYPTOPP_GCC_VERSION >= 30400 // GCC 4.0.1 on MacOS X is missing __umodti3 and __udivti3 + // mode(TI) division broken on amd64 with GCC earlier than GCC 3.4 typedef word32 hword; typedef word64 word; typedef __uint128_t dword; diff --git a/integer.cpp b/integer.cpp index 732e2689..9adb745b 100644 --- a/integer.cpp +++ b/integer.cpp @@ -525,7 +525,7 @@ extern "C" { int Baseline_Add(size_t N, word *C, const word *A, const word *B); int Baseline_Sub(size_t N, word *C, const word *A, const word *B); } -#elif defined(CRYPTOPP_X64_ASM_AVAILABLE) && defined(__GNUC__) +#elif defined(CRYPTOPP_X64_ASM_AVAILABLE) && defined(__GNUC__) && defined(CRYPTOPP_WORD128_AVAILABLE) int Baseline_Add(size_t N, word *C, const word *A, const word *B) { word result;