From d194dfe969ca5fb5d405fad102b58c114ee83b9b Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 19 Apr 2018 15:12:05 +0300 Subject: libc: Wrap more stdio funcs --- src/libc-stdio.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/libc-stdio.h b/src/libc-stdio.h index 7f09c74..9e4f72a 100644 --- a/src/libc-stdio.h +++ b/src/libc-stdio.h @@ -1,5 +1,7 @@ #pragma once +#include + struct bionic___sFILE { #if defined(__LP64__) char __private[152]; @@ -43,6 +45,37 @@ bionic_fclose(FILE *stream) return fclose(bionic_file_to_glibc_file(stream)); } +int +bionic_fputc(int c, FILE *stream) +{ + return fputc(c, bionic_file_to_glibc_file(stream)); +} + +int +bionic_putc(int c, FILE *stream) +{ + return putc(c, bionic_file_to_glibc_file(stream)); +} + + +int +bionic_fputs(const char *c, FILE *stream) +{ + return fputs(c, bionic_file_to_glibc_file(stream)); +} + +wint_t +bionic_fputwc(wchar_t wc, FILE *stream) +{ + return fputwc(wc, bionic_file_to_glibc_file(stream)); +} + +wint_t +bionic_putwc(wchar_t wc, FILE *stream) +{ + return putwc(wc, bionic_file_to_glibc_file(stream)); +} + size_t bionic_fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { -- cgit v1.2.3-70-g09d2