summaryrefslogtreecommitdiff
path: root/include/cstdio
diff options
context:
space:
mode:
Diffstat (limited to 'include/cstdio')
-rw-r--r--include/cstdio59
1 files changed, 43 insertions, 16 deletions
diff --git a/include/cstdio b/include/cstdio
index ce3af4d91dc4b..d8ba6c2ef3839 100644
--- a/include/cstdio
+++ b/include/cstdio
@@ -120,36 +120,44 @@ inline _LIBCPP_INLINE_VISIBILITY int __libcpp_putc(int __c, FILE* __stream) {ret
inline _LIBCPP_INLINE_VISIBILITY int putc(int __c, FILE* __stream) {return __libcpp_putc(__c, __stream);}
#endif // putc
+#ifdef clearerr
+inline _LIBCPP_INLINE_VISIBILITY void __libcpp_clearerr(FILE* __stream) { return clearerr(__stream); }
+#undef clearerr
+inline _LIBCPP_INLINE_VISIBILITY void clearerr(FILE* __stream) { return __libcpp_clearerr(__stream); }
+#endif // clearerr
+
+#ifdef feof
+inline _LIBCPP_INLINE_VISIBILITY int __libcpp_feof(FILE* __stream) { return feof(__stream); }
+#undef feof
+inline _LIBCPP_INLINE_VISIBILITY int feof(FILE* __stream) { return __libcpp_feof(__stream); }
+#endif // feof
+
+#ifdef ferror
+inline _LIBCPP_INLINE_VISIBILITY int __libcpp_ferror(FILE* __stream) { return ferror(__stream); }
+#undef ferror
+inline _LIBCPP_INLINE_VISIBILITY int ferror(FILE* __stream) { return __libcpp_ferror(__stream); }
+#endif // ferror
+
_LIBCPP_BEGIN_NAMESPACE_STD
using ::FILE;
using ::fpos_t;
using ::size_t;
-using ::remove;
-using ::rename;
-using ::tmpfile;
-using ::tmpnam;
using ::fclose;
using ::fflush;
-using ::fopen;
-using ::freopen;
using ::setbuf;
using ::setvbuf;
using ::fprintf;
using ::fscanf;
-using ::printf;
-using ::scanf;
using ::snprintf;
using ::sprintf;
using ::sscanf;
#ifndef _LIBCPP_MSVCRT
using ::vfprintf;
using ::vfscanf;
-using ::vscanf;
using ::vsscanf;
#endif // _LIBCPP_MSVCRT
-using ::vprintf;
using ::vsnprintf;
using ::vsprintf;
using ::fgetc;
@@ -157,13 +165,7 @@ using ::fgets;
using ::fputc;
using ::fputs;
using ::getc;
-using ::getchar;
-#if _LIBCPP_STD_VER <= 11
-using ::gets;
-#endif
using ::putc;
-using ::putchar;
-using ::puts;
using ::ungetc;
using ::fread;
using ::fwrite;
@@ -177,6 +179,31 @@ using ::feof;
using ::ferror;
using ::perror;
+#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
+using ::fopen;
+using ::freopen;
+using ::remove;
+using ::rename;
+using ::tmpfile;
+using ::tmpnam;
+#endif
+
+#ifndef _LIBCPP_HAS_NO_STDIN
+using ::getchar;
+#if _LIBCPP_STD_VER <= 11
+using ::gets;
+#endif
+using ::scanf;
+using ::vscanf;
+#endif
+
+#ifndef _LIBCPP_HAS_NO_STDOUT
+using ::printf;
+using ::putchar;
+using ::puts;
+using ::vprintf;
+#endif
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_CSTDIO