1 |
drac 08/04/29 14:17:58 |
2 |
|
3 |
Added: ofbis-0.2.0-gcc4.patch |
4 |
Log: |
5 |
Version bump with fix for gcc-4, warnings and aclocal. |
6 |
(Portage version: 2.1.5_rc6) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-libs/ofbis/files/ofbis-0.2.0-gcc4.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/ofbis/files/ofbis-0.2.0-gcc4.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/ofbis/files/ofbis-0.2.0-gcc4.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ofbis-0.2.0-gcc4.patch |
15 |
=================================================================== |
16 |
diff -ur ofbis-0.2.0.orig/fbtst.c ofbis-0.2.0/fbtst.c |
17 |
--- ofbis-0.2.0.orig/fbtst.c 2000-02-17 16:39:34.000000000 +0200 |
18 |
+++ ofbis-0.2.0/fbtst.c 2008-04-29 17:07:20.000000000 +0300 |
19 |
@@ -2,6 +2,7 @@ |
20 |
#include <stdlib.h> |
21 |
#include <signal.h> |
22 |
#include <unistd.h> |
23 |
+#include <string.h> |
24 |
#include "src/ofbis.h" |
25 |
|
26 |
#define BLITTEST |
27 |
@@ -29,10 +30,10 @@ |
28 |
|
29 |
sigemptyset(&mask); |
30 |
|
31 |
+ memset(&sigs, 0, sizeof(sigs)); |
32 |
sigs.sa_handler = signal_handler; |
33 |
sigs.sa_mask = mask; |
34 |
sigs.sa_flags = SA_ONESHOT; |
35 |
- sigs.sa_restorer = NULL; |
36 |
|
37 |
sigaction(SIGHUP, &sigs, NULL); |
38 |
sigaction(SIGINT, &sigs, NULL); |
39 |
diff -ur ofbis-0.2.0.orig/ofbis.m4.in ofbis-0.2.0/ofbis.m4.in |
40 |
--- ofbis-0.2.0.orig/ofbis.m4.in 1999-12-12 23:34:46.000000000 +0200 |
41 |
+++ ofbis-0.2.0/ofbis.m4.in 2008-04-29 17:12:34.000000000 +0300 |
42 |
@@ -5,16 +5,21 @@ |
43 |
dnl AM_PATH_OFBIS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
44 |
dnl Test for oFBis, and define OFBIS_CFLAGS and OFBIS_LIBS |
45 |
|
46 |
-AC_DEFUN(AM_PATH_OFBIS, |
47 |
+AC_DEFUN([AM_PATH_OFBIS], |
48 |
[dnl |
49 |
dnl Get the cflags and libraries from the ofbis-config script |
50 |
dnl |
51 |
-AC_ARG_WITH(ofbis-prefix,[ --with-ofbis-prefix=PFX Prefix where oFBis is installed (optional)], |
52 |
- ofbis_config_prefix="$withval", ofbis_config_prefix="") |
53 |
-AC_ARG_WITH(ofbis-exec-prefix,[ --with-ofbis-exec-prefix=PFX Exec prefix where oFBis is installed (optional)], |
54 |
- ofbis_config_exec_prefix="$withval", ofbis_config_exec_prefix="") |
55 |
-AC_ARG_ENABLE(ofbistest, [ --disable-ofbistest Do not try to compile and run a test oFBis program], |
56 |
- , enable_ofbistest=yes) |
57 |
+AC_ARG_WITH([ofbis-prefix], |
58 |
+ [ --with-ofbis-prefix=PFX Prefix where oFBis is installed (optional)], |
59 |
+ [ofbis_config_prefix="$withval"], |
60 |
+ [ofbis_config_prefix=""]) |
61 |
+AC_ARG_WITH([ofbis-exec-prefix, |
62 |
+ [ --with-ofbis-exec-prefix=PFX Exec prefix where oFBis is installed (optional)], |
63 |
+ [ofbis_config_exec_prefix="$withval"], |
64 |
+ [ofbis_config_exec_prefix=""]) |
65 |
+AC_ARG_ENABLE([ofbistest], |
66 |
+ [ --disable-ofbistest Do not try to compile and run a test oFBis program], |
67 |
+ , [enable_ofbistest=yes]) |
68 |
|
69 |
if test x$ofbis_config_exec_prefix != x ; then |
70 |
ofbis_config_args="$ofbis_config_args --exec-prefix=$ofbis_config_exec_prefix" |
71 |
@@ -29,9 +34,9 @@ |
72 |
fi |
73 |
fi |
74 |
|
75 |
- AC_PATH_PROG(OFBIS_CONFIG, ofbis-config, no) |
76 |
- min_ofbis_version=ifelse([$1], ,@OFBIS_VERSION@,$1) |
77 |
- AC_MSG_CHECKING(for oFBis - version >= $min_ofbis_version) |
78 |
+ AC_PATH_PROG([OFBIS_CONFIG], [ofbis-config], [no]) |
79 |
+ min_ofbis_version=ifelse([$1], , @OFBIS_VERSION@, [$1]) |
80 |
+ AC_MSG_CHECKING([for oFBis - version >= $min_ofbis_version]) |
81 |
no_ofbis="" |
82 |
if test "$OFBIS_CONFIG" = "no" ; then |
83 |
no_ofbis=yes |
84 |
@@ -52,10 +57,10 @@ |
85 |
fi |
86 |
fi |
87 |
if test "x$no_ofbis" = x ; then |
88 |
- AC_MSG_RESULT(yes) |
89 |
- ifelse([$2], , :, [$2]) |
90 |
+ AC_MSG_RESULT([yes]) |
91 |
+ ifelse([$2], , [:], [$2]) |
92 |
else |
93 |
- AC_MSG_RESULT(no) |
94 |
+ AC_MSG_RESULT([no]) |
95 |
if test "$OFBIS_CONFIG" = "no" ; then |
96 |
echo "*** The ofbis-config script installed by oFBis could not be found" |
97 |
echo "*** If oFBis was installed in PREFIX, make sure PREFIX/bin is in" |
98 |
@@ -66,17 +71,17 @@ |
99 |
fi |
100 |
OFBIS_CFLAGS="" |
101 |
OFBIS_LIBS="" |
102 |
- ifelse([$3], , :, [$3]) |
103 |
+ ifelse([$3], , [:], [$3]) |
104 |
fi |
105 |
- AC_SUBST(OFBIS_CFLAGS) |
106 |
- AC_SUBST(OFBIS_LIBS) |
107 |
+ AC_SUBST([OFBIS_CFLAGS]) |
108 |
+ AC_SUBST([OFBIS_LIBS]) |
109 |
]) |
110 |
|
111 |
|
112 |
dnl AM_CHECK_LIBOFBIS(MINIMUM-VERSION, [ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]]) |
113 |
dnl Simplifies for other packages to check for libofbis. |
114 |
|
115 |
-AC_DEFUN(AM_CHECK_LIBOFBIS, |
116 |
+AC_DEFUN([AM_CHECK_LIBOFBIS], |
117 |
[ |
118 |
dnl AC_MSG_CHECKING([for libofbis version >= $1... ]) |
119 |
if test x$with_ofbis = xyes ; then |
120 |
@@ -87,13 +92,13 @@ |
121 |
if test x$with_ofbis = x ; then |
122 |
dnl Look for separately installed ofbis |
123 |
|
124 |
- AM_PATH_OFBIS($1, ifelse([$2], , :, [$2]), |
125 |
+ AM_PATH_OFBIS([$1], [ifelse([$2], , :, [$2])], |
126 |
[ifelse([$3], , |
127 |
- AC_MSG_ERROR([ |
128 |
+ [AC_MSG_ERROR([ |
129 |
*** oFBis $1 or better is required. The latest version of oFBis |
130 |
-*** is always available from ftp://ftp.nocrew.org/pub/osis/.]) |
131 |
+*** is always available from ftp://ftp.nocrew.org/pub/osis/.])] |
132 |
, [$3])], |
133 |
- ofbis) |
134 |
+ [ofbis]) |
135 |
|
136 |
ofbis_cflags=$OFBIS_CFLAGS |
137 |
ofbis_libs=$OFBIS_LIBS |
138 |
@@ -117,19 +122,19 @@ |
139 |
OFBIS_CFLAGS="-I$ofbis_dir" |
140 |
OFBIS_LIBS=$ofbis_dir/libofbis.la |
141 |
|
142 |
- ifelse([$2], , :, [$2]) |
143 |
+ ifelse([$2], , [:], [$2]) |
144 |
else |
145 |
OFBIS_CFLAGS="" |
146 |
OFBIS_LIBS="" |
147 |
ifelse([$3], , |
148 |
- AC_MSG_ERROR([oFBis directory ($with_ofbis) not present or not configured]) |
149 |
+ [AC_MSG_ERROR([oFBis directory ($with_ofbis) not present or not configured])] |
150 |
, [$3]) |
151 |
fi |
152 |
|
153 |
- AC_SUBST(OFBIS_CFLAGS) |
154 |
- AC_SUBST(OFBIS_LIBS) |
155 |
+ AC_SUBST([OFBIS_CFLAGS]) |
156 |
+ AC_SUBST([OFBIS_LIBS]) |
157 |
fi |
158 |
|
159 |
-dnl AC_MSG_RESULT(found) |
160 |
+dnl AC_MSG_RESULT([found]) |
161 |
|
162 |
]) |
163 |
diff -ur ofbis-0.2.0.orig/src/display_interleaved/i2_generic.c ofbis-0.2.0/src/display_interleaved/i2_generic.c |
164 |
--- ofbis-0.2.0.orig/src/display_interleaved/i2_generic.c 2000-02-17 16:39:39.000000000 +0200 |
165 |
+++ ofbis-0.2.0/src/display_interleaved/i2_generic.c 2008-04-29 17:07:28.000000000 +0300 |
166 |
@@ -95,8 +95,8 @@ |
167 |
|
168 |
/* Adjust sbase and dbase to bottom of block */ |
169 |
|
170 |
- (__u8 *) dbase += ( fbb->d_nxln * ( fbb->b_ht - 1 ) ); |
171 |
- (__u8 *) sbase += ( fbb->s_nxln * ( fbb->b_ht - 1 ) ); |
172 |
+ dbase = (__u16 *)((__u8 *) dbase + ( fbb->d_nxln * ( fbb->b_ht - 1 ) )); |
173 |
+ sbase = (__u16 *)((__u8 *) sbase + ( fbb->s_nxln * ( fbb->b_ht - 1 ) )); |
174 |
|
175 |
/* Set next line offsets */ |
176 |
|
177 |
@@ -148,8 +148,8 @@ |
178 |
|
179 |
/* Adjust sbase and dbase to top right of block */ |
180 |
|
181 |
- (__u8 *) dbase += ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->d_xmin % 16 ) != 0 )) * fbb->d_nxwd ); |
182 |
- (__u8 *) sbase += ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->s_xmin % 16 ) != 0 )) * fbb->s_nxwd ); |
183 |
+ dbase = (__u16 *)((__u8 *) dbase + ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->d_xmin % 16 ) != 0 )) * fbb->d_nxwd )); |
184 |
+ sbase = (__u16 *)((__u8 *) sbase + ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->s_xmin % 16 ) != 0 )) * fbb->s_nxwd )); |
185 |
|
186 |
/* Set next line offsets */ |
187 |
|
188 |
diff -ur ofbis-0.2.0.orig/src/display_packed/pp_16.c ofbis-0.2.0/src/display_packed/pp_16.c |
189 |
--- ofbis-0.2.0.orig/src/display_packed/pp_16.c 2000-02-17 16:39:42.000000000 +0200 |
190 |
+++ ofbis-0.2.0/src/display_packed/pp_16.c 2008-04-29 17:07:28.000000000 +0300 |
191 |
@@ -40,7 +40,8 @@ |
192 |
switch (f->writemode) { |
193 |
case FB_XOR: |
194 |
while (x++ <= j) { |
195 |
- *pixel++ = ~(u_int16_t)*pixel; |
196 |
+ *pixel = ~(u_int16_t)*pixel; |
197 |
+ *pixel++; |
198 |
} |
199 |
break; |
200 |
|
201 |
@@ -85,11 +86,11 @@ |
202 |
|
203 |
if (dir == BITBLT_FORWARD) { |
204 |
for(i=0; i<num; i++) { |
205 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
206 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
207 |
} |
208 |
} else { |
209 |
for(i=num-1; i>=0; i--) { |
210 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
211 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
212 |
} |
213 |
} |
214 |
} |
215 |
diff -ur ofbis-0.2.0.orig/src/display_packed/pp_32.c ofbis-0.2.0/src/display_packed/pp_32.c |
216 |
--- ofbis-0.2.0.orig/src/display_packed/pp_32.c 2000-02-17 16:39:42.000000000 +0200 |
217 |
+++ ofbis-0.2.0/src/display_packed/pp_32.c 2008-04-29 17:07:28.000000000 +0300 |
218 |
@@ -40,7 +40,8 @@ |
219 |
switch (f->writemode) { |
220 |
case FB_XOR: |
221 |
while (x++ <= j) { |
222 |
- *pixel++ = ~(u_int32_t)*pixel; |
223 |
+ *pixel = ~(u_int32_t)*pixel; |
224 |
+ *pixel++; |
225 |
} |
226 |
break; |
227 |
|
228 |
@@ -85,11 +86,11 @@ |
229 |
|
230 |
if (dir == BITBLT_FORWARD) { |
231 |
for(i=0; i<num; i++) { |
232 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
233 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
234 |
} |
235 |
} else { |
236 |
for(i=num-1; i>=0; i--) { |
237 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
238 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
239 |
} |
240 |
} |
241 |
} |
242 |
diff -ur ofbis-0.2.0.orig/src/display_packed/pp_8.c ofbis-0.2.0/src/display_packed/pp_8.c |
243 |
--- ofbis-0.2.0.orig/src/display_packed/pp_8.c 2000-02-17 16:39:42.000000000 +0200 |
244 |
+++ ofbis-0.2.0/src/display_packed/pp_8.c 2008-04-29 17:07:28.000000000 +0300 |
245 |
@@ -90,11 +90,11 @@ |
246 |
|
247 |
if (dir == BITBLT_FORWARD) { |
248 |
for(i=0; i<num; i++) { |
249 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
250 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
251 |
} |
252 |
} else { |
253 |
for(i=num-1; i>=0; i--) { |
254 |
- LOGICOP((u_int32_t)dst[i], (u_int32_t)src[i], logicop); |
255 |
+ LOGICOP(dst[i], (u_int32_t)src[i], logicop); |
256 |
} |
257 |
} |
258 |
} |
259 |
diff -ur ofbis-0.2.0.orig/src/display_planes/pl_generic.c ofbis-0.2.0/src/display_planes/pl_generic.c |
260 |
--- ofbis-0.2.0.orig/src/display_planes/pl_generic.c 2000-02-17 16:39:44.000000000 +0200 |
261 |
+++ ofbis-0.2.0/src/display_planes/pl_generic.c 2008-04-29 17:07:28.000000000 +0300 |
262 |
@@ -95,8 +95,8 @@ |
263 |
|
264 |
/* Adjust sbase and dbase to bottom of block */ |
265 |
|
266 |
- (__u8 *) dbase += ( fbb->d_nxln * ( fbb->b_ht - 1 ) ); |
267 |
- (__u8 *) sbase += ( fbb->s_nxln * ( fbb->b_ht - 1 ) ); |
268 |
+ dbase = (__u16 *)((__u8 *) dbase + ( fbb->d_nxln * ( fbb->b_ht - 1 ) )); |
269 |
+ sbase = (__u16 *)((__u8 *) sbase + ( fbb->s_nxln * ( fbb->b_ht - 1 ) )); |
270 |
|
271 |
/* Set next line offsets */ |
272 |
|
273 |
@@ -148,8 +148,8 @@ |
274 |
|
275 |
/* Adjust sbase and dbase to top right of block */ |
276 |
|
277 |
- (__u8 *) dbase += ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->d_xmin % 16 ) != 0 )) * fbb->d_nxwd ); |
278 |
- (__u8 *) sbase += ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->s_xmin % 16 ) != 0 )) * fbb->s_nxwd ); |
279 |
+ dbase = (__u16 *)((__u8 *) dbase + ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->d_xmin % 16 ) != 0 )) * fbb->d_nxwd )); |
280 |
+ sbase = (__u16 *)((__u8 *) sbase + ( ( ( ( fbb->b_wd - 1 ) / 16 ) + ( ( fbb->s_xmin % 16 ) != 0 )) * fbb->s_nxwd )); |
281 |
|
282 |
/* Set next line offsets */ |
283 |
|
284 |
diff -ur ofbis-0.2.0.orig/src/error.c ofbis-0.2.0/src/error.c |
285 |
--- ofbis-0.2.0.orig/src/error.c 2000-02-17 16:39:35.000000000 +0200 |
286 |
+++ ofbis-0.2.0/src/error.c 2008-04-29 17:07:10.000000000 +0300 |
287 |
@@ -1,5 +1,6 @@ |
288 |
#include <stdio.h> |
289 |
#include <stdarg.h> |
290 |
+#include <stdlib.h> |
291 |
#include <string.h> |
292 |
#include <errno.h> |
293 |
#include "error.h" |
294 |
diff -ur ofbis-0.2.0.orig/src/generic/line.c ofbis-0.2.0/src/generic/line.c |
295 |
--- ofbis-0.2.0.orig/src/generic/line.c 2000-02-17 16:39:47.000000000 +0200 |
296 |
+++ ofbis-0.2.0/src/generic/line.c 2008-04-29 17:07:11.000000000 +0300 |
297 |
@@ -1,5 +1,6 @@ |
298 |
#include "ofbis.h" |
299 |
#include "common.h" |
300 |
+#include <stdlib.h> |
301 |
|
302 |
/* Use Bresenham's line algorithm instead */ |
303 |
/* I think it's faster, and it's definitely shorter code |
304 |
diff -ur ofbis-0.2.0.orig/src/kbd.c ofbis-0.2.0/src/kbd.c |
305 |
--- ofbis-0.2.0.orig/src/kbd.c 2000-02-17 16:39:36.000000000 +0200 |
306 |
+++ ofbis-0.2.0/src/kbd.c 2008-04-29 17:07:11.000000000 +0300 |
307 |
@@ -209,7 +209,6 @@ |
308 |
SETORCLEAR(Mode_Home); |
309 |
*/ |
310 |
break; |
311 |
- default: |
312 |
} |
313 |
ev->keycode = key; |
314 |
ev->state = state; |
315 |
|
316 |
|
317 |
|
318 |
-- |
319 |
gentoo-commits@l.g.o mailing list |