[FFmpeg-devel] [PATCH] [RFC] avoid _vscnprintf since it exists only since WinXP.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 22 21:29:19 CEST 2012

On Sun, Jul 22, 2012 at 09:10:06PM +0200, Nicolas George wrote:
> Le quintidi 5 thermidor, an CCXX, Reimar Döffinger a écrit :
> > The MSDN documentation is wrong, this function does not exist
> > on e.g. Win2k.
> > By my reading of the only case where it is used, this hack should work
> > almost as well, though it is ugly and comes with a risk of breaking
> > in the future.
> I intended to submit a slightly less ugly hack (vsnprintf to a reasonably
> large automatic buffer and memcpy). But this version is fine for now.

I think there is no hurry if you work on something anyway.

> I would be happier if there was a configure check. Unfortunately, I am
> completely clueless about the maze of twisty compiler and libc versions, all
> alike that makes the windows build environment

The problem is that the usual use-case on Windows is that someone builds
a generic binary everyone uses.
A configure check doesn't really work well.
Also IMHO unless there is a serious problem with it I consider it better
to always use the fallback code, it reduces overall complexity and
avoids having code paths that are almost never tested.

More information about the ffmpeg-devel mailing list