summaryrefslogtreecommitdiff
path: root/libc/stdio/fputs.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/stdio/fputs.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/stdio/fputs.c')
-rw-r--r--libc/stdio/fputs.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/libc/stdio/fputs.c b/libc/stdio/fputs.c
index 64e7fd57f..b9dabee30 100644
--- a/libc/stdio/fputs.c
+++ b/libc/stdio/fputs.c
@@ -7,6 +7,11 @@
#include "_stdio.h"
+libc_hidden_proto(fputs_unlocked)
+
+libc_hidden_proto(strlen)
+libc_hidden_proto(fwrite_unlocked)
+
/* Note: The standard says fputs returns a nonnegative number on
* success. In this implementation, we return the length of the
* string written on success.
@@ -14,35 +19,37 @@
#ifdef __DO_UNLOCKED
-int attribute_hidden __fputs_unlocked(register const char * __restrict s,
+int fputs_unlocked(register const char * __restrict s,
FILE * __restrict stream)
{
- size_t n = __strlen(s);
+ size_t n = strlen(s);
- return ((__fwrite_unlocked(s, 1, n, stream) == n) ? n : EOF);
+ return ((fwrite_unlocked(s, 1, n, stream) == n) ? n : EOF);
}
+libc_hidden_def(fputs_unlocked)
-weak_alias(__fputs_unlocked,fputs_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-hidden_strong_alias(__fputs_unlocked,__fputs)
-weak_alias(__fputs_unlocked,fputs)
+strong_alias(fputs_unlocked,fputs)
+libc_hidden_proto(fputs)
+libc_hidden_def(fputs)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-int attribute_hidden __fputs(const char * __restrict s, register FILE * __restrict stream)
+int fputs(const char * __restrict s, register FILE * __restrict stream)
{
int retval;
__STDIO_AUTO_THREADLOCK_VAR;
__STDIO_AUTO_THREADLOCK(stream);
- retval = __fputs_unlocked(s, stream);
+ retval = fputs_unlocked(s, stream);
__STDIO_AUTO_THREADUNLOCK(stream);
return retval;
}
-strong_alias(__fputs,fputs)
+libc_hidden_proto(fputs)
+libc_hidden_def(fputs)
#endif