diff options
| author | Amlal El Mahrouss <zka-holder@mahrouss-logic.com> | 2024-09-30 10:33:13 +0000 |
|---|---|---|
| committer | Amlal El Mahrouss <zka-holder@mahrouss-logic.com> | 2024-09-30 10:33:13 +0000 |
| commit | 2d80769d8adb670acf766e5004c44a57b2d6de6a (patch) | |
| tree | 67187473c17e0818432ddfa20ca27b01ff18ac01 /dev/crt | |
| parent | 2b53f63158b244d0a31af638f384d4af0878938d (diff) | |
IMP: CRT and DDK improvements. Add SMS struct.
Diffstat (limited to 'dev/crt')
| -rw-r--r-- | dev/crt/alloca.hxx | 5 | ||||
| -rw-r--r-- | dev/crt/defines.hxx | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/dev/crt/alloca.hxx b/dev/crt/alloca.hxx index fedcb25d..038432be 100644 --- a/dev/crt/alloca.hxx +++ b/dev/crt/alloca.hxx @@ -9,10 +9,11 @@ #pragma once -typedef void* ptr_type; -typedef __SIZE_TYPE__ size_type; +#include <crt/defines.hxx> inline ptr_type __ndk_alloca(size_type sz) { return __builtin_alloca(sz); } + +#define alloca __ndk_alloca
\ No newline at end of file diff --git a/dev/crt/defines.hxx b/dev/crt/defines.hxx index 11a76ded..d9670ac1 100644 --- a/dev/crt/defines.hxx +++ b/dev/crt/defines.hxx @@ -20,6 +20,9 @@ typedef long int ssize_t; typedef int ssize_t; #endif // __LP64__ +typedef void* ptr_type; +typedef __SIZE_TYPE__ size_type; + typedef size_t ptrdiff_t; typedef size_t uintptr_t; typedef void* voidptr_t; @@ -31,10 +34,8 @@ typedef char* caddr_t; #endif // !null #ifdef __GNUC__ -#include <crt/__ndk_alloca.hxx> -#define __ndk_alloca(sz) __ndk_alloca(sz) +#include <crt/alloca.hxx> #elif defined(__NDK__) - #define __alloca(sz) __ndk_alloca(sz) #endif @@ -59,7 +60,7 @@ typedef char* caddr_t; #endif #define __alloca alloca #else -#warning alloca not detected +#warning ! alloca not detected ! #endif typedef long long off_t; @@ -93,8 +94,8 @@ typedef union double_cast { #ifdef __STD_CXX__ -#include <crt/__ndk_exception.hxx> -#include <crt/__ndk_malloc.hxx> +#include <crt/base_exception.hxx> +#include <crt/base_alloc.hxx> #endif // ifdef __STD_CXX__ |
