Merge branch 'alloca' into 'master'

Implement alloca.h

See merge request redox-os/relibc!180
This commit is contained in:
Jeremy Soller
2018-11-25 15:24:56 +00:00
5 changed files with 20 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
#ifndef _ALLOCA_H
#define _ALLOCA_H
#define alloca(size) __builtin_alloca (size)
#endif /* _ALLOCA_H */
+1
View File
@@ -1,5 +1,6 @@
# Binaries that should generate the same output every time
EXPECT_BINS=\
alloca \
args \
arpainet \
assert \
+12
View File
@@ -0,0 +1,12 @@
#include <alloca.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char ** argv) {
char *str = (char *) alloca(17);
memset(str, 'A', 16);
str[16] = '\0';
printf("%s\n", str);
}
View File
+1
View File
@@ -0,0 +1 @@
AAAAAAAAAAAAAAAA