mirror of
https://github.com/frida/tinycc
synced 2025-01-17 08:49:18 +03:00
win32: malloc.h: use alloca instead of (missing) _alloca
_alloca is not part of msvcrt (and therefore not found if used), and tcc has
an internal implementation for alloca for x86[_64] since d778bde7
- initally
as _alloca and later changed to alloca. Use it instead.
This commit is contained in:
parent
b67951bed4
commit
ab8422c8e7
@ -82,7 +82,13 @@ extern "C" {
|
||||
#undef _alloca
|
||||
#define _alloca(x) __builtin_alloca((x))
|
||||
#else
|
||||
void *__cdecl _alloca(size_t _Size);
|
||||
/* tcc implements alloca internally and exposes it (since commit d778bde7).
|
||||
/* alloca is declared at include/stddef.h (which is distributed with tcc).
|
||||
*/
|
||||
#ifdef _alloca
|
||||
#undef _alloca
|
||||
#endif
|
||||
#define _alloca(x) alloca((x))
|
||||
#endif
|
||||
_CRTIMP size_t __cdecl _get_sbh_threshold(void);
|
||||
_CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);
|
||||
|
Loading…
Reference in New Issue
Block a user