Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 14 Oct 2014 12:34:27 -0400
From: Rich Felker <>
Subject: Re: [PATCH] Convert some is* macros to inline functions

On Tue, Oct 14, 2014 at 12:01:08PM +0300, Sergey Dmitrouk wrote:
> 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 <cname> headers
> > and then defines the semantics for the <name.h> headers in terms of
> > the <cname> 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. Committed with minor change (moved the inline function
__isspace, which is unused without the macro, inside of the #ifndef).


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.