__STRICT_ANSI__ macro breaks building with MSYS2 UCRT64
Hi all, this is to report that this library cannot be built at the moment under MSYS2's UCRT64 environment.
It seems that __STRICT_ANSI__
is a requirement for the MinGW-w64 SDK to be happy:
[3698/6568] Compiling C++ object subprojects/webrtc-audio-processing/webrtc/rtc_base/liblibbase.a.p/system_file_wrapper.cc.obj
FAILED: subprojects/webrtc-audio-processing/webrtc/rtc_base/liblibbase.a.p/system_file_wrapper.cc.obj
"c++" "-Isubprojects\webrtc-audio-processing\webrtc\rtc_base\liblibbase.a.p" "-Isubprojects\webrtc-audio-processing\webrtc\rtc_base" "-I..\subprojects\webrtc-audio-processing\webrtc\rtc_base" "-Isubprojects\webrtc-audio-processing\webrtc" "-I..\subprojects\webrtc-audio-processing\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c++17" "-O2" "-g" "-DWEBRTC_LIBRARY_IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-D_USE_MATH_DEFINES" "-DWEBRTC_ENABLE_AVX2" -MD -MQ subprojects/webrtc-audio-processing/webrtc/rtc_base/liblibbase.a.p/system_file_wrapper.cc.obj -MF "subprojects\webrtc-audio-processing\webrtc\rtc_base\liblibbase.a.p\system_file_wrapper.cc.obj.d" -o subprojects/webrtc-audio-processing/webrtc/rtc_base/liblibbase.a.p/system_file_wrapper.cc.obj "-c" ../subprojects/webrtc-audio-processing/webrtc/rtc_base/system/file_wrapper.cc
In file included from D:/msys64/ucrt64/include/c++/13.2.0/bits/requires_hosted.h:31,
from D:/msys64/ucrt64/include/c++/13.2.0/string:38,
from ..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:17,
from ../subprojects/webrtc-audio-processing/webrtc/rtc_base/system/file_wrapper.cc:11:
D:/msys64/ucrt64/include/c++/13.2.0/x86_64-w64-mingw32/bits/c++config.h:666:2: warning: #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-Wcpp]
666 | #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported"
| ^~~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:86:21: error: 'int64_t' has not been declared
86 | bool SeekRelative(int64_t offset);
| ^~~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:88:15: error: 'int64_t' has not been declared
88 | bool SeekTo(int64_t position);
| ^~~~~~~
../subprojects/webrtc-audio-processing/webrtc/rtc_base/system/file_wrapper.cc:82:6: error: no declaration matches 'bool webrtc::FileWrapper::SeekRelative(int64_t)'
82 | bool FileWrapper::SeekRelative(int64_t offset) {
| ^~~~~~~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:86:8: note: candidate is: 'bool webrtc::FileWrapper::SeekRelative(int)'
86 | bool SeekRelative(int64_t offset);
| ^~~~~~~~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:31:7: note: 'class webrtc::FileWrapper' defined here
31 | class FileWrapper final {
| ^~~~~~~~~~~
../subprojects/webrtc-audio-processing/webrtc/rtc_base/system/file_wrapper.cc:87:6: error: no declaration matches 'bool webrtc::FileWrapper::SeekTo(int64_t)'
87 | bool FileWrapper::SeekTo(int64_t position) {
| ^~~~~~~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:88:8: note: candidate is: 'bool webrtc::FileWrapper::SeekTo(int)'
88 | bool SeekTo(int64_t position);
| ^~~~~~
..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:31:7: note: 'class webrtc::FileWrapper' defined here
31 | class FileWrapper final {
| ^~~~~~~~~~~
GCC version:
gcc.exe (Rev5, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.