about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/misc/getopt.c2
-rw-r--r--src/stdio/fscanf.c3
-rw-r--r--src/stdio/fwscanf.c3
-rw-r--r--src/stdio/scanf.c3
-rw-r--r--src/stdio/sscanf.c3
-rw-r--r--src/stdio/swscanf.c3
-rw-r--r--src/stdio/vfwscanf.c3
-rw-r--r--src/stdio/vscanf.c3
-rw-r--r--src/stdio/vsscanf.c3
-rw-r--r--src/stdio/vswscanf.c3
-rw-r--r--src/stdio/vwscanf.c3
-rw-r--r--src/stdio/wscanf.c3
-rw-r--r--src/string/strerror_r.c3
13 files changed, 38 insertions, 0 deletions
diff --git a/src/misc/getopt.c b/src/misc/getopt.c
index 35880a09..f1a1639c 100644
--- a/src/misc/getopt.c
+++ b/src/misc/getopt.c
@@ -70,3 +70,5 @@ int getopt(int argc, char * const argv[], const char *optstring)
 	}
 	return c;
 }
+
+weak_alias(getopt, __posix_getopt);
diff --git a/src/stdio/fscanf.c b/src/stdio/fscanf.c
index ff6c7767..58bc5fab 100644
--- a/src/stdio/fscanf.c
+++ b/src/stdio/fscanf.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdarg.h>
+#include "libc.h"
 
 int fscanf(FILE *restrict f, const char *restrict fmt, ...)
 {
@@ -10,3 +11,5 @@ int fscanf(FILE *restrict f, const char *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(__isoc99_fscanf);
diff --git a/src/stdio/fwscanf.c b/src/stdio/fwscanf.c
index 2f30dab4..cb114b39 100644
--- a/src/stdio/fwscanf.c
+++ b/src/stdio/fwscanf.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
+#include "libc.h"
 
 int fwscanf(FILE *restrict f, const wchar_t *restrict fmt, ...)
 {
@@ -11,3 +12,5 @@ int fwscanf(FILE *restrict f, const wchar_t *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(fwscanf,__isoc99_fwscanf);
diff --git a/src/stdio/scanf.c b/src/stdio/scanf.c
index 3b35bdce..a740056c 100644
--- a/src/stdio/scanf.c
+++ b/src/stdio/scanf.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdarg.h>
+#include "libc.h"
 
 int scanf(const char *restrict fmt, ...)
 {
@@ -10,3 +11,5 @@ int scanf(const char *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(scanf,__isoc99_scanf);
diff --git a/src/stdio/sscanf.c b/src/stdio/sscanf.c
index b575edf7..8a2302ff 100644
--- a/src/stdio/sscanf.c
+++ b/src/stdio/sscanf.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdarg.h>
+#include "libc.h"
 
 int sscanf(const char *restrict s, const char *restrict fmt, ...)
 {
@@ -10,3 +11,5 @@ int sscanf(const char *restrict s, const char *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(sscanf,__isoc99_sscanf);
diff --git a/src/stdio/swscanf.c b/src/stdio/swscanf.c
index 1fe3c3d8..c7986096 100644
--- a/src/stdio/swscanf.c
+++ b/src/stdio/swscanf.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
+#include "libc.h"
 
 int swscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, ...)
 {
@@ -11,3 +12,5 @@ int swscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(swscanf,__isoc99_swscanf);
diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c
index b3bc6f3a..44910b4c 100644
--- a/src/stdio/vfwscanf.c
+++ b/src/stdio/vfwscanf.c
@@ -14,6 +14,7 @@
 #include "shgetc.h"
 #include "intscan.h"
 #include "floatscan.h"
+#include "libc.h"
 
 #define SIZE_hh -2
 #define SIZE_h  -1
@@ -308,3 +309,5 @@ match_fail:
 	FUNLOCK(f);
 	return matches;
 }
+
+weak_alias(vfwscanf,__isoc99_vfwscanf);
diff --git a/src/stdio/vscanf.c b/src/stdio/vscanf.c
index 6901958a..43892f01 100644
--- a/src/stdio/vscanf.c
+++ b/src/stdio/vscanf.c
@@ -1,7 +1,10 @@
 #include <stdio.h>
 #include <stdarg.h>
+#include "libc.h"
 
 int vscanf(const char *restrict fmt, va_list ap)
 {
 	return vfscanf(stdin, fmt, ap);
 }
+
+weak_alias(vscanf,__isoc99_vscanf);
diff --git a/src/stdio/vsscanf.c b/src/stdio/vsscanf.c
index 049f4dd0..929ffa3b 100644
--- a/src/stdio/vsscanf.c
+++ b/src/stdio/vsscanf.c
@@ -1,4 +1,5 @@
 #include "stdio_impl.h"
+#include "libc.h"
 
 static size_t do_read(FILE *f, unsigned char *buf, size_t len)
 {
@@ -13,3 +14,5 @@ int vsscanf(const char *restrict s, const char *restrict fmt, va_list ap)
 	};
 	return vfscanf(&f, fmt, ap);
 }
+
+weak_alias(vsscanf,__isoc99_vsscanf);
diff --git a/src/stdio/vswscanf.c b/src/stdio/vswscanf.c
index 7a2f7c7a..411dd39c 100644
--- a/src/stdio/vswscanf.c
+++ b/src/stdio/vswscanf.c
@@ -1,4 +1,5 @@
 #include "stdio_impl.h"
+#include "libc.h"
 #include <wchar.h>
 
 static size_t wstring_read(FILE *f, unsigned char *buf, size_t len)
@@ -34,3 +35,5 @@ int vswscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, va_list ap)
 	};
 	return vfwscanf(&f, fmt, ap);
 }
+
+weak_alias(vswscanf,__isoc99_vswscanf);
diff --git a/src/stdio/vwscanf.c b/src/stdio/vwscanf.c
index 9297cf0d..63c9cce1 100644
--- a/src/stdio/vwscanf.c
+++ b/src/stdio/vwscanf.c
@@ -1,8 +1,11 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
+#include "libc.h"
 
 int vwscanf(const wchar_t *restrict fmt, va_list ap)
 {
 	return vfwscanf(stdin, fmt, ap);
 }
+
+weak_alias(vwscanf,__isoc99_vwscanf);
diff --git a/src/stdio/wscanf.c b/src/stdio/wscanf.c
index a207cc1b..80412252 100644
--- a/src/stdio/wscanf.c
+++ b/src/stdio/wscanf.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
+#include "libc.h"
 
 int wscanf(const wchar_t *restrict fmt, ...)
 {
@@ -11,3 +12,5 @@ int wscanf(const wchar_t *restrict fmt, ...)
 	va_end(ap);
 	return ret;
 }
+
+weak_alias(wscanf,__isoc99_wscanf);
diff --git a/src/string/strerror_r.c b/src/string/strerror_r.c
index 907dcf07..da26b4fe 100644
--- a/src/string/strerror_r.c
+++ b/src/string/strerror_r.c
@@ -1,5 +1,6 @@
 #include <string.h>
 #include <errno.h>
+#include "libc.h"
 
 int strerror_r(int err, char *buf, size_t buflen)
 {
@@ -15,3 +16,5 @@ int strerror_r(int err, char *buf, size_t buflen)
 	memcpy(buf, msg, l+1);
 	return 0;
 }
+
+weak_alias(strerror_r, __xpg_strerror_r);