• David Flynn's avatar
    win32: Fix *printf & require mingw32-runtime version > 3.13 · b8f6df75
    David Flynn authored
    *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: default avatarDavid Flynn <davidf@rd.bbc.co.uk>
    Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
    b8f6df75
configure.ac 197 KB