I am porting a DLL from Windows to Linux (OS X actually). I used this StackOverflow article to do that change.
i.e. I've ported the Windows "bool DllMain()" to the Linux way:
__attribute__((constructor)) void dllLoad();
__attribute__((destructor)) void dllUnload();
... but both are void return types. I need to be able to do the same as Windows and return FALSE if a condition isn't met in the constructor so that the dlopen() fails and the .so doesn't load.
How do I get the calling dlopen() to fail?