[PATCH] bfd: handle codepage when opening files on MinGW
Mon Aug 15 11:38:20 GMT 2022
On 2022-08-15 13:07, Nick Clifton wrote:
> Hi Luis,
>> In fact, trying to build master binutils-gdb with Ubuntu 22.04's
>> mingw-w64 8.0 or Ubuntu 20.04's mingw-w64 7.0.0 runs
>> into the following:
>> bfd/bfdio.c: In function ‘_bfd_real_fopen’:
>> bfd/bfdio.c:125:28: error: implicit declaration of function
>> ‘___lc_codepage_func’ [-Werror=implicit-function-declaration]
>> 125 | const unsigned int cp = ___lc_codepage_func();
> So that would imply a missing #include of a system header, yes ?
> Do you know which header provides the required prototype ?
> The code is currently conditional upon __MINGW32__ being defined. Perhaps
> that check needs to be extended/changed to reference a different
> symbol ?
The problem is that the function is not exposed in the MinGW headers
until the 9.0 release.
I sent a patch that fixes the build error
earlier today (with you on CC).
More information about the Binutils