mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-23 13:44:11 +03:00

This enables alternative compilers, which may not define __GNUC__, to implement alloca, which is still fairly widely used. This is similar to how stdarg.h already works in musl; compilers must implement __builtin_va_arg, there is no fallback definition.
20 lines
219 B
C
20 lines
219 B
C
#ifndef _ALLOCA_H
|
|
#define _ALLOCA_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define __NEED_size_t
|
|
#include <bits/alltypes.h>
|
|
|
|
void *alloca(size_t);
|
|
|
|
#define alloca __builtin_alloca
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|