]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/libdvdread-win32.patch
Fix x264 compilation
[vlc] / extras / contrib / src / Patches / libdvdread-win32.patch
1 Index: dvdread/bswap.h
2 ===================================================================
3 RCS file: /cvsroot/ogle/libdvdread/dvdread/bswap.h,v
4 retrieving revision 1.10
5 diff -u -r1.10 bswap.h
6 --- dvdread/bswap.h     18 Jun 2003 13:35:03 -0000      1.10
7 +++ dvdread/bswap.h     2 Sep 2004 13:43:25 -0000
8 @@ -85,14 +85,14 @@
9        (((x) & 0x0000ff00) <<  8) | \
10        (((x) & 0x000000ff) << 24))
11  #define B2N_64(x) \
12 - x = ((((x) & 0xff00000000000000) >> 56) | \
13 -      (((x) & 0x00ff000000000000) >> 40) | \
14 -      (((x) & 0x0000ff0000000000) >> 24) | \
15 -      (((x) & 0x000000ff00000000) >>  8) | \
16 -      (((x) & 0x00000000ff000000) <<  8) | \
17 -      (((x) & 0x0000000000ff0000) << 24) | \
18 -      (((x) & 0x000000000000ff00) << 40) | \
19 -      (((x) & 0x00000000000000ff) << 56))
20 + x = ((((x) & 0xff00000000000000LL) >> 56) | \
21 +      (((x) & 0x00ff000000000000LL) >> 40) | \
22 +      (((x) & 0x0000ff0000000000LL) >> 24) | \
23 +      (((x) & 0x000000ff00000000LL) >>  8) | \
24 +      (((x) & 0x00000000ff000000LL) <<  8) | \
25 +      (((x) & 0x0000000000ff0000LL) << 24) | \
26 +      (((x) & 0x000000000000ff00LL) << 40) | \
27 +      (((x) & 0x00000000000000ffLL) << 56))
28  
29  #else
30  
31 Index: dvdread/dvd_input.c
32 ===================================================================
33 RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_input.c,v
34 retrieving revision 1.8
35 diff -u -r1.8 dvd_input.c
36 --- dvdread/dvd_input.c 4 Apr 2004 20:02:27 -0000       1.8
37 +++ dvdread/dvd_input.c 2 Sep 2004 13:43:25 -0000
38 @@ -21,11 +21,23 @@
39  
40  #include <stdio.h>
41  #include <stdlib.h>
42 +
43 +#if defined(HAVE_INTTYPES_H)
44 +#include <inttypes.h>
45 +#elif defined(HAVE_STDINT_H)
46 +#include <stdint.h>
47 +#endif
48 +
49  #include <fcntl.h>
50  #include <unistd.h>
51  
52  #include "dvd_reader.h"
53  #include "dvd_input.h"
54 +
55 +#ifdef WIN32
56 +#   define lseek _lseeki64
57 +#   define off_t int64_t
58 +#endif
59  
60  /* The function pointers that is the exported interface of this file. */
61  dvd_input_t (*dvdinput_open)  (const char *);