[flac-dev] A small build fix for some MinGW toolchains

Виталий Новичков admin at wohlnet.ru
Wed Aug 14 11:27:09 UTC 2019


Hello!

Many years ago I have found some bugs are prevented build of libFLAC on 
some MinGW toolchains and I made my own patch to fix that.

- The `_wutime64()` call may absent. For this case I using the 
`_wutime()` call as a fallback when _wutime64() is unavailable.

- `_stricmp` and `_strnicmp` are also may fail. Therefore it's prefer to 
use `stricmp` and `strnicmp` (without `_` prefix) on MinGW toolchains.

I have added a small check into CMake build, however, I didn't touched 
Automake and MSVC builds yet. Anyway, for MSVC builds you can simply 
define the `HAVE_WUTIME64` macro if MSVC toolchains are always have that 
call available.

I have included a patch and a simple test program which tests 
availability of `_wutime64()` call.

Can you apply my patch or make a different fix of this issue?


Best regards,

Vitaly Novichkov "Wohlstand"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wutime64_test.c
Type: text/x-csrc
Size: 322 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20190814/96a1afdf/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Build-fix-for-some-MinGW-toolchains.patch
Type: text/x-patch
Size: 3711 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20190814/96a1afdf/attachment.bin>


More information about the flac-dev mailing list