blob: 47fa1580f2ef10f5e5cc5b7b95eafa9da2a3572f [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 8245f62c1e7aba150f666b3c3a1dda646dee6d4b Mon Sep 17 00:00:00 2001
2From: Rosen Penev <rosenp@gmail.com>
3Date: Fri, 27 Sep 2019 13:12:44 -0700
4Subject: [PATCH] cstdio: Add undef for four functions
5
6When compiling with uClibc-ng, these functions get defined as macros and
7become unavailable for std.
8
9Fixes programs that use the std versions of these functions.
10
11This matches libstdcpp behavior.
12
13Signed-off-by: Rosen Penev <rosenp@gmail.com>
14---
15 include/cstdio | 9 +++++++++
16 1 file changed, 9 insertions(+)
17
18--- a/include/cstdio
19+++ b/include/cstdio
20@@ -21,6 +21,15 @@
21 #ifndef __HEADER_CSTDIO
22 #define __HEADER_CSTDIO 1
23
24+#undef clearerr
25+#undef feof
26+#undef ferror
27+#undef fgetc
28+#undef fputc
29+#undef getc
30+#undef getchar
31+#undef putc
32+#undef putchar
33
34 namespace std{
35 using ::FILE;