[FFmpeg-devel] FATE failure on mingw gcc-4.2.4

Ramiro Polla ramiro.polla
Tue Mar 9 06:30:02 CET 2010


2010/3/9 M?ns Rullg?rd <mans at mansr.com>:
> The build failures on mingw with gcc 4.2.4 are caused by the recent
> addition of -Werror=missing-prototypes triggering an error in
> stdio.h. ?For some reason, this gcc version isn't treating this as a
> system header and suppressing warnings.
>
> It might be possible to work around this by providing an explicit
> --sysroot argument to ffmpeg's configure. ?Could someone with an
> affected system please try this?

--sysroot made no difference. I had to rebuild binutils for FFmpeg's
configure to accept sysroot, should I rebuild gcc with some other
option too?

from _mingw.h:	
# if __GNUC_STDC_INLINE__
#  define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
# else
#  define __CRT_INLINE extern __inline__
# endif

from stdio.h:
#if !defined _MT

__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
{
  return (--__F->_cnt >= 0)
    ?  (int) (unsigned char) *__F->_ptr++
    : _filbuf (__F);
}

__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
{
  return (--__F->_cnt >= 0)
    ?  (int) (unsigned char) (*__F->_ptr++ = (char)__c)
    :  _flsbuf (__c, __F);
}

__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
{
  return (--stdin->_cnt >= 0)
    ?  (int) (unsigned char) *stdin->_ptr++
    : _filbuf (stdin);
}

__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
{
  return (--stdout->_cnt >= 0)
    ?  (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
    :  _flsbuf (__c, stdout);}

#else  /* Use library functions.  */

_CRTIMP int __cdecl __MINGW_NOTHROW     getc (FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW     putc (int, FILE*);
_CRTIMP int __cdecl __MINGW_NOTHROW     getchar (void);
_CRTIMP int __cdecl __MINGW_NOTHROW     putchar (int);

#endif

in 4.2.2 that becomes (text vertically aligned):
extern __inline__                             int
__attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getc (FILE*
__F)
in 4.4.2 that becomes:
extern inline __attribute__((__gnu_inline__)) int
__attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getc (FILE*
__F)

if I define _MT it works (I have no idea what that is, but I'd guess
thread-safe something).



More information about the ffmpeg-devel mailing list