mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-26 19:48:01 +02:00
Tiny ReleaseNoRT test
This commit is contained in:
parent
dea665055e
commit
7656d94ff5
4 changed files with 43 additions and 2 deletions
|
@ -646,12 +646,14 @@ namespace System
|
|||
{
|
||||
static function void*(int) sMallocFunc;
|
||||
static function void(void*) sFreeFunc;
|
||||
static function void(char8) sPutChar;
|
||||
|
||||
static this()
|
||||
{
|
||||
var lib = Windows.LoadLibraryA("msvcrt.dll");
|
||||
sMallocFunc = (.)Windows.GetProcAddress(lib, "malloc");
|
||||
sFreeFunc = (.)Windows.GetProcAddress(lib, "free");
|
||||
sPutChar = (.)Windows.GetProcAddress(lib, "putchar");
|
||||
}
|
||||
|
||||
/*[LinkName(.C), AlwaysInclude]
|
||||
|
@ -672,6 +674,12 @@ namespace System
|
|||
sFreeFunc(ptr);
|
||||
}
|
||||
|
||||
[LinkName(.C), AlwaysInclude]
|
||||
static void putchar(char8 c)
|
||||
{
|
||||
sPutChar(c);
|
||||
}
|
||||
|
||||
[LinkName(.C), AlwaysInclude]
|
||||
static void memset(void* dest, uint8 val, int size)
|
||||
{
|
||||
|
@ -735,10 +743,15 @@ namespace System
|
|||
[LinkName(.C), AlwaysInclude]
|
||||
static void mainCRTStartup()
|
||||
{
|
||||
//WinMain(null, null, "hi", 1);
|
||||
main(0, null);
|
||||
}
|
||||
|
||||
/*[LinkName(.C), AlwaysInclude]
|
||||
static void WinMainCRTStartup()
|
||||
{
|
||||
//WinMain(null, null, "hi", 1);
|
||||
}*/
|
||||
|
||||
[LinkName(.C), Export]
|
||||
static int32 _tls_index;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue