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

Diego Biurrun diego at biurrun.de
Sun Apr 20 13:17:17 CEST 2003


Sascha Sommer writes:
 > > 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?
 > 
 > Can you try with
 > #ifndef _FCNTL_H
 > #include <fcntl.h>
 > #endif
 > 
 > Afair cygwins gcc 2.5 crashes when including a header 2 times.

Bingo!  Now gcc 2.95.3-10 does not crash any longer and 3.2 is fine as
before.

 > If it works we only have to check that  inclusion of fcntl defines _FCNTL_H
 > everywhere

fcntl.h contains the following two lines so I assume this to be the
case:

#ifndef _FCNTL_H
#define _FCNTL_H

OK to commit the following patch?

Diego

--- libmpdemux/demux_mov.c	15 Mar 2003 10:52:30 -0000	1.96
+++ libmpdemux/demux_mov.c	20 Apr 2003 11:38:22 -0000
@@ -44,8 +44,7 @@
 #include <zlib.h>
 #endif
 
-// inclusion of fcntl.h cause cygwin gcc crash
-#ifndef __CYGWIN__
+#ifndef _FCNTL_H
 #include <fcntl.h>
 #endif



More information about the MPlayer-dev-eng mailing list