alloca: provide <alloca.h>

This commit is contained in:
Lephenixnoir 2022-10-30 11:19:26 +01:00
parent 7c4de3e295
commit 1da9d10226
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 24 additions and 0 deletions

3
STATUS
View File

@ -225,6 +225,9 @@ TEST: Function/symbol/macro needs to be tested
7.25 <wctype.h> TODO (not a priority)
(EXT) <alloca.h>
(EXT) alloca -
# Supporting locales
What if we wanted to support more locales?

21
include/alloca.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef __ALLOCA_H__
# define __ALLOCA_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#undef alloca
/* Allocate a block of memory on the stack. */
extern void *alloca(size_t __size);
#define alloca(size) __builtin_alloca(size)
#ifdef __cplusplus
}
#endif
#endif /*__ALLOCA_H__*/