]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/zvbi-win32.patch
Contribs: use projectM 2.0.0
[vlc] / extras / contrib / src / Patches / zvbi-win32.patch
1 diff -ruN zvbi/src/conv.c zvbi.new/src/conv.c
2 --- zvbi/src/conv.c     2008-02-26 15:39:23.000000000 +0100
3 +++ zvbi.new/src/conv.c 2008-09-11 21:05:18.000000000 +0200
4 @@ -26,7 +26,9 @@
5  #endif
6  
7  #include <errno.h>
8 +#ifndef WIN32
9  #include <langinfo.h>
10 +#endif
11  
12  #include "misc.h"
13  #include "conv.h"
14 @@ -1234,9 +1236,12 @@
15         const char *dst_format;
16  
17         dst_format = bind_textdomain_codeset (vbi_intl_domainname, NULL);
18 -
19 +#ifdef WIN32
20 +#warning this is wrong
21 +#else
22         if (NULL == dst_format)
23                 dst_format = nl_langinfo (CODESET);
24 +#endif
25  
26         return dst_format; /* may be NULL */
27  }
28 diff -ruN zvbi/src/export.c zvbi.new/src/export.c
29 --- zvbi/src/export.c   2008-02-19 01:35:15.000000000 +0100
30 +++ zvbi.new/src/export.c       2008-09-11 20:38:55.000000000 +0200
31 @@ -40,6 +40,26 @@
32  #include "conv.h"
33  #include "vbi.h" /* asprintf */
34  
35 +#ifndef EOVERFLOW
36 + #define EOVERFLOW 75
37 +#endif
38 +
39 +#ifndef S_IRGRP
40 +#define S_IRGRP 0
41 +#endif
42 +
43 +#ifndef S_IWGRP
44 +#define S_IWGRP 0
45 +#endif
46 +
47 +#ifndef S_IROTH
48 +#define S_IROTH 0
49 +#endif
50 +
51 +#ifndef S_IWOTH
52 +#define S_IWOTH 0
53 +#endif
54 +
55  extern const char _zvbi_intl_domainname[];
56  
57  /**
58 diff -ruN zvbi/src/packet.c zvbi.new/src/packet.c
59 --- zvbi/src/packet.c   2008-02-20 18:04:33.000000000 +0100
60 +++ zvbi.new/src/packet.c       2008-09-11 21:00:35.000000000 +0200
61 @@ -32,7 +32,9 @@
62  #include <fcntl.h>
63  #include <time.h>
64  #include <errno.h>
65 +#ifndef WIN32
66  #include <sys/ioctl.h>
67 +#endif
68  
69  #include "misc.h"
70  #include "hamm.h"
71 diff -ruN zvbi/src/proxy-msg.c zvbi.new/src/proxy-msg.c
72 --- zvbi/src/proxy-msg.c        2008-02-19 01:35:21.000000000 +0100
73 +++ zvbi.new/src/proxy-msg.c    2008-09-11 21:00:07.000000000 +0200
74 @@ -129,7 +129,9 @@
75  #include <netinet/tcp.h>
76  #include <arpa/inet.h>
77  #include <netdb.h>
78 +#ifndef WIN32
79  #include <syslog.h>
80 +#endif
81  #include <assert.h>
82  #include <sys/ioctl.h>
83  #include <sys/mman.h>
84 diff -ruN zvbi/src/proxy-msg.h zvbi.new/src/proxy-msg.h
85 --- zvbi/src/proxy-msg.h        2008-02-19 01:35:21.000000000 +0100
86 +++ zvbi.new/src/proxy-msg.h    2008-09-11 20:59:40.000000000 +0200
87 @@ -68,7 +68,9 @@
88  #ifndef PROXY_MSG_H
89  #define PROXY_MSG_H
90  
91 +#ifndef WIN32
92  #include <sys/syslog.h>
93 +#endif
94  
95  /* Public */
96  
97 diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c
98 --- zvbi/src/vbi.c      2008-03-05 14:33:04.000000000 +0100
99 +++ zvbi.new/src/vbi.c  2008-09-11 20:57:55.000000000 +0200
100 @@ -39,7 +39,9 @@
101  #include <fcntl.h>
102  #include <time.h>
103  #include <errno.h>
104 +#ifndef WIN32
105  #include <sys/ioctl.h>
106 +#endif
107  #include <sys/time.h>
108  #include <pthread.h>
109  
110 --- zvbi/configure.in   2008-03-05 14:07:00.000000000 +0100
111 +++ zvbi.new/configure.in       2008-09-11 21:12:47.000000000 +0200
112 @@ -164,14 +164,14 @@
113  dnl Check how to link pthreads functions.
114  dnl (-lpthread on Linux, -pthread on FreeBSD).
115  dnl
116 -AC_CHECK_LIB(pthread, pthread_create,,[
117 -  AC_TRY_LINK(, pthread_create();,,[
118 -    LDFLAGS="$LDFLAGS -pthread"
119 -    AC_TRY_LINK(, pthread_create();,,[
120 -      AC_MSG_ERROR([Unable to link pthread functions])
121 -    ])
122 -  ])
123 -])
124 +dnl AC_CHECK_LIB(pthread, pthread_create,,[
125 +dnl  AC_TRY_LINK(, pthread_create();,,[
126 +dnl    LDFLAGS="$LDFLAGS -pthread"
127 +dnl    AC_TRY_LINK(, pthread_create();,,[
128 +dnl      AC_MSG_ERROR([Unable to link pthread functions])
129 +dnl    ])
130 +dnl  ])
131 +dnl ])
132  
133  dnl
134  dnl Check for Gnome unicode library or libc 2.1.
135 --- zvbi/src/io.c       2008-02-19 01:35:20.000000000 +0100
136 +++ zvbi2/src/io.c      2008-09-11 21:18:59.000000000 +0200
137 @@ -28,8 +28,10 @@
138  
139  #include <fcntl.h>             /* open() */
140  #include <unistd.h>            /* close(), mmap(), munmap(), gettimeofday() */
141 +#ifndef WIN32
142  #include <sys/ioctl.h>         /* ioctl() */
143  #include <sys/mman.h>          /* mmap(), munmap() */
144 +#endif
145  #include <sys/time.h>          /* struct timeval */
146  #include <sys/types.h>
147  #include <errno.h>
148 @@ -514,7 +516,7 @@
149         }
150  }
151  
152 -
153 +#ifndef WIN32
154  /**
155   * @internal
156   *
157 @@ -554,7 +556,7 @@
158                 return ret;
159         }
160  }
161 -
162 +#endif
163  /* Helper functions to log the communication between the library and drivers.
164     FIXME remove fp arg, call user log function instead (0.3). */
165  
166 @@ -668,7 +670,9 @@
167                                  "EXCL", O_EXCL,
168                                  "TRUNC", O_TRUNC,
169                                  "APPEND", O_APPEND,
170 +#ifndef WIN32
171                                  "NONBLOCK", O_NONBLOCK,
172 +#endif
173                                  0);
174                 fprintf (fp, ", 0%o)", mode);
175  
176 @@ -773,6 +777,7 @@
177         return err;
178  }
179  
180 +#ifndef WIN32
181  /**
182   * @internal
183   * Drop-in for mmap(). Logs the request on fp if not NULL.
184 @@ -822,7 +827,7 @@
185  
186         return r;
187  }
188 -
189 +#endif
190  /**
191   * @internal
192   * Drop-in for munmap(). Logs the request on fp if not NULL.
193 --- zvbi/zvbi-0.2.pc.in 2009-10-15 14:47:54.000000000 +0200
194 +++ zvbi.new/zvbi-0.2.pc.in 2009-10-15 14:47:46.000000000 +0200
195 @@ -7,5 +7,5 @@
196  Description: VBI Capturing and Decoding Library
197  Requires: 
198  Version: @VERSION@
199 -Libs: -L${libdir} -lzvbi -lm @LIBS@
200 +Libs: -L${libdir} -lzvbi -lm -lpthreadGC2 -lwsock32 @LIBS@
201  Cflags: -I${includedir}