002-undef-functions.patch 793 B

1234567891011121314151617181920212223242526272829303132333435
  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. When compiling with uClibc-ng, these functions get defined as macros and
  6. become unavailable for std.
  7. Fixes programs that use the std versions of these functions.
  8. This matches libstdcpp behavior.
  9. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  10. ---
  11. include/cstdio | 9 +++++++++
  12. 1 file changed, 9 insertions(+)
  13. --- a/include/cstdio
  14. +++ b/include/cstdio
  15. @@ -21,6 +21,15 @@
  16. #ifndef __HEADER_CSTDIO
  17. #define __HEADER_CSTDIO 1
  18. +#undef clearerr
  19. +#undef feof
  20. +#undef ferror
  21. +#undef fgetc
  22. +#undef fputc
  23. +#undef getc
  24. +#undef getchar
  25. +#undef putc
  26. +#undef putchar
  27. namespace std{
  28. using ::FILE;