summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cstdio
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2015-01-10 00:08:00 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2015-01-10 00:08:00 +0000
commitcba3e4ca21992692491af652fa4e84798ef09990 (patch)
tree6e3e3883d2eca875a5bcb812cfc9cb82f028bb13 /libcxx/include/cstdio
parentd0b23bef6fe50041d83a9fa64871b8433a2102bd (diff)
downloadbcm5719-llvm-cba3e4ca21992692491af652fa4e84798ef09990.tar.gz
bcm5719-llvm-cba3e4ca21992692491af652fa4e84798ef09990.zip
Support Newlib as libc++'s C library [cstdio part, part 2]
Wrappers for clearerr, feof, ferror (which newlib implements as macros). http://reviews.llvm.org/D5420 llvm-svn: 225563
Diffstat (limited to 'libcxx/include/cstdio')
-rw-r--r--libcxx/include/cstdio18
1 files changed, 18 insertions, 0 deletions
diff --git a/libcxx/include/cstdio b/libcxx/include/cstdio
index ce3af4d91dc..37814ef1197 100644
--- a/libcxx/include/cstdio
+++ b/libcxx/include/cstdio
@@ -120,6 +120,24 @@ 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;
OpenPOWER on IntegriCloud