libs/alloca: add alloca implement for MSVC
Reference: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=msvc-170 Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
01cc1687b3
commit
3a9088c144
@ -32,6 +32,11 @@
|
|||||||
# undef __alloca
|
# undef __alloca
|
||||||
# define alloca(size) __alloca(size)
|
# define alloca(size) __alloca(size)
|
||||||
# define __alloca(size) __builtin_alloca(size)
|
# define __alloca(size) __builtin_alloca(size)
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
# undef alloca
|
||||||
|
# undef __alloca
|
||||||
|
# define alloca(size) _alloca(size)
|
||||||
|
# define __alloca(size) _alloca(size)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __INCLUDE_ALLOCA_H */
|
#endif /* __INCLUDE_ALLOCA_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user