conflicting function definitions in dvd_reader.c|h

Diego Biurrun <[email protected]> Mon, 28 Apr 2003 16:00:09 +0200
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
Hi!

I am the MPlayer documentation maintainer and I think I found a bug in
libdvdread/dvd_reader.c|h that causes an MPlayer compilation failure on  the
latest Cygwin snapshots.  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, 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.
Comments welcome.

Diego Biurrun