Commit 8df8e5d6 authored by pruthvi's avatar pruthvi

- used eplicit macro's to test linux and mac platform for path lookup

parent 09214c71
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#else #elif defined(__linux) || defined(__APPLE__)
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
...@@ -47,7 +47,7 @@ static string find_my_pathname() ...@@ -47,7 +47,7 @@ static string find_my_pathname()
path = file_util::get_directory(path); path = file_util::get_directory(path);
path += "/"; path += "/";
return path; return path;
#else #elif defined(__linux) || defined(__APPLE__)
Dl_info dl_info; Dl_info dl_info;
dladdr(reinterpret_cast<void*>(find_my_pathname), &dl_info); dladdr(reinterpret_cast<void*>(find_my_pathname), &dl_info);
return dl_info.dli_fname; return dl_info.dli_fname;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment