Martin Storsjö : include: Add declarations of _alloca and alloca for MSVC mode.
Module: wine Branch: oldstable Commit: 7ad7d8a2c965a32de1bb9ce43c84b3f9230e52c5 URL: https://gitlab.winehq.org/wine/wine/-/commit/7ad7d8a2c965a32de1bb9ce43c84b3f... Author: Martin Storsjö <martin(a)martin.st> Date: Mon Apr 25 11:46:39 2022 +0300 include: Add declarations of _alloca and alloca for MSVC mode. This fixes builds with recent Clang 15 (which still is in development), which errors out on implicit declarations. Signed-off-by: Martin Storsjö <martin(a)martin.st> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8f8b802e12d458fe97b4c0ddb11e2e5c353c354d) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- include/msvcrt/malloc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index 5bb843be5a6..fcbadbeb4e0 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h @@ -77,6 +77,10 @@ _ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t); _ACRTIMP size_t __cdecl _get_sbh_threshold(void); _ACRTIMP int __cdecl _set_sbh_threshold(size_t size); +#ifdef _MSC_VER +void *_alloca(size_t size); +#endif + #ifdef __cplusplus } #endif @@ -84,6 +88,8 @@ _ACRTIMP int __cdecl _set_sbh_threshold(size_t size); # ifdef __GNUC__ # define _alloca(x) __builtin_alloca((x)) # define alloca(x) __builtin_alloca((x)) +# elif defined(_MSC_VER) +# define alloca(x) _alloca((x)) # endif #endif /* __WINE_MALLOC_H */
participants (1)
-
Alexandre Julliard