binutils-gdb/gdb/unittests
Simon Marchi 7402fbcae1 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.
2018-05-08 16:45:02 -04:00
..
basic_string_view Adapt and integrate string_view tests 2018-04-09 14:20:47 -04:00
optional Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
array-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
common-utils-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
function-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
lookup_name_info-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memory-map-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memrange-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
observable-selftests.c Convert observers to C++ 2018-03-19 09:37:49 -06:00
offset-type-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
optional-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ptid-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
scoped_fd-selftests.c common: add scoped_fd 2018-02-09 14:03:18 +01:00
scoped_mmap-selftests.c common: add scoped_mmap 2018-02-09 14:03:19 +01:00
scoped_restore-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
string_view-selftests.c Define GNULIB_NAMESPACE in unittests/string_view-selftests.c 2018-05-08 16:45:02 -04:00
tracepoint-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
unpack-selftests.c Sign-extend non-bit-fields in unpack_bits_as_long 2018-02-26 09:21:08 -07:00
utils-selftests.c Add selftest for substitute_path_component 2018-03-15 22:04:42 -04:00
xml-utils-selftests.c Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00