This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Use std::max and std::min throughout


Pedro Alves wrote:

> I tried a --disable-nls with both gcc 5.1 and 4.7 here, and it
> doesn't trigger this.  I can't seem to find the libintl.h inclusion
> you're seeing.  Sounds like that was changed at some point.

Yes, it looks like these days the C++ headers include a lot fewer
of the base C headers (fixing namespace pollution, maybe?).

> How about always including libintl.h, even when ENABLE_NLS:
> 
> #ifdef HAVE_LIBINTL_H
> # include <libintl.h>
> #endif

It looks like this would fix the problem for me.

> Alternatively, simply remove the troublesome *gettext and *textdomain
> macros, leaving only the _ and N_ ones.  I can't seem to find any
> directly reference to gettext in the tree.  The textdomain calls
> in main.c would need to be wrapped in #ifdef ENABLE_NLS, but
> likes like that is all.

This would also work, and seems the cleanest solution.

> Seems like gas/asintl.h handles this in yet another way [1].
> That one seems too much of a hack to me, though.

Agreed.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]