b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From 8245f62c1e7aba150f666b3c3a1dda646dee6d4b Mon Sep 17 00:00:00 2001 |
| 2 | From: Rosen Penev <rosenp@gmail.com> |
| 3 | Date: Fri, 27 Sep 2019 13:12:44 -0700 |
| 4 | Subject: [PATCH] cstdio: Add undef for four functions |
| 5 | |
| 6 | When compiling with uClibc-ng, these functions get defined as macros and |
| 7 | become unavailable for std. |
| 8 | |
| 9 | Fixes programs that use the std versions of these functions. |
| 10 | |
| 11 | This matches libstdcpp behavior. |
| 12 | |
| 13 | Signed-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; |