]> git.sesse.net Git - vlc/commitdiff
win32: Fix *printf & require mingw32-runtime version > 3.13
authorDavid Flynn <davidf@woaf.net>
Fri, 10 Apr 2009 12:53:00 +0000 (12:53 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 10 Apr 2009 16:05:25 +0000 (18:05 +0200)
*printf as per MSVCRT is not c99 compliant.  mingw32 provides a set of
replacement functions, but these are buggy in old versions.

Defining __USE_MINGW_ANSI_STDIO causes mingw's stdio to provide a
set of wrappers that use the mingw32 version that gets statically
linked.

Attention needs to be given to contrib too, it is possible for contrib
to expect a c99 *printf and later die.  This patch modifies the conrtib
bootstrap to define the above in CPPFLAGS, however, not all builds
honour CPPFLAGS.

This can be validated by looking for the import from msvcrt:

  $ find vlc-w32/vlc-1.0.0-pre1/ -name '*.dll' -print -exec sh -c \
     'i586-mingw32msvc-nm {} | grep __imp__.*printf' ';'

If all is good, this shouldn't find anything.

This patch *will* break WinCE support.  However, it is semibroken
anyway; better to force it to be fixed completely.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

No differences found