From a905ee4924cdd0a70a1029afce07b860f0bc6d8b Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 21 May 2023 10:45:25 +0100 Subject: [PATCH] libstdc++: Rename __null_terminated to avoid a collision with system headers. r13-1073-g254e88b3d7e8ab made this change for experimental/bits/fs-path.h. The change is needed on the 10.x branch for bits/fs-path.h (it is not required on later branches since this header was reworked). Signed-off-by: Iain Sandoe libstdc++-v3/ChangeLog: * include/bits/fs_path.h: Rename __null_terminated to __nul_terminated to avoid colliding with a macro in Darwin system headers. --- libstdc++-v3/include/bits/fs_path.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/include/bits/fs_path.h b/libstdc++-v3/include/bits/fs_path.h index 9f0f2bf5d2dc..9c7838ef9df8 100644 --- a/libstdc++-v3/include/bits/fs_path.h +++ b/libstdc++-v3/include/bits/fs_path.h @@ -130,10 +130,10 @@ namespace __detail _Source _S_range_begin(_Source __begin) { return __begin; } - struct __null_terminated { }; + struct __nul_terminated { }; template - __null_terminated + __nul_terminated _S_range_end(_Source) { return {}; } template @@ -528,11 +528,11 @@ namespace __detail struct _Cvt; static basic_string_view - _S_convert(value_type* __src, __detail::__null_terminated) + _S_convert(value_type* __src, __detail::__nul_terminated) { return __src; } static basic_string_view - _S_convert(const value_type* __src, __detail::__null_terminated) + _S_convert(const value_type* __src, __detail::__nul_terminated) { return __src; } static basic_string_view @@ -554,7 +554,7 @@ namespace __detail template static string_type - _S_convert(_InputIterator __src, __detail::__null_terminated) + _S_convert(_InputIterator __src, __detail::__nul_terminated) { // Read from iterator into basic_string until a null value is seen: auto __s = _S_string_from_iter(__src); @@ -576,7 +576,7 @@ namespace __detail template static string_type - _S_convert_loc(_InputIterator __src, __detail::__null_terminated, + _S_convert_loc(_InputIterator __src, __detail::__nul_terminated, const std::locale& __loc) { const std::string __s = _S_string_from_iter(__src); -- 2.47.2