Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Jan 2017 13:29:08 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: libstdc++ namespace pollution

On Tue, Jan 03, 2017 at 05:44:47PM +0000, Justin Cormack wrote:
> I have been trying to build a C++ program recently, and came across
> the issue that
> 
> 1. libstdc++ always defines _GNU_SOURCE see
> https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
> 2. Musl defines pretty much everything once _GNU_SOURCE is defined

So does glibc. :)

> In this case the issue was that the program included <signal.h> and
> then the register names REG_RIP etc were #defined as numeric
> constants, while the program wanted to use them as names for an enum.
> 
> Does anyone have any recommendations (wondering about trying clang
> libc++ perhaps)?

This is a known issue that the gcc people want to fix, I think. It
might be possible to patch it out already it you're prepared to track
down things that break and fix them.

Rich

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.