Itseez/opencv — pull request #1037 by philippefoubert (2013-06-22 11:55:34+00:00)
Title: mingw - bug correction - C99 compliance

See the bugfix #2743 i have posted 5 months ago:

Some functions provided by Microsoft does not work as described in C99 specifications. For example function 'vsnprintf' does not return number of characters that would have been printed but only '-1' if the format does not fit in the given field.

Mingw provides possibility to assume ANSI I/O standards are preferred over Microsoft's. This is enabled by
#define __USE_MINGW_ANSI_STDIO 1
before including any system libraries. This way, without modifying the code, the call to "sprintf" (Microsoft's implentation) is replaced by a call to "__mingw_sprintf" which is C99 compliant.