mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-07 13:39:43 +08:00
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. |
||
---|---|---|
.. | ||
basic_string_view | ||
optional | ||
array-view-selftests.c | ||
common-utils-selftests.c | ||
environ-selftests.c | ||
function-view-selftests.c | ||
lookup_name_info-selftests.c | ||
memory-map-selftests.c | ||
memrange-selftests.c | ||
observable-selftests.c | ||
offset-type-selftests.c | ||
optional-selftests.c | ||
ptid-selftests.c | ||
rsp-low-selftests.c | ||
scoped_fd-selftests.c | ||
scoped_mmap-selftests.c | ||
scoped_restore-selftests.c | ||
string_view-selftests.c | ||
tracepoint-selftests.c | ||
unpack-selftests.c | ||
utils-selftests.c | ||
xml-utils-selftests.c |