[arrayfire] 04/41: BUGFIX: Append so names when loading the libraries in unified backend.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 21 14:56:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 3f3e5c5df39d2612757f00bedf01601c5ca64eb3
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Thu Mar 3 14:44:44 2016 -0500
BUGFIX: Append so names when loading the libraries in unified backend.
---
src/api/unified/symbol_manager.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/api/unified/symbol_manager.cpp b/src/api/unified/symbol_manager.cpp
index 96cec0b..ef92cd3 100644
--- a/src/api/unified/symbol_manager.cpp
+++ b/src/api/unified/symbol_manager.cpp
@@ -12,6 +12,7 @@
#include <vector>
#include <string>
#include <cmath>
+#include <af/version.h>
using std::string;
using std::replace;
@@ -25,12 +26,15 @@ static const string LIB_AF_BKND_PREFIX = "af";
static const string LIB_AF_BKND_SUFFIX = ".dll";
#define RTLD_LAZY 0
#else
-static const string LIB_AF_BKND_PREFIX = "libaf";
#if defined(__APPLE__)
-static const string LIB_AF_BKND_SUFFIX = ".dylib";
+#define SO_SUFFIX_HELPER(VER) "." #VER ".dylib"
#else
-static const string LIB_AF_BKND_SUFFIX = ".so";
+#define SO_SUFFIX_HELPER(VER) ".so." #VER
#endif // APPLE
+static const string LIB_AF_BKND_PREFIX = "libaf";
+
+#define GET_SO_SUFFIX(VER) SO_SUFFIX_HELPER(VER)
+static const string LIB_AF_BKND_SUFFIX = GET_SO_SUFFIX(AF_VERSION_MAJOR);
#endif
static const string LIB_AF_ENVARS[NUM_ENV_VARS] = {"AF_PATH", "AF_BUILD_PATH"};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list