Browse Source

engine: drop XASH_DYNAMIC_DLADDR

pull/2/head
Alibek Omarov 2 years ago
parent
commit
ba039b8e71
  1. 18
      engine/common/crashhandler.c
  2. 18
      engine/platform/posix/lib_posix.c

18
engine/common/crashhandler.c

@ -334,24 +334,6 @@ void Sys_RestoreCrashHandler( void ) @@ -334,24 +334,6 @@ void Sys_RestoreCrashHandler( void )
static struct sigaction oldFilter;
#ifdef XASH_DYNAMIC_DLADDR
static int d_dladdr( void *sym, Dl_info *info )
{
static int (*dladdr_real) ( void *sym, Dl_info *info );
if( !dladdr_real )
dladdr_real = dlsym( (void*)(size_t)(-1), "dladdr" );
memset( info, 0, sizeof( *info ) );
if( !dladdr_real )
return -1;
return dladdr_real( sym, info );
}
#define dladdr d_dladdr
#endif
static int Sys_PrintFrame( char *buf, int len, int i, void *addr )
{
Dl_info dlinfo;

18
engine/platform/posix/lib_posix.c

@ -200,24 +200,6 @@ void *COM_FunctionFromName( void *hInstance, const char *pName ) @@ -200,24 +200,6 @@ void *COM_FunctionFromName( void *hInstance, const char *pName )
return COM_GetProcAddress( hInstance, pName );
}
#ifdef XASH_DYNAMIC_DLADDR
static int d_dladdr( void *sym, Dl_info *info )
{
static int (*dladdr_real) ( void *sym, Dl_info *info );
if( !dladdr_real )
dladdr_real = dlsym( (void*)(size_t)(-1), "dladdr" );
memset( info, 0, sizeof( *info ) );
if( !dladdr_real )
return -1;
return dladdr_real( sym, info );
}
#define dladdr d_dladdr
#endif
const char *COM_NameForFunction( void *hInstance, void *function )
{
#ifdef XASH_DLL_LOADER

Loading…
Cancel
Save