On Mon, Jul 22, 2019 at 4:52 PM Rosen Penev <ros...@gmail.com> wrote: > > On Mon, Jul 22, 2019 at 1:58 PM Antonio Diaz Diaz <anto...@gnu.org> wrote: > > > > Rosen Penev wrote: > > >>>> IMO this is a bug in uClibc-ng > > >>> Even so, it might still make sense to work around it. > > >> > > >> I don't see how this can be done. Using plain 'fgetc' instead of > > >> 'std::fgetc' will fail with conforming libc implementations. > > > I don't really do C++, but this is one of the ways a similar issue was > > > fixed: > > > https://github.com/facebook/folly/commit/b2cecfb5ced32cac372cfe6c5ac1935365b5dd60 > > > > That fix is for std::remainder, which is C++11 and therefore not present > > in previous versions of the standard. I made a similar fix for > > std::snprintf, which was introduced in C99 and was therefore absent from > > C++98. > > > > The case of std::fgetc is different. 'fgetc' is in C since the dawn of > > time and therefore std::fgetc must be provided by any compliant C++ > > library. IMO this bug should not be worked around, but fixed in uClibc-ng. > Interesting... > > So the setup was uClibc-ng as the libc and uClibc++ as the libc++. If > I swap out uClibc++ for libstdcpp, it works. > > OTOH, if I swap out uClibc-ng for musl or something, it also works. > > No idea which problem should be fixed. Looking at > https://git.busybox.net/uClibc++/tree/include/cstdio?id=6ff572f21e2ce654d0c49dca3c64c49625fd266a#n34 > , I don't see a problem. > > Looking at > https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a00832_source.html > , it seems libstdcpp uses #undef on all the functions before including > them. Adding #undef <function> everywhere worked. > > > > Best regards, > > Antonio.
_______________________________________________ Bug-ddrescue mailing list Bug-ddrescue@gnu.org https://lists.gnu.org/mailman/listinfo/bug-ddrescue