From 2201343c17b7149a75f543f523bea0c3243c6091 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 22 Apr 2019 06:23:56 -0700 Subject: [PATCH] Add vfwprintf.c to the printscan list. This causes the build to produce no-long-double and no-floating-point versions of this file, following what is done for vfprintf.c. --- Makefile | 1 + libc-top-half/musl/src/stdio/vfwprintf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index a6f84c9..7d2b6ac 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,7 @@ LIBC_TOP_HALF_MUSL_SOURCES = \ MUSL_PRINTSCAN_SOURCES = \ $(LIBC_TOP_HALF_MUSL_SRC_DIR)/internal/floatscan.c \ $(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdio/vfprintf.c \ + $(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdio/vfwprintf.c \ $(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdio/vfscanf.c \ $(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/strtod.c \ $(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/wcstod.c diff --git a/libc-top-half/musl/src/stdio/vfwprintf.c b/libc-top-half/musl/src/stdio/vfwprintf.c index e418d25..ea6285e 100644 --- a/libc-top-half/musl/src/stdio/vfwprintf.c +++ b/libc-top-half/musl/src/stdio/vfwprintf.c @@ -355,9 +355,11 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_ sizeprefix[(t|32)-'a'], t); switch (t|32) { +#if !defined(__wasilibc_printscan_no_floating_point) case 'a': case 'e': case 'f': case 'g': l = fprintf(f, charfmt, w, p, arg.f); break; +#endif case 'd': case 'i': case 'o': case 'u': case 'x': case 'p': l = fprintf(f, charfmt, w, p, arg.i); break;