summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/_stdio.h2
-rw-r--r--libc/stdio/popen.c1
-rw-r--r--libc/stdio/scanf.c1
-rw-r--r--libc/stdio/setbuf.c2
-rw-r--r--libc/stdio/setbuffer.c2
-rw-r--r--libc/stdio/setlinebuf.c2
-rw-r--r--libc/stdio/setvbuf.c3
-rw-r--r--libc/stdio/ungetc.c3
8 files changed, 11 insertions, 5 deletions
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index 85a00bb95..e4aa5d740 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -260,6 +260,8 @@ extern int __stdio_trans2w(FILE *__restrict stream) attribute_hidden;
extern int __stdio_trans2r_o(FILE *__restrict stream, int oflag) attribute_hidden;
extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidden;
+extern int __setvbuf (FILE *__restrict __stream, char *__restrict __buf,
+ int __modes, size_t __n) __THROW attribute_hidden;
/**********************************************************************/
#ifdef __STDIO_BUFFERS
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index 45ac6f17f..354227593 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -15,6 +15,7 @@
*/
#define waitpid __waitpid
+#define execl __execl
#include <stdio.h>
#include <stdlib.h>
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index af1018636..19484d588 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -46,6 +46,7 @@
#define wcslen __wcslen
#define mbsrtowcs __mbsrtowcs
#define mbrtowc __mbrtowc
+#define ungetc __ungetc
#define _ISOC99_SOURCE /* for LLONG_MAX primarily... */
#define _GNU_SOURCE
diff --git a/libc/stdio/setbuf.c b/libc/stdio/setbuf.c
index 21158638b..02a4736ac 100644
--- a/libc/stdio/setbuf.c
+++ b/libc/stdio/setbuf.c
@@ -10,6 +10,6 @@
void setbuf(FILE * __restrict stream, register char * __restrict buf)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ);
+ __setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ);
#endif
}
diff --git a/libc/stdio/setbuffer.c b/libc/stdio/setbuffer.c
index ccd4d275e..d1f12a1af 100644
--- a/libc/stdio/setbuffer.c
+++ b/libc/stdio/setbuffer.c
@@ -16,6 +16,6 @@ void setbuffer(FILE * __restrict stream, register char * __restrict buf,
size_t size)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size);
+ __setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size);
#endif
}
diff --git a/libc/stdio/setlinebuf.c b/libc/stdio/setlinebuf.c
index 6147fa8f4..56e89e11b 100644
--- a/libc/stdio/setlinebuf.c
+++ b/libc/stdio/setlinebuf.c
@@ -15,6 +15,6 @@
void setlinebuf(FILE * __restrict stream)
{
#ifdef __STDIO_BUFFERS
- setvbuf(stream, NULL, _IOLBF, (size_t) 0);
+ __setvbuf(stream, NULL, _IOLBF, (size_t) 0);
#endif
}
diff --git a/libc/stdio/setvbuf.c b/libc/stdio/setvbuf.c
index 3fe62c6a8..d12d1576a 100644
--- a/libc/stdio/setvbuf.c
+++ b/libc/stdio/setvbuf.c
@@ -14,7 +14,7 @@
#error Assumption violated for buffering mode flags
#endif
-int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
+int attribute_hidden __setvbuf(register FILE * __restrict stream, register char * __restrict buf,
int mode, size_t size)
{
#ifdef __STDIO_BUFFERS
@@ -104,3 +104,4 @@ int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
#endif
}
+strong_alias(__setvbuf,setvbuf)
diff --git a/libc/stdio/ungetc.c b/libc/stdio/ungetc.c
index 1b9197a18..de3f1d16b 100644
--- a/libc/stdio/ungetc.c
+++ b/libc/stdio/ungetc.c
@@ -24,7 +24,7 @@
* (See section 7.19.6.2 of the C9X rationale -- WG14/N897.)
*/
-int ungetc(int c, register FILE *stream)
+int attribute_hidden __ungetc(int c, register FILE *stream)
{
__STDIO_AUTO_THREADLOCK_VAR;
@@ -75,3 +75,4 @@ int ungetc(int c, register FILE *stream)
return c;
}
+strong_alias(__ungetc,ungetc)