This commit is contained in:
Бранимир Караџић
2024-06-16 15:53:44 -07:00
parent 747e6b77eb
commit 03fe74eafb
10 changed files with 44 additions and 39 deletions

View File

@@ -11,7 +11,7 @@
#if BX_CRT_NONE
#include "crt0.h"
#include <bx/crt0.h>
#define NOT_IMPLEMENTED() \
{ bx::debugPrintf("crtnone: %s not implemented\n", BX_FUNCTION); abort(); }
@@ -511,6 +511,18 @@ extern "C" int prctl(int _option, unsigned long _arg2, unsigned long _arg3, unsi
return -1;
}
extern "C" int getpid()
{
return crt0::processGetId();
}
extern "C" ssize_t readlink(const char* _pathName, char* _buffer, size_t _bufferSize)
{
BX_UNUSED(_pathName, _buffer, _bufferSize);
NOT_IMPLEMENTED();
return 0;
}
extern "C" int chdir(const char* _path)
{
BX_UNUSED(_path);
@@ -635,6 +647,16 @@ void operator delete(void*, size_t)
{
}
extern "C" void* __cxa_begin_catch(void* _unwindArg)
{
BX_UNUSED(_unwindArg);
return NULL;
}
extern "C" void __cxa_end_catch()
{
}
extern "C" void __cxa_pure_virtual(void)
{
}

View File

@@ -9,7 +9,7 @@
#include <inttypes.h> // PRIx*
#if BX_CRT_NONE
# include "crt0.h"
# include <bx/crt0.h>
#elif BX_PLATFORM_ANDROID
# include <android/log.h>
#elif BX_PLATFORM_WINDOWS \

View File

@@ -14,7 +14,7 @@
#endif // BX_CONFIG_CRT_DIRECTORY_READER
#if BX_CRT_NONE
# include "crt0.h"
# include <bx/crt0.h>
#else
# if BX_CONFIG_CRT_DIRECTORY_READER
# include <dirent.h>

View File

@@ -7,13 +7,11 @@
#include <bx/os.h>
#include <bx/readerwriter.h>
#if !BX_CRT_NONE
# if BX_CRT_MSVC
# include <direct.h> // _getcwd
# else
# include <unistd.h> // getcwd
# endif // BX_CRT_MSVC
#endif // !BX_CRT_NONE
#if BX_CRT_MSVC
# include <direct.h> // _getcwd
#else
# include <unistd.h> // getcwd
#endif // BX_CRT_MSVC
#if BX_PLATFORM_WINDOWS
#if !defined(GetModuleFileName)

View File

@@ -9,7 +9,7 @@
#if BX_CRT_NONE
# include <bx/cpu.h>
# include "crt0.h"
# include <bx/crt0.h>
#elif BX_PLATFORM_ANDROID \
|| BX_PLATFORM_LINUX \
|| BX_PLATFORM_IOS \

View File

@@ -13,7 +13,7 @@
#endif
#if BX_CRT_NONE
# include "crt0.h"
# include <bx/crt0.h>
#elif BX_PLATFORM_ANDROID \
|| BX_PLATFORM_LINUX \
|| BX_PLATFORM_IOS \

View File

@@ -6,7 +6,7 @@
#include <bx/timer.h>
#if BX_CRT_NONE
# include "crt0.h"
# include <bx/crt0.h>
#elif BX_PLATFORM_ANDROID
# include <time.h> // clock, clock_gettime
#elif BX_PLATFORM_EMSCRIPTEN