[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

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Aug 16 10:30:33 CEST 2007


Hello,
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.

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

GNU crappism.

> +#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).

Greetings,
Reimar Doeffinger



More information about the MPlayer-cvslog mailing list