History

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.

Avi Halachmi (:avih) committed 10 years ago

Commit ab8422c1 parent b67951b1 file · +7 −1Browse files

Unified · Split

win32/include/malloc.h+7−1
@@ -82,7 +82,13 @@ extern "C" { · 81 unmodified lines
82#undef _alloca82#undef _alloca
83#define _alloca(x) __builtin_alloca((x))83#define _alloca(x) __builtin_alloca((x))
84#else84#else
85 void *__cdecl _alloca(size_t _Size);85 /* tcc implements alloca internally and exposes it (since commit d778bde7).
86 /* alloca is declared at include/stddef.h (which is distributed with tcc).
87 */
88#ifdef _alloca
89#undef _alloca
90#endif
91#define _alloca(x) alloca((x))
86#endif92#endif
87 _CRTIMP size_t __cdecl _get_sbh_threshold(void);93 _CRTIMP size_t __cdecl _get_sbh_threshold(void);
88 _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);94 _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t