[MPlayer-cvslog] r24067 - in trunk: Changelog Copyright configure dvdread/Makefile dvdread/bswap.h dvdread/dvd_input.c dvdread/dvd_input.h dvdread/dvd_reader.c dvdread/dvd_reader.h dvdread/dvd_udf.c dvdread/dvd_udf.h dvdread/dvdread_internal.h dvdread/ifo_print.c dvdread/ifo_read.c dvdread/ifo_types.h dvdread/nav_print.c dvdread/nav_read.c dvdread/nav_types.h stream/stream_dvd_common.c

Diego Biurrun diego at biurrun.de
Thu Aug 16 12:52:17 CEST 2007


On Thu, Aug 16, 2007 at 10:30:33AM +0200, Reimar Doeffinger wrote:
> On Wed, Aug 15, 2007 at 01:47:22PM +0200, diego wrote:
> [...]
> > @@ -61,7 +61,19 @@
> >  #include <sys/endian.h>
> >  #define B2N_16(x) x = be16toh(x)
> >  #define B2N_32(x) x = be32toh(x)
> > +#if __FreeBSD_version >= 500000
> >  #define B2N_64(x) x = be64toh(x)
> > +#else
> > +#define B2N_64(x)                               \
> > +  x = ((((x) & 0xff00000000000000) >> 56) |     \
> > +       (((x) & 0x00ff000000000000) >> 40) |     \
> > +       (((x) & 0x0000ff0000000000) >> 24) |     \
> > +       (((x) & 0x000000ff00000000) >>  8) |     \
> > +       (((x) & 0x00000000ff000000) <<  8) |     \
> > +       (((x) & 0x0000000000ff0000) << 24) |     \
> > +       (((x) & 0x000000000000ff00) << 40) |     \
> > +       (((x) & 0x00000000000000ff) << 56))
> > +#endif /* _FreeBSD_version >= 500000 */
> 
> I just hope we can get rid of this stuff soon, this must be about the
> worst possible implementation of this in every respect.

You mean the FreeBSD version check?  Yes, horrible ...

> > @@ -25,18 +25,26 @@
> >  
> >  #include <stdio.h>
> >  #include <stdlib.h>
> > +#define __USE_GNU /* to get O_DIRECT in linux */
> 
> GNU crappism.

It causes a warning on my system to boot:

dvd_input.c:25:1: warning: "__USE_GNU" redefined
In file included from /usr/include/stdio.h:28,
                 from dvd_input.c:23:
/usr/include/features.h:269:1: warning: this is the location of the previous definition

> > +#ifdef WIN32 /* replacement gettimeofday implementation */
> > +#include <sys/timeb.h>
> > +static int gettimeofday( struct timeval *tv, void *tz )
> > +{
> > +  struct timeb t;
> > +  ftime( &t );
> > +  tv->tv_sec = t.time;
> > +  tv->tv_usec = t.millitm * 1000;
> > +  return 0;
> > +}
> > +#endif
> 
> According to a report on -users this breaks compilation. And I think
> both MinGW and Cygwin do have gettimeofday (and in addition I wonder
> what business dvdread has using this).

We had a gettimeofday() implementation in our local patch. I overlooked
that another one was added.  I've removed the local one, but I'm not
sure it will fix the compilation problem, most likely not.

Diego



More information about the MPlayer-cvslog mailing list