Repository: commons-crypto Updated Branches: refs/heads/master 2ad69f913 -> 24719f352
CRYPTO-47: fix build of mac os Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/24719f35 Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/24719f35 Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/24719f35 Branch: refs/heads/master Commit: 24719f352f3ded737804e3a5f79b01b821cf2081 Parents: 2ad69f9 Author: Sun Dapeng <s...@apache.org> Authored: Tue May 3 16:44:21 2016 +0800 Committer: Sun Dapeng <s...@apache.org> Committed: Tue May 3 16:44:21 2016 +0800 ---------------------------------------------------------------------- lib/include/config.h | 10 +++++++++- .../org/apache/commons/crypto/org_apache_commons_crypto.h | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/24719f35/lib/include/config.h ---------------------------------------------------------------------- diff --git a/lib/include/config.h b/lib/include/config.h index 77cfa79..6cfe452 100755 --- a/lib/include/config.h +++ b/lib/include/config.h @@ -18,5 +18,13 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.so" + +#if defined(WINDOWS) + #define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.dll" +#elif defined(MAC_OS) + #define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.dylib" +#else + #define COMMONS_CRYPTO_OPENSSL_LIBRARY "libcrypto.so" +#endif + #endif // __CONFIG_H http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/24719f35/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h ---------------------------------------------------------------------- diff --git a/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h b/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h index f8cdd1e..71ea6fd 100644 --- a/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h +++ b/src/main/native/org/apache/commons/crypto/org_apache_commons_crypto.h @@ -32,6 +32,10 @@ #define UNIX #endif +#if defined(__APPLE__) +#define MAC_OS +#endif + /* A helper macro to 'throw' a java exception. */ #define THROW(env, exception_name, message) \ { \