platform abi
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
|
||||
#ifdef __linux__
|
||||
#include "dlfcn.h"
|
||||
#ifdef __GLIBC__
|
||||
#include "execinfo.h"
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#include "dlfcn.h"
|
||||
#endif
|
||||
@@ -119,12 +121,16 @@ PLATFORM_INTERFACE char *Plat_GetExtension( const char *szPath )
|
||||
}
|
||||
PLATFORM_INTERFACE void Plat_MakeDir( const char *szPath, int iPermissions )
|
||||
{
|
||||
#ifndef ACCESSPERMS
|
||||
#define ACCESSPERMS 0777
|
||||
#endif
|
||||
mkdir(szPath, ACCESSPERMS);
|
||||
}
|
||||
|
||||
PLATFORM_INTERFACE void Plat_Backtrace( void )
|
||||
{
|
||||
#ifdef __linux__
|
||||
#ifdef __GLIBC__
|
||||
void *buffer[64];
|
||||
int nptrs = backtrace(buffer, 64);
|
||||
char **symbols = backtrace_symbols(buffer, nptrs);
|
||||
@@ -140,6 +146,7 @@ PLATFORM_INTERFACE void Plat_Backtrace( void )
|
||||
|
||||
free(symbols);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __WIN32__
|
||||
/*
|
||||
void* buffer[64];
|
||||
|
||||
Reference in New Issue
Block a user