bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Cannot compile with uClibc-ng


From: Rosen Penev
Subject: Re: [Bug-ddrescue] Cannot compile with uClibc-ng
Date: Mon, 22 Jul 2019 10:24:50 -0700


On Mon, Jul 22, 2019 at 2:09 AM, Antonio Diaz Diaz <address@hidden> wrote:
Rosen Penev wrote:
It seems that uClibc-ng is defining fgetc, fputc, feof, and ferror as
macros and not including them in std.

  From the C++ 2003 standard:

"Except as noted in clauses 18 through 27, the contents of each header cname shall be the same as that of the corresponding header name.h, as specified in ISO/IEC 9899:1990 Programming Languages C (Clause 7), or ISO/IEC:1990 Programming Languages--C AMENDMENT 1: C Integrity, (Clause
7), as appropriate, as if by inclusion. In the C++ Standard Library,
however, the declarations and definitions (except for names which are
defined as macros in C) are within namespace scope (3.3.5) of the
namespace std."

But these four functions do not seem to be defined as macros in C.

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



For now, I've disabled building gddrescue with uClibc-ng in OpenWrt.

Have you reported the bug to uClibc-ng developers?
I have not.


Best regards,
Antonio.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]