]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/libdvdread-20041028-win32.patch
* compile before you commit
[vlc] / extras / contrib / src / Patches / libdvdread-20041028-win32.patch
1 ? winwx.sh
2 Index: configure.in
3 ===================================================================
4 RCS file: /cvsroot/ogle/libdvdread/configure.in,v
5 retrieving revision 1.24
6 diff -u -r1.24 configure.in
7 --- configure.in        5 Jul 2003 18:30:25 -0000       1.24
8 +++ configure.in        2 Sep 2004 13:43:23 -0000
9 @@ -77,6 +77,11 @@
10        [ ],
11        AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
12      )
13 +    case "x${host}" in
14 +    x*mingw32* | x*cygwin*)
15 +    CSS_LIBS=-ldvdcss
16 +    ;;
17 +    x*)
18      AC_MSG_CHECKING([for dvdcss_interface_2 in -ldvdcss])
19      saved_LDFLAGS=$LDFLAGS
20      LDFLAGS="$LDFLAGS -ldvdcss"
21 @@ -88,6 +93,8 @@
22          ] )
23      LDFLAGS=$saved_LDFLAGS
24      AC_MSG_RESULT([yes])
25 +    ;;
26 +    esac
27    else
28      dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
29      saved_CPPFLAGS=$CPPFLAGS
30 @@ -99,6 +106,12 @@
31      CPPFLAGS=$saved_CPPFLAGS
32      saved_CFLAGS=$CFLAGS
33      CFLAGS="$CFLAGS -I$dvdcss_path/include -L$dvdcss_path/lib -ldvdcss"
34 +    case "x${host}" in
35 +    x*mingw32* | x*cygwin*)
36 +    CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
37 +    CSS_CFLAGS=-I$dvdcss_path/include
38 +    ;;
39 +    x*)
40      AC_MSG_CHECKING([for dvdcss_interface_2 in -ldvdcss])
41      AC_TRY_LINK([#include <dvdcss/dvdcss.h>], 
42                  [if(!dvdcss_interface_2) { return 1; }],
43 @@ -109,6 +122,8 @@
44          ] )
45      CFLAGS=$saved_CFLAGS
46      AC_MSG_RESULT([yes])
47 +    ;;
48 +    esac
49    fi
50  fi
51  
52 Index: dvdread/bswap.h
53 ===================================================================
54 RCS file: /cvsroot/ogle/libdvdread/dvdread/bswap.h,v
55 retrieving revision 1.10
56 diff -u -r1.10 bswap.h
57 --- dvdread/bswap.h     18 Jun 2003 13:35:03 -0000      1.10
58 +++ dvdread/bswap.h     2 Sep 2004 13:43:25 -0000
59 @@ -85,14 +85,14 @@
60        (((x) & 0x0000ff00) <<  8) | \
61        (((x) & 0x000000ff) << 24))
62  #define B2N_64(x) \
63 - x = ((((x) & 0xff00000000000000) >> 56) | \
64 -      (((x) & 0x00ff000000000000) >> 40) | \
65 -      (((x) & 0x0000ff0000000000) >> 24) | \
66 -      (((x) & 0x000000ff00000000) >>  8) | \
67 -      (((x) & 0x00000000ff000000) <<  8) | \
68 -      (((x) & 0x0000000000ff0000) << 24) | \
69 -      (((x) & 0x000000000000ff00) << 40) | \
70 -      (((x) & 0x00000000000000ff) << 56))
71 + x = ((((x) & 0xff00000000000000LL) >> 56) | \
72 +      (((x) & 0x00ff000000000000LL) >> 40) | \
73 +      (((x) & 0x0000ff0000000000LL) >> 24) | \
74 +      (((x) & 0x000000ff00000000LL) >>  8) | \
75 +      (((x) & 0x00000000ff000000LL) <<  8) | \
76 +      (((x) & 0x0000000000ff0000LL) << 24) | \
77 +      (((x) & 0x000000000000ff00LL) << 40) | \
78 +      (((x) & 0x00000000000000ffLL) << 56))
79  
80  #else
81  
82 Index: dvdread/dvd_input.c
83 ===================================================================
84 RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_input.c,v
85 retrieving revision 1.8
86 diff -u -r1.8 dvd_input.c
87 --- dvdread/dvd_input.c 4 Apr 2004 20:02:27 -0000       1.8
88 +++ dvdread/dvd_input.c 2 Sep 2004 13:43:25 -0000
89 @@ -21,11 +21,23 @@
90  
91  #include <stdio.h>
92  #include <stdlib.h>
93 +
94 +#if defined(HAVE_INTTYPES_H)
95 +#include <inttypes.h>
96 +#elif defined(HAVE_STDINT_H)
97 +#include <stdint.h>
98 +#endif
99 +
100  #include <fcntl.h>
101  #include <unistd.h>
102  
103  #include "dvd_reader.h"
104  #include "dvd_input.h"
105 +
106 +#ifdef WIN32
107 +#   define lseek _lseeki64
108 +#   define off_t int64_t
109 +#endif
110  
111  /* The function pointers that is the exported interface of this file. */
112  dvd_input_t (*dvdinput_open)  (const char *);