diff --git a/src/libc/stdio/Makefile b/src/libc/stdio/Makefile index 4238c6d..884d5e4 100644 --- a/src/libc/stdio/Makefile +++ b/src/libc/stdio/Makefile @@ -13,7 +13,7 @@ SRCS = ${STDSRC} fgetc.c fgets.c fputc.c fputs.c gets.c puts.c \ OBJS = ${STDOBJ} fgetc.o fgets.o fputc.o fputs.o gets.o puts.o \ feof.o ferror.o fileno.o -STDSRC = clrerr.c doscan.c exit.c fdopen.c filbuf.c findiop.c \ +STDSRC = clrerr.c doscan.c exit.c clnup.c fdopen.c filbuf.c findiop.c \ flsbuf.c fopen.c fprintf.c fread.c freopen.c fseek.c \ ftell.c fwrite.c getchar.c getw.c printf.c putchar.c putw.c \ rew.c scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c sprintf.c \ diff --git a/src/libc/stdio/clnup.c b/src/libc/stdio/clnup.c new file mode 100644 index 0000000..6d8832e --- /dev/null +++ b/src/libc/stdio/clnup.c @@ -0,0 +1,8 @@ +/* + * This stub is linked in, when application uses no stdio calls. + */ +__attribute__((weak)) +void _cleanup() +{ + /* Nothing to do. */ +} diff --git a/src/libc/stdio/exit.c b/src/libc/stdio/exit.c index 4f7624b..eab715f 100644 --- a/src/libc/stdio/exit.c +++ b/src/libc/stdio/exit.c @@ -3,14 +3,7 @@ int errno; -/* - * This stub is linked in, when application uses no stdio calls. - */ -__attribute__((weak)) -void _cleanup() -{ - /* Nothing to do. */ -} +extern void _cleanup(); void exit (code)