25 #ifndef SYSTEM_DLLMAIN_ICPP
26 #define SYSTEM_DLLMAIN_ICPP 1
31 #if !defined( __APPLE__ )
37 static void finalize(
void* hinstDLL );
41 #if defined( _WIN32 ) && defined( _DLL )
53 win::BOOL APIENTRY DllMain( win::HINSTANCE hinstDLL,
55 win::LPVOID lpvReserved
58 switch ( fdwReason ) {
59 case DLL_PROCESS_ATTACH: {
62 case DLL_THREAD_ATTACH:
64 case DLL_THREAD_DETACH:
66 case DLL_PROCESS_DETACH: {
76 static void _init() __attribute__( ( constructor ) );
77 static
void _fini() __attribute__( ( destructor ) );
81 #elif defined( __APPLE__ )
82 static void _init() __attribute__( ( constructor ) );
83 static
void _fini() __attribute__( ( destructor ) );
94 #endif // SYSTEM_DLLMAIN_ICPP