[flac-dev] Patch to add Unicode filename support for win32 flac

LRN lrn1986 at gmail.com
Sun Mar 17 18:55:07 PDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18.03.2013 02:10, JonY wrote:
> On 3/17/2013 23:01, LRN wrote:
>>> All those ifdefs will at least be confined rather than spread
>>> out through the code.
>> I did it plibc-style:
>> 
>> in compat.h: #if defined(_WIN32) #define FOPEN
>> grabbag__fopen_utf8_wrapper #else #define FOPEN fopen #endif
>> 
>> in grabbag: #if defined(_WIN32) <implement
>> grabbag__fopen_utf8_wrapper, which has the same signature as
>> fopen, but does utf8->utf16 conversion internally, then calls
>> wfopen> #endif
>> 
>> and replace "fopen" with "FOPEN" everywhere else.
> 
> Don't do that, it leaks into the system headers
How? compat.h is not a public header, it is only used internally in
FLAC. And i don't think that system headers have defines for "FOPEN"
and such.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRRnP7AAoJEOs4Jb6SI2CwxWoH/13eGOZb62iAm4SzkDFQ6/Bh
2Goz3lz+9fK4Gq+tXyfPmXC1JabLdM1vnw43QgkAVWr3OrJ2+AN+LHocP9+YCYG4
ckd5Eisi32taDr3+CnaJzOrYQnaeD926iPC2vQoVOMIniGWTRVzIIYxood0gGXd3
oa5hPMvq1t/TXyKudSt8Jimeoe6vyoaLcBJCMykn9B5qh//ryiajGJlwQgicessb
Rzw0/VgbLcck3XLyzm7gfsXxiYhRjeSalZyPxYw6DE8rsARxswk1TfWLB7faPAiI
spaA2mEX7iQz9GPmKlhil/Q/rzsn3vt8lgHbC+WDD0843kkaC3MWPvPdqqsbFh4=
=3u0R
-----END PGP SIGNATURE-----


More information about the flac-dev mailing list