*/
#include "server.h"
+#include "globaldefs.h"
#include "debugging/debugging.h"
#include "warnings.h"
}
void registerModule( const char* type, int version, const char* name, Module& module ){
- ASSERT_NOTNULL( &module );
if ( !m_modules.insert( Modules_::value_type( ModuleKey( ModuleType( type, version ), name ), &module ) ).second ) {
globalErrorStream() << "module already registered: type=" << makeQuoted( type ) << " name=" << makeQuoted( name ) << "\n";
}
};
-#if defined( WIN32 )
+#if GDEF_OS_WINDOWS
#include <windows.h>
-#define FORMAT_BUFSIZE 2048
+const int FORMAT_BUFSIZE = 2048;
const char* FormatGetLastError(){
static char buf[FORMAT_BUFSIZE];
FormatMessage(
}
};
-#elif defined( POSIX )
+#elif GDEF_OS_POSIX
#include <dlfcn.h>
-class DynamicLibrary
-{
-void* m_library;
+class DynamicLibrary {
+ void *m_library;
public:
typedef int ( *FunctionPointer )();
DynamicLibrary( const char* filename ){
- m_library = dlopen( filename, RTLD_NOW | (RTLD_DEEPBIND + 0) );
+ m_library = dlopen( filename, RTLD_NOW );
}
~DynamicLibrary(){
if ( !failed() ) {