#if defined(__unix__) || defined(__APPLE__)
#define bool _bool
#include <utime.h>
+#if !defined(__pnacl__)
#include <dlfcn.h>
+#endif
#if defined(__APPLE__)
#include <mach-o/dyld.h>
#endif
}
fclose(f);
}
-#if !defined(ECERE_NOFILE) && !defined(__linux__) && !defined(__EMSCRIPTEN__)
+#if !defined(ECERE_NOFILE) && !defined(__linux__) && !defined(__EMSCRIPTEN__) && !defined(__pnacl__)
if(name && name[0])
{
// Couldn't locate libraries with /proc/curmap/map, attempt with ldd
void Instance_COM_Initialize(int argc, char ** argv, char ** parsedCommand, int * argcPtr, const char *** argvPtr)
{
-#if !defined(__WIN32__) && !defined(__EMSCRIPTEN__) && !defined(ECERE_BOOTSTRAP)
+#if !defined(__WIN32__) && !defined(__EMSCRIPTEN__) && !defined(ECERE_BOOTSTRAP) && !defined(__pnacl__)
// Disable stdout buffering on Unix
setvbuf(stdout, null, _IONBF, 0);
#endif
strcat(fileName, ".so");
#endif
-#if !defined(__EMSCRIPTEN__)
+#if !defined(__EMSCRIPTEN__) && !defined(__pnacl__)
library = dlopen(fileName, RTLD_LAZY);
#endif
while(!library && attempts < sizeof(paths)/sizeof(paths[0]))
#else
strcat(fileName, ".so");
#endif
-#if !defined(__EMSCRIPTEN__)
+#if !defined(__EMSCRIPTEN__) && !defined(__pnacl__)
library = dlopen(fileName, RTLD_LAZY);
#endif
}
{
*Load = dlsym(library, "__ecereDll_Load");
*Unload = dlsym(library, "__ecereDll_Unload");
-#if !defined(__EMSCRIPTEN__)
+#if !defined(__EMSCRIPTEN__) && !defined(__pnacl__)
if(!*Load)
dlclose(library);
#endif
#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
if(library)
FreeLibrary(library);
-#elif (defined(__unix__) || defined(__APPLE__)) && !defined(__EMSCRIPTEN__)
+#elif (defined(__unix__) || defined(__APPLE__)) && !defined(__EMSCRIPTEN__) && !defined(__pnacl__)
if(library)
dlclose(library);
#endif