It turns out, this breaks only when compiling with both uClibc-ng and
uClibc++. If the libc or libc++ gets swapped out, it compiles fine.
libstdcpp is fine because it already undefs these macros. The actual
bug is probably in uClibc-ng but this is a fine workaround.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
From the developer:
It seems that uClibc-ng is defining fgetc, fputc, feof, and ferror as
macros and not including them in std.
IMO this is a bug in uClibc-ng (maybe caused by lack of clarity in the
C++ standard), because even the C functions that are alowed to be
defined as macros (putc, getc) should be included in std for
consistency. Just imagine the chaos if std::getc were defined or
undefined depending on how it is implemented.
Signed-off-by: Rosen Penev <rosenp@gmail.com>