A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Set SIMGRID NEED GETLINE for Mac.
[simgrid.git]
/
buildtools
/
CPACK
/
prog_test
/
prog_stackgrowth.c
1
#include <stdio.h>
2
#include <stdlib.h>
3
static int iterate = 10;
4
static int growsdown(int *x)
5
{
6
auto int y;
7
y = (x > &y);
8
if (--iterate > 0)
9
y = growsdown(&y);
10
if (y != (x > &y))
11
exit(1);
12
return y;
13
}
14
int main(int argc, char *argv[])
15
{
16
FILE *f;
17
auto int x;
18
if ((f = fopen("conftestval", "w")) == NULL)
19
exit(1);
20
fprintf(f, "%s\n", growsdown(&x) ? "down" : "up");;
21
fclose(f);
22
exit(0);
23
return 1;
24
}