[MPlayer-dev-eng] conflicting function definitions in libmpdvdkit2/dvd_reader.c|h

Diego Biurrun diego at biurrun.de
Mon Apr 28 12:23:44 CEST 2003


Hi!

I think I found a bug in libmpdvdkit2/dvd_reader.c|h that causes a 
compilation failure (both 0_90 and main) on Cygwin.  There are 
incompatible defintions of the DVDFileSeek function in the .h and the .c 
file.

dvd_reader.h:
   int DVDFileSeek( dvd_file_t *, int );

dvd_reader.c:
   int32_t DVDFileSeek( dvd_file_t *dvd_file, int32_t offset);

int and int32_t are not the same on Cygwin in the latest snapshot (which 
  finally provides inttypes.h), resulting in the following error:

gcc -I. -O4 -march=k6-2 -mcpu=k6-2 -pipe -ffast-math 
-fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-D__CYGWIN__ -DHAVE_MPLAYER  -DSYS_LINUX -D__USE_UNIX98 -D_REENTRANT 
-D_GNU_SOURCE -c -o dvd_reader.o dvd_reader.c
dvd_reader.c:876: conflicting types for `DVDFileSeek'
dvd_reader.h:130: previous declaration of `DVDFileSeek'
make: *** [dvd_reader.o] Error 1

.c and .h files should never have incompatible definitions, right?
Changing either one of the two files to all int or all int32_t fixes the 
problem, but I have no idea which version is to be prefered...
There are no changes to this in the latest CVS version of libdvdread. 
If we should change this here, I'll send a patch upstream.

Comments welcome.

Diego




More information about the MPlayer-dev-eng mailing list