summaryrefslogtreecommitdiffstats
path: root/libc/stdio/fgets.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-26 03:57:14 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-26 03:57:14 +0000
commit9921832fa13cef31006cfa69bc5574636c36ac0f (patch)
tree4faa87a1fbc9842126d3bdc61c0d64285ebcc849 /libc/stdio/fgets.c
parent292e2d7a707449b531422d37cec4608d304da24e (diff)
downloaduClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.bz2
uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/stdio/fgets.c')
-rw-r--r--libc/stdio/fgets.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c
index 5baf63a58..5acaf91ed 100644
--- a/libc/stdio/fgets.c
+++ b/libc/stdio/fgets.c
@@ -7,9 +7,13 @@
#include "_stdio.h"
+libc_hidden_proto(fgets_unlocked)
+
#ifdef __DO_UNLOCKED
-char attribute_hidden *__fgets_unlocked(char *__restrict s, int n,
+libc_hidden_proto(__fgetc_unlocked)
+
+char *fgets_unlocked(char *__restrict s, int n,
register FILE * __restrict stream)
{
register char *p;
@@ -34,7 +38,7 @@ char attribute_hidden *__fgets_unlocked(char *__restrict s, int n,
break;
}
} else {
- if ((c = __fgetc_unlocked_internal(stream)) == EOF) {
+ if ((c = __fgetc_unlocked(stream)) == EOF) {
if (__FERROR_UNLOCKED(stream)) {
goto ERROR;
}
@@ -57,17 +61,18 @@ char attribute_hidden *__fgets_unlocked(char *__restrict s, int n,
ERROR:
return NULL;
}
-
-weak_alias(__fgets_unlocked,fgets_unlocked)
+libc_hidden_def(fgets_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-hidden_strong_alias(__fgets_unlocked,__fgets)
-weak_alias(__fgets_unlocked,fgets)
+libc_hidden_proto(fgets)
+strong_alias(fgets_unlocked,fgets)
+libc_hidden_def(fgets)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-char attribute_hidden *__fgets(char *__restrict s, int n,
+libc_hidden_proto(fgets)
+char *fgets(char *__restrict s, int n,
register FILE * __restrict stream)
{
char *retval;
@@ -75,12 +80,12 @@ char attribute_hidden *__fgets(char *__restrict s, int n,
__STDIO_AUTO_THREADLOCK(stream);
- retval = __fgets_unlocked(s, n, stream);
+ retval = fgets_unlocked(s, n, stream);
__STDIO_AUTO_THREADUNLOCK(stream);
return retval;
}
-strong_alias(__fgets,fgets)
+libc_hidden_def(fgets)
#endif