summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/fclose.c4
-rw-r--r--libc/stdio/fread.c8
-rw-r--r--libc/stdio/fwrite.c8
3 files changed, 13 insertions, 7 deletions
diff --git a/libc/stdio/fclose.c b/libc/stdio/fclose.c
index 4df2e4229..4f5e479fe 100644
--- a/libc/stdio/fclose.c
+++ b/libc/stdio/fclose.c
@@ -7,7 +7,8 @@
#include "_stdio.h"
-int fclose(register FILE *stream)
+#undef fclose
+int attribute_hidden __fclose(register FILE *stream)
{
int rv = 0;
__STDIO_AUTO_THREADLOCK_VAR;
@@ -84,3 +85,4 @@ int fclose(register FILE *stream)
return rv;
}
+strong_alias(__fclose,fclose)
diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c
index 42a29b067..0defb36a0 100644
--- a/libc/stdio/fread.c
+++ b/libc/stdio/fread.c
@@ -83,14 +83,15 @@ size_t attribute_hidden __fread_unlocked(void * __restrict ptr, size_t size, siz
return 0;
}
-weak_alias(__fread_unlocked,fread_unlocked);
+weak_alias(__fread_unlocked,fread_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-weak_alias(__fread_unlocked,fread);
+hidden_strong_alias(__fread_unlocked,__fread)
+weak_alias(__fread_unlocked,fread)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-size_t fread(void * __restrict ptr, size_t size, size_t nmemb,
+size_t attribute_hidden __fread(void * __restrict ptr, size_t size, size_t nmemb,
register FILE * __restrict stream)
{
size_t retval;
@@ -104,5 +105,6 @@ size_t fread(void * __restrict ptr, size_t size, size_t nmemb,
return retval;
}
+strong_alias(__fread,fread)
#endif
diff --git a/libc/stdio/fwrite.c b/libc/stdio/fwrite.c
index 50af8f7a5..abe24fbb7 100644
--- a/libc/stdio/fwrite.c
+++ b/libc/stdio/fwrite.c
@@ -34,14 +34,15 @@ size_t attribute_hidden __fwrite_unlocked(const void * __restrict ptr, size_t si
return 0;
}
-weak_alias(__fwrite_unlocked,fwrite_unlocked);
+weak_alias(__fwrite_unlocked,fwrite_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-weak_alias(__fwrite_unlocked,fwrite);
+hidden_strong_alias(__fwrite_unlocked,__fwrite)
+weak_alias(__fwrite_unlocked,fwrite)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-size_t fwrite(const void * __restrict ptr, size_t size,
+size_t attribute_hidden __fwrite(const void * __restrict ptr, size_t size,
size_t nmemb, register FILE * __restrict stream)
{
size_t retval;
@@ -55,5 +56,6 @@ size_t fwrite(const void * __restrict ptr, size_t size,
return retval;
}
+strong_alias(__fwrite,fwrite)
#endif