From c5c97e2cce16d4b025d00b5069c92f65f219a425 Mon Sep 17 00:00:00 2001 From: Matt Shen Date: Wed, 5 Feb 2014 10:27:14 -0800 Subject: [PATCH 1/2] Guard malloc includes for Apple --- scrypt-jane.cpp | 4 +++- scrypt.cpp | 4 +++- sha3.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scrypt-jane.cpp b/scrypt-jane.cpp index 9e110f6..338425b 100644 --- a/scrypt-jane.cpp +++ b/scrypt-jane.cpp @@ -22,7 +22,9 @@ #define scrypt_maxp 25 /* (1 << 25) = ~33 million */ #include -#include +#ifndef __APPLE__ + #include +#endif // ---------------------------- BEGIN keccak functions ------------------------------------ diff --git a/scrypt.cpp b/scrypt.cpp index 5df43d4..bbb33a3 100644 --- a/scrypt.cpp +++ b/scrypt.cpp @@ -44,7 +44,9 @@ using namespace Concurrency; #include #include -#include +#ifndef __APPLE__ + #include +#endif #include // A thin wrapper around the builtin __m128i type diff --git a/sha3.cpp b/sha3.cpp index 02b40ca..871f05c 100644 --- a/sha3.cpp +++ b/sha3.cpp @@ -6,7 +6,9 @@ #include #include -#include +#ifndef __APPLE__ + #include +#endif #include "sha3.h" From b610328055b156924e8525f90836b86a3f406b89 Mon Sep 17 00:00:00 2001 From: Matt Shen Date: Wed, 5 Feb 2014 18:16:40 -0800 Subject: [PATCH 2/2] Find CUDA correctly for OS X --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 3fa5c84..0fff952 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ AC_CONFIG_FILES([ dnl find out what version we are running ARCH=`uname -m` +OS=`uname` if [[ $ARCH == "x86_64" ]]; then SUFFIX="64" @@ -138,6 +139,11 @@ else SUFFIX="" fi +if [[ $OS == "Darwin" ]]; +then + SUFFIX="" +fi + dnl Setup CUDA paths AC_ARG_WITH([cuda], [ --with-cuda=PATH prefix where cuda is installed [default=/usr/local/cuda]])