diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-08 16:45:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-08 16:45:02 -0400 |
commit | 7402fbcae1c282e27aafd5c5c90aca7eabbdf45c (patch) | |
tree | 4c88a13b97781d74625355002d34e82cbc1d4c8e /include | |
parent | 10d980882987d8cd9b2e34651faceff29176148b (diff) | |
download | gdb-7402fbcae1c282e27aafd5c5c90aca7eabbdf45c.zip gdb-7402fbcae1c282e27aafd5c5c90aca7eabbdf45c.tar.gz gdb-7402fbcae1c282e27aafd5c5c90aca7eabbdf45c.tar.bz2 |
Define GNULIB_NAMESPACE in unittests/string_view-selftests.c
When building with x86_64-w64-mingw32-g++ (to test cross-compiling for
Windows), I get this error:
unittests/string_view-selftests.o: In function `selftests::string_view::inserters_2::test05(unsigned long long)':
/home/emaisin/src/binutils-gdb/gdb/unittests/basic_string_view/inserters/char/2.cc:60: undefined reference to `std::basic_ofstream<char, std::char_traits<char> >::rpl_close()'
This is caused by gnulib redefining "close" as "rpl_close", and
therefore messing up the declaration of basic_ofstream in the libstdc++
header. The solution would be to use gnulib namespaces [1]. Until we
use them across GDB, we can use them locally in files that are
problematic, like this one.
gdb/ChangeLog:
* unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions