mirror of
git://git.musl-libc.org/musl
synced 2024-11-27 12:04:14 +08:00
a56ec7e8e2
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
|