[MPlayer-dev-eng] fix compilation errors with mingw64

Stephen Sheldon sfsheldo at gmail.com
Fri Apr 29 20:35:50 CEST 2011


Diego Biurrun <diego <at> biurrun.de> writes:

> 
> On Tue, Apr 26, 2011 at 09:49:49AM -0700, Stephen Sheldon wrote:
> > I use mingw64 to compile mplayer in Windows 7 64-bits.  I use the  
> > mingw64-x86_64 packages on cygwin.  After the recent change to configure  
> > to add the flag "-Werror-implicit-funtion-declaration" I got 3  
> > compilation errors.  Attached is a patch to fix them.
> 
> Show us the errors please.
> 
> > --- configure	(revision 33331)
> > +++ configure	(working copy)
> > @@ -3885,6 +3885,9 @@
> >  echocheck "swab()"
> >  _swab=no
> >  define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a,
&b, 0)' && _swab=yes
> > +if test "$_swab" != yes ; then
> > +    define_statement_check "A A" "stdlib.h" 'int a, b; swab(&a, &b, 0)' &&
_swab=yes
> 
> Are you just trying to check for swab without _XOPEN_SOURCE defined?
> Then you should use plain statement_check.  And where is swab() in
> MinGW64?  unistd.h is the right place, if it is in stdlib.h, you
> should be patching MinGW64, not MPlayer.
> 
> > --- command.c	(revision 33331)
> > +++ command.c	(working copy)
> > @@ -69,6 +69,7 @@
> >  #include "libavutil/avstring.h"
> >  #include "edl.h"
> > +#include "osdep/strsep.h"
> 
> This one is correct, applied along with another missing instance.
> 
> Diego
> 
Here is the error for swab:

x86_64-w64-mingw32-gcc -MD -MP -Wundef -Wall -Wno-switch -Wno-parentheses
-Wpointer-arith -Wredundant-decls -Werror-implicit-function-declaration
-Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization
-Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99  -O4 -march=native
-mtune=native -pipe -ffast-math -fomit-frame-pointer -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I. -Iffmpeg
-I/mingw64/include -fno-common -DPIC -I/mingw64/include/freetype2
-I/mingw64/include -I/mingw64/include   -DFF_API_MAX_STREAMS=0 -c -o command.o
command.c
In file included from libmpdemux/aviheader.h:26:0,
                 from libmpdemux/stheader.h:23,
                 from command.c:29:
./mpbswap.h:35:6: error: conflicting types for 'swab'
/usr/x86_64-w64-mingw32/sys-root/mingw/include/stdlib.h:585:16: note: previous
declaration of 'swab' was here
make: *** [command.o] Error 1

configure has already been updated to check for string.h.  It would be great if
it could also check for stdlib.h.





More information about the MPlayer-dev-eng mailing list