[FFmpeg-devel] [PATCH] Replace all %t print prefixes with macros

jamal jamrial at gmail.com
Wed Aug 22 03:04:09 CEST 2012

On 21/08/12 7:10 PM, Michael Niedermayer wrote:
> we can either leave it and blame mingw
Microsoft, who doesn't really care about C99 much, is to blame here.
Both Mingw and Mingw64 projects tried to get around this with a __USE_MINGW_ANSI_STDIO
define that would in theory make the two prefixes work, but for some reason it doesn't in some cases.
On the tests i did it even spawned new warnings about %l.
> change to PRIdPTR and hope thats not going to have sideeffects
> btw doesnt this add type mismatch warnings somewhere ?
On Linux and Windows it doesn't. It even worked as a replacement for %z as well,
but i didn't submit a patch for that since it seemed a bit of a stretch.
> or add our own identifer and set it appropriately depending on target
This is probably the best solution, adding custom macros that would output %t and %z or %I depending on the target OS.
Hopefully Windows is the only platform that doesn't support %t and %z.

More information about the ffmpeg-devel mailing list