Prepare zucchini sources for mingwclang builds - base/files/file_util_win.cc: OpenFile() uses _SH_DENYNO, which the MSVC CRT headers happen to expose transitively but mingw-w64 only declares in . - base/base_paths_win.cc: is not found when cross-compiling, as mingw-w64 spells the header knownfolders.h and the build host can have a case-sensitive filesystem. Its only user, FOLDERID_ApplicationShortcuts in the DIR_APP_SHORTCUTS case is already excluded under MOZ_ZUCCHINI. - components/zucchini/suffix_array_unittest.cc: libc++ ships no std::char_traits specialization, so std::basic_string cannot be instantiated. The test only ever uses the alias as a sized random-access container (construction from an iterator pair, begin/end/size), so under MOZ_ZUCCHINI it becomes std::vector. --- base/base_paths_win.cc | 2 ++ base/files/file_util_win.cc | 3 +++ components/zucchini/suffix_array_unittest.cc | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc index ce7ce4b6899e..467dcb5ee297 100644 --- a/base/base_paths_win.cc +++ b/base/base_paths_win.cc @@ -4,7 +4,9 @@ #include +#if !defined(MOZ_ZUCCHINI) #include +#endif // !defined(MOZ_ZUCCHINI) #include #include "base/base_paths.h" diff --git a/base/files/file_util_win.cc b/base/files/file_util_win.cc index bd2082584525..251c683da9c0 100644 --- a/base/files/file_util_win.cc +++ b/base/files/file_util_win.cc @@ -8,6 +8,9 @@ #include #include +#if defined(MOZ_ZUCCHINI) +#include +#endif // defined(MOZ_ZUCCHINI) #include #include #include diff --git a/components/zucchini/suffix_array_unittest.cc b/components/zucchini/suffix_array_unittest.cc index 57775b047ea1..abf2137ad607 100644 --- a/components/zucchini/suffix_array_unittest.cc +++ b/components/zucchini/suffix_array_unittest.cc @@ -22,7 +22,11 @@ using SLType = InducedSuffixSort::SLType; } // namespace +#if defined(MOZ_ZUCCHINI) +using ustring = std::vector; +#else using ustring = std::basic_string; +#endif // defined(MOZ_ZUCCHINI) constexpr uint16_t kNumChar = 256; -- 2.53.0