summaryrefslogtreecommitdiffstats
path: root/libc/stdio/fileno.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/fileno.c
parent292e2d7a707449b531422d37cec4608d304da24e (diff)
downloaduClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.bz2
uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/stdio/fileno.c')
-rw-r--r--libc/stdio/fileno.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libc/stdio/fileno.c b/libc/stdio/fileno.c
index bc1ade952..929936bfd 100644
--- a/libc/stdio/fileno.c
+++ b/libc/stdio/fileno.c
@@ -7,9 +7,11 @@
#include "_stdio.h"
+libc_hidden_proto(fileno_unlocked)
+
#ifdef __DO_UNLOCKED
-int attribute_hidden __fileno_unlocked(register FILE *stream)
+int fileno_unlocked(register FILE *stream)
{
__STDIO_STREAM_VALIDATE(stream);
@@ -20,27 +22,30 @@ int attribute_hidden __fileno_unlocked(register FILE *stream)
__set_errno(EBADF);
return -1;
}
+libc_hidden_def(fileno_unlocked)
-weak_alias(__fileno_unlocked,fileno_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-hidden_weak_alias(__fileno_unlocked,__fileno)
-weak_alias(__fileno_unlocked,fileno)
+libc_hidden_proto(fileno)
+strong_alias(fileno_unlocked,fileno)
+libc_hidden_def(fileno)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-int attribute_hidden __fileno(register FILE *stream)
+libc_hidden_proto(fileno)
+int fileno(register FILE *stream)
{
int retval;
__STDIO_AUTO_THREADLOCK_VAR;
__STDIO_AUTO_THREADLOCK(stream);
- retval = __fileno_unlocked(stream);
+ retval = fileno_unlocked(stream);
__STDIO_AUTO_THREADUNLOCK(stream);
return retval;
}
-strong_alias(__fileno,fileno)
+libc_hidden_def(fileno)
+
#endif