Bugfix: in javascript interpreter load extensions on MacOSX correctly.

This commit is contained in:
Oliver Buchtala 2013-01-18 15:34:11 +01:00
commit 4ac7065c3b

View file

@ -6,11 +6,16 @@
#include <stdlib.h>
#ifdef __GNUC__
#ifdef __APPLE__
#define LIBRARY_EXT ".dylib"
#else
#define LIBRARY_EXT ".so"
#endif
#include <dlfcn.h>
#define LOAD_LIBRARY(name) dlopen(name, RTLD_LAZY)
#define CLOSE_LIBRARY(handle) dlclose(handle)
#define LIBRARY_ERROR dlerror
#define LIBRARYFILE(name) std::string("lib").append(name).append(".so")
#define LIBRARYFILE(name) std::string("lib").append(name).append(LIBRARY_EXT)
#else
#error "implement dll loading"
#endif