Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 5 Jan 2021 11:54:14 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] guard isascii() macro when using C++

On Mon, Jan 04, 2021 at 10:48:34PM -0300, Érico Nogueira wrote:
> From: Érico Rolim <ericonr@...root.org>
>
> otherwise one can get compilation errors in C++ code that uses isascii
> as an identifier
>

Well, this is a namespacing issue. The identifier in contention here is
only exposed if defines are set identifying the source file as POSIX
code. POSIX specifies the isascii macro, though it marks it as obsolete.
However, it means that no-one, C or C++, can use isascii as identifier
when including ctype.h if they declare POSIX compatibility. So one of
those three things has to go: Either the source files in question must
avoid including ctype.h, or they must avoid using the isascii
identifier, or they must avoid declaring POSIX compatibility. In all
cases, this is not a C vs. C++ issue, only a namespacing issue. And not
wrong in the library, but in the application.

Ciao,
Markus

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.