Re: MinGW build failure for GDB 8.2.90 with source-highlight

Simon Marchi
2019-03-07T18:09:34Z

On 2019-03-07 12:11, Pedro Alves wrote:
> On 03/07/2019 04:59 PM, Simon Marchi wrote:
>
>> I don't recall what's the long term solution for this.Â  We could use
>> gnulib's namespace support [2], but the disadvantage is that we would
>> need to use gnulib::some_function (assuming we name the namespace
>> "gnulib") instead of just some_function to use the "fixed" version.Â
>> If we use some_function directly, it will use the buggy version on
>> those systems where it is buggy.
>
> Wrap all of gdb in a namespace. Recall that this was what led to C++
> wildmatching support.

I don't understand how this will help. If you have

#define open rpl_open

namespace gdb {
struct target_ops {
void open();
}
}

The macro will still wrongfully replace open.

Simon