diff --git a/libc/Android.mk b/libc/Android.mk index cd5cb024d..8d1cc968e 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -418,7 +418,6 @@ libc_upstream_openbsd_src_files := \ upstream-openbsd/lib/libc/stdio/putc.c \ upstream-openbsd/lib/libc/stdio/putchar.c \ upstream-openbsd/lib/libc/stdio/puts.c \ - upstream-openbsd/lib/libc/stdio/putw.c \ upstream-openbsd/lib/libc/stdio/putwc.c \ upstream-openbsd/lib/libc/stdio/putwchar.c \ upstream-openbsd/lib/libc/stdio/refill.c \ diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk index 7c423ab89..260d72ef5 100644 --- a/libc/arch-arm/arm.mk +++ b/libc/arch-arm/arm.mk @@ -5,6 +5,7 @@ libc_common_src_files_arm := \ bionic/legacy_32_bit_support.cpp \ bionic/ndk_cruft.cpp \ bionic/time64.c \ + upstream-openbsd/lib/libc/stdio/putw.c \ # These are shared by all the 32-bit targets, but not the 64-bit ones. libc_bionic_src_files_arm := \ diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk index 64b0fb2b4..c964e67fe 100644 --- a/libc/arch-mips/mips.mk +++ b/libc/arch-mips/mips.mk @@ -5,6 +5,7 @@ libc_common_src_files_mips := \ bionic/legacy_32_bit_support.cpp \ bionic/ndk_cruft.cpp \ bionic/time64.c \ + upstream-openbsd/lib/libc/stdio/putw.c \ # These are shared by all the 32-bit targets, but not the 64-bit ones. libc_bionic_src_files_mips += \ diff --git a/libc/arch-x86/x86.mk b/libc/arch-x86/x86.mk index 0f2216996..3dc71d15b 100644 --- a/libc/arch-x86/x86.mk +++ b/libc/arch-x86/x86.mk @@ -5,6 +5,7 @@ libc_common_src_files_x86 := \ bionic/legacy_32_bit_support.cpp \ bionic/ndk_cruft.cpp \ bionic/time64.c \ + upstream-openbsd/lib/libc/stdio/putw.c \ # Fortify implementations of libc functions. libc_common_src_files_x86 += \ diff --git a/libc/include/stdio.h b/libc/include/stdio.h index efc549288..62acb3a3d 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -337,8 +337,6 @@ int asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); char *fgetln(FILE * __restrict, size_t * __restrict); int fpurge(FILE *); -int getw(FILE *); -int putw(int, FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char ** __restrict, const char * __restrict, diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp index e291f52fe..18dae9c2f 100644 --- a/tests/stdio_test.cpp +++ b/tests/stdio_test.cpp @@ -531,10 +531,6 @@ TEST(stdio, cantwrite_EBADF) { EXPECT_EQ(EBADF, errno); #endif - errno = 0; - EXPECT_EQ(EOF, putw(1234, fp)); - EXPECT_EQ(EBADF, errno); - errno = 0; EXPECT_EQ(0U, fwrite("hello", 1, 2, fp)); EXPECT_EQ(EBADF, errno);