From f8d5244380826053b8c75b3c302d39bdd1f9a121 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 22 Sep 2005 00:43:18 +0000 Subject: weaks moved after the related function so gcc4 won't warn --- libc/stdio/fgetc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'libc/stdio/fgetc.c') diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index c672d9fe9..c68c1fdb5 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -12,17 +12,8 @@ #undef getc #undef getc_unlocked -extern int __fgetc_unlocked(FILE *stream); - #ifdef __DO_UNLOCKED -weak_alias(__fgetc_unlocked,fgetc_unlocked); -weak_alias(__fgetc_unlocked,getc_unlocked); -#ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fgetc_unlocked,fgetc); -weak_alias(__fgetc_unlocked,getc); -#endif - int __fgetc_unlocked(FILE *stream) { __STDIO_STREAM_VALIDATE(stream); @@ -78,9 +69,14 @@ int __fgetc_unlocked(FILE *stream) return EOF; } -#elif defined __UCLIBC_HAS_THREADS__ +weak_alias(__fgetc_unlocked,fgetc_unlocked); +weak_alias(__fgetc_unlocked,getc_unlocked); +#ifndef __UCLIBC_HAS_THREADS__ +weak_alias(__fgetc_unlocked,fgetc); +weak_alias(__fgetc_unlocked,getc); +#endif -weak_alias(fgetc,getc); +#elif defined __UCLIBC_HAS_THREADS__ int fgetc(register FILE *stream) { @@ -95,4 +91,6 @@ int fgetc(register FILE *stream) } } +weak_alias(fgetc,getc); + #endif -- cgit v1.2.3