This patch renames flac_internal_CreateFile_utf8() function to grabbag__CreateFile_utf8() and moves it from /src/libFLAC/windows_unicode_filenames.c into src/share/grabbag/file.c This function is not used by libFLAC anyway. After this, it should be possible to compile libFLAC as UWP. In the old code there were 3 different #if conditionals around the code that uses CreateFile_utf8(): 1) #ifdef _WIN32 ... #endif 2) #if defined _WIN32 && !defined __CYGWIN__ ... #endif 3) #if defined _MSC_VER || defined __MINGW32__ ... #endif It seems for me that the 2nd version makes more sense,so I replaced them all with it. Also this patch removes WINAPI_FAMILY_PARTITION ... CreateFile2 etc stuff from the code. The file src/share/grabbag/file.c contains non-UWP function GetFileInformationByHandle, and nobody complained, so it's OK to use non-UWP CreateFileA/CreateFileW as well. -------------- next part -------------- A non-text attachment was scrubbed... Name: move_function_CreateFile_out_of_libFLAC.patch Type: application/octet-stream Size: 8362 bytes Desc: not available URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20180818/60d6d22e/attachment.obj>
Erik de Castro Lopo
2018-Aug-19 05:15 UTC
[flac-dev] [PATCH] move CreateFile() function from libFLAC
lvqcl wrote:> This patch renames flac_internal_CreateFile_utf8() function to > grabbag__CreateFile_utf8() and > moves it from /src/libFLAC/windows_unicode_filenames.c into > src/share/grabbag/file.c > This function is not used by libFLAC anyway. > > After this, it should be possible to compile libFLAC as UWP.Was submitted via github and has been merged. Thanks! Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/