libc.obj: add atexit test
This commit is contained in:
@@ -27,7 +27,8 @@ BIN = \
|
|||||||
libc_test.kex \
|
libc_test.kex \
|
||||||
pipe.kex \
|
pipe.kex \
|
||||||
defgen.kex \
|
defgen.kex \
|
||||||
futex.kex
|
futex.kex \
|
||||||
|
atexit_test.kex
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
|
|
||||||
|
|||||||
18
programs/develop/ktcc/trunk/libc.obj/samples/atexit_test.c
Normal file
18
programs/develop/ktcc/trunk/libc.obj/samples/atexit_test.c
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void f()
|
||||||
|
{
|
||||||
|
static int c = 1;
|
||||||
|
printf("exit #%d\n", c);
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
atexit(&f);
|
||||||
|
atexit(&f);
|
||||||
|
atexit(&f);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -23,5 +23,6 @@ cp clayer/logo.png /tmp0/1/tcc_samples/logo.png
|
|||||||
../tcc defgen.c -o /tmp0/1/tcc_samples/defgen
|
../tcc defgen.c -o /tmp0/1/tcc_samples/defgen
|
||||||
../tcc pipe.c -o /tmp0/1/tcc_samples/pipe
|
../tcc pipe.c -o /tmp0/1/tcc_samples/pipe
|
||||||
../tcc futex.c -o /tmp0/1/tcc_samples/futex
|
../tcc futex.c -o /tmp0/1/tcc_samples/futex
|
||||||
|
../tcc atexit_test.c -o /tmp0/1/tcc_samples/atexit_test
|
||||||
"/sys/File managers/Eolite" /tmp0/1/tcc_samples
|
"/sys/File managers/Eolite" /tmp0/1/tcc_samples
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in New Issue
Block a user