Skip to content
Snippets Groups Projects
Commit a6131541 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'alloca' into 'master'

Implement alloca.h

See merge request redox-os/relibc!180
parents 9790289a 55eb8f27
No related branches found
No related tags found
1 merge request!180Implement alloca.h
Pipeline #1895 passed with warnings
#ifndef _ALLOCA_H
#define _ALLOCA_H
#define alloca(size) __builtin_alloca (size)
#endif /* _ALLOCA_H */
# Binaries that should generate the same output every time
EXPECT_BINS=\
alloca \
args \
arpainet \
assert \
......
#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);
}
AAAAAAAAAAAAAAAA
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment