]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Rename __null_terminated to avoid a collision with system headers.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 21 May 2023 09:45:25 +0000 (10:45 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 21 May 2023 19:01:00 +0000 (20:01 +0100)
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 <iain@sandoe.co.uk>
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

index 9f0f2bf5d2dcf6ed5bd9dc6870286644d6f4b882..9c7838ef9df87762a3393bf98d1e1d8e59a7bb85 100644 (file)
@@ -130,10 +130,10 @@ namespace __detail
     _Source
     _S_range_begin(_Source __begin) { return __begin; }
 
-  struct __null_terminated { };
+  struct __nul_terminated { };
 
   template<typename _Source>
-    __null_terminated
+    __nul_terminated
     _S_range_end(_Source) { return {}; }
 
   template<typename _CharT, typename _Traits, typename _Alloc>
@@ -528,11 +528,11 @@ namespace __detail
       struct _Cvt;
 
     static basic_string_view<value_type>
-    _S_convert(value_type* __src, __detail::__null_terminated)
+    _S_convert(value_type* __src, __detail::__nul_terminated)
     { return __src; }
 
     static basic_string_view<value_type>
-    _S_convert(const value_type* __src, __detail::__null_terminated)
+    _S_convert(const value_type* __src, __detail::__nul_terminated)
     { return __src; }
 
     static basic_string_view<value_type>
@@ -554,7 +554,7 @@ namespace __detail
 
     template<typename _InputIterator>
       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<typename _InputIterator>
       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);