summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/stdio/printf.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libc-top-half/musl/src/stdio/printf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stdio/printf.c b/libc-top-half/musl/src/stdio/printf.c
new file mode 100644
index 0000000..46cc6d8
--- /dev/null
+++ b/libc-top-half/musl/src/stdio/printf.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <stdarg.h>
+
+int printf(const char *restrict fmt, ...)
+{
+ int ret;
+ va_list ap;
+ va_start(ap, fmt);
+ ret = vfprintf(stdout, fmt, ap);
+ va_end(ap);
+ return ret;
+}
+#ifdef __wasilibc_unmodified_upstream // Changes to optimize printf/scanf when long double isn't needed
+#else
+weak_alias(printf, iprintf);
+weak_alias(printf, __small_printf);
+#endif