musl/include/alloca.h
Michael Forney a56ec7e8e2 unconditonally define alloca as __builtin_alloca
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.
2020-01-01 15:07:11 -05:00

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