On Mon, Oct 13, 2014 at 11:49:56AM -0700, Szabolcs Nagy wrote: > the c++ standard could be more explicit about this incompatibility > with c: it states the requirement in a note for the headers > and then defines the semantics for the headers in terms of > the one Sad, but true. I wish it was stated better. > The only way to achieve equivalent inline behavior in C++ is to > provide a definition as an extern inline function. Seems to be true, so newlib and glibc have checks for __cplusplus define. Alternative would be to provide 26 fake headers containing #include_next directive, but it's not very portable solution. Attached is the patch, which simply adds #ifndef __cplusplus around macros. At the end, it seems to be the right thing to do, although the way it's defined is rather confusing. Thanks, Sergey