summaryrefslogtreecommitdiff
path: root/libc/stdio/puts.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/puts.c')
-rw-r--r--libc/stdio/puts.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/stdio/puts.c b/libc/stdio/puts.c
index 3a510325b..08525b2f6 100644
--- a/libc/stdio/puts.c
+++ b/libc/stdio/puts.c
@@ -7,6 +7,9 @@
#include "_stdio.h"
+libc_hidden_proto(__fputc_unlocked)
+libc_hidden_proto(fputs_unlocked)
+
int puts(register const char * __restrict s)
{
register FILE *stream = stdout; /* This helps bcc optimize. */
@@ -20,9 +23,9 @@ int puts(register const char * __restrict s)
* then we could have a newline in the buffer of an LBF stream. */
/* Note: Nonportable as fputs need only return nonnegative on success. */
- if ((n = __fputs_unlocked(s, stream)) != EOF) {
+ if ((n = fputs_unlocked(s, stream)) != EOF) {
++n;
- if (__fputc_unlocked_internal('\n', stream) == EOF) {
+ if (__fputc_unlocked('\n', stream) == EOF) {
n = EOF;
}
}