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 and breaks mingw if
FLAC_USE_FOPEN_UTF8 is defined.

Call the wrappers directly instead of using a macro.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to