[MPlayer-dev-eng] Cygwin --disable-streaming compilation problem

Diego Biurrun diego at biurrun.de
Fri Apr 18 22:40:46 CEST 2003


Hello!

In libmpdemux/demux_mov.c the following lines can be found:

// inclusion of fcntl.h cause cygwin gcc crash
#ifndef __CYGWIN__
#include <fcntl.h>
#endif

And indeed Cygwin gcc 2.95.3-10 crashes with an internal compiler error 
if you remove the #ifndef.  The default compiler on Cygwin is 3.2 
nowadays which does not have that issue any longer.  The problem is that 
currently compilation on Cygwin fails with --disable-streaming (both 3.2 
and 2.95.3):

gcc -c -O4 -march=i586 -mcpu=i586 -pipe -ffast-math -fomit-frame-pointer 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__CYGWIN__ -I../loader 
-Ietc    -o demux_mov.o demux_mov.c
demux_mov.c: In function `mov_read_header':
demux_mov.c:1538: `O_CREAT' undeclared (first use in this function)
demux_mov.c:1538: (Each undeclared identifier is reported only once
demux_mov.c:1538: for each function it appears in.)
demux_mov.c:1538: `O_WRONLY' undeclared (first use in this function)
make[1]: *** [demux_mov.o] Error 1
make[1]: Leaving directory `/home/Administrator/0_90/libmpdemux'
make: *** [libmpdemux/libmpdemux.a] Error 2

I reported this error long ago, but Ross was not able to fix it.  It 
compiles again if I comment out the #ifndef __CYGWIN__ mentioned above. 
  So at the moment we have a tradeoff in favor of an ancient crashing 
compiler and against a configuration option.

I would like to remove (or comment out) that #ifndef __CYGWIN__ in order 
to fix compilation with --disable-streaming and a modern gcc.  A comment 
describing the problem could be put in its place so anybody who wishes 
to use the old compiler can remove the include.

Comments?

Diego




More information about the MPlayer-dev-eng mailing list