summaryrefslogtreecommitdiff
path: root/libc/stdio/fgetc.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-09-22 00:43:18 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-09-22 00:43:18 +0000
commitf8d5244380826053b8c75b3c302d39bdd1f9a121 (patch)
tree3c9d81358dce8e98a9b85ab840f0c657db7b4c17 /libc/stdio/fgetc.c
parent3ae4f469bfd1fd10fc3e148f75cb9ba4eff9ecdb (diff)
weaks moved after the related function so gcc4 won't warn
Diffstat (limited to 'libc/stdio/fgetc.c')
-rw-r--r--libc/stdio/fgetc.c20
1 files changed, 9 insertions, 11 deletions
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