Handle __STDC_HOSTED__ == 0
This commit is contained in:
parent
5736c02eb1
commit
692088e6f3
3 changed files with 23 additions and 9 deletions
17
axl_memory.c
17
axl_memory.c
|
|
@ -322,3 +322,20 @@ void axl_free(void* ptr)
|
|||
|
||||
nomad_handle = axl_mb_to_id(free_block);
|
||||
}
|
||||
|
||||
#if !defined(__STDC_HOSTED__) || __STDC_HOSTED__ == 0
|
||||
void* memset(void* s, int c, size_t n)
|
||||
{
|
||||
return axl_memset(s, (i8)c, n);
|
||||
}
|
||||
|
||||
void* memcpy(void* dst, const void* src, unsigned long long count)
|
||||
{
|
||||
return axl_memcpy(dst, src, (u32)count);
|
||||
}
|
||||
|
||||
void* memmove(void* dst, const void* src, size_t n)
|
||||
{
|
||||
return axl_memmove(dst, src, n);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,4 +17,10 @@ void* axl_memchr(const void* ptr, u8 value, u32 n);
|
|||
void* axl_memmove(void* dst, const void* src, u32 n);
|
||||
void axl_free(void* ptr);
|
||||
|
||||
#if !defined(__STDC_HOSTED__) || __STDC_HOSTED__ == 0
|
||||
void* memset(void* s, int c, size_t n);
|
||||
void* memcpy(void* dst, const void* src, unsigned long long count);
|
||||
void* memmove(void* dst, const void* src, size_t n);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
9
main.c
9
main.c
|
|
@ -7,15 +7,6 @@
|
|||
#include "axl_types.h"
|
||||
#include <windows.h>
|
||||
|
||||
void* memset(void *s, int c, size_t n)
|
||||
{
|
||||
return axl_memset(s, (i8)c, n);
|
||||
}
|
||||
|
||||
void* memcpy(void* dst, const void * src, unsigned long long count)
|
||||
{
|
||||
return axl_memcpy(dst, src, (u32)count);
|
||||
}
|
||||
|
||||
int _start(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue