Gentoo Archives: gentoo-commits

From: "Chi-Thanh Christopher Nguyen (chithanh)" <chithanh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/libXfont/files: libXfont-1.4.8-fontsproto-2.1.3-constchar.patch libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch
Date: Wed, 21 May 2014 16:17:41
Message-Id: 20140521161737.C39122004C@flycatcher.gentoo.org
1 chithanh 14/05/21 16:17:37
2
3 Added: libXfont-1.4.8-fontsproto-2.1.3-constchar.patch
4 libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch
5 Log:
6 Add patched version to build against fontsproto-2.1.3
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.1 x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-constchar.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-constchar.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-constchar.patch?rev=1.1&content-type=text/plain
15
16 Index: libXfont-1.4.8-fontsproto-2.1.3-constchar.patch
17 ===================================================================
18 From a96cc1f032a059da89319ceccb6659c8edd446fb Mon Sep 17 00:00:00 2001
19 From: Keith Packard <keithp@××××××.com>
20 Date: Fri, 15 Nov 2013 12:46:15 +0000
21 Subject: Warning fixes.
22
23 Many const char issues.
24
25 One extra 'i' declared in ScaleFont; we can just use the same 'i' as
26 exists at the top level scope.
27
28 Also ignore bad-function-cast in ftfuncs.c and bitscale.c because
29 we're casting the return value from floor or ceil from double to
30 int. As floor and ceil are kinda designed to generate integer results,
31 it's pretty clear that we're doing what we want and that the compiler
32 is generating noise. I'm not sure why bad-function-cast is ever a good
33 warning to turn on, but I'll leave that for another day.
34
35 Signed-off-by: Keith Packard <keithp@××××××.com>
36 Reviewed-by: Gaetan Nadon <memsize@×××××××××.ca>
37 ---
38 diff --git a/include/X11/fonts/fntfil.h b/include/X11/fonts/fntfil.h
39 index a32df63..24be79a 100644
40 --- a/include/X11/fonts/fntfil.h
41 +++ b/include/X11/fonts/fntfil.h
42 @@ -72,12 +72,12 @@ typedef struct _FontRenderer *FontRendererPtr;
43 #define FontAliasFile "fonts.alias"
44 #define FontScalableFile "fonts.scale"
45
46 -extern int FontFileNameCheck ( char *name );
47 +extern int FontFileNameCheck ( const char *name );
48 extern int FontFileInitFPE ( FontPathElementPtr fpe );
49 extern int FontFileResetFPE ( FontPathElementPtr fpe );
50 extern int FontFileFreeFPE ( FontPathElementPtr fpe );
51 extern int FontFileOpenFont ( pointer client, FontPathElementPtr fpe,
52 - Mask flags, char *name, int namelen,
53 + Mask flags, const char *name, int namelen,
54 fsBitmapFormat format, fsBitmapFormatMask fmask,
55 XID id, FontPtr *pFont, char **aliasName,
56 FontPtr non_cachable_font );
57 @@ -87,14 +87,14 @@ extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont,
58 fsBitmapFormat format,
59 fsBitmapFormatMask fmask );
60 extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe,
61 - char *pat, int len, int max,
62 + const char *pat, int len, int max,
63 FontNamesPtr names );
64 extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe,
65 - char *pat, int len, int max,
66 + const char *pat, int len, int max,
67 pointer *privatep, int mark_aliases );
68 extern int FontFileStartListFontsWithInfo ( pointer client,
69 FontPathElementPtr fpe,
70 - char *pat, int len, int max,
71 + const char *pat, int len, int max,
72 pointer *privatep );
73 extern int FontFileListNextFontWithInfo ( pointer client,
74 FontPathElementPtr fpe,
75 @@ -103,7 +103,7 @@ extern int FontFileListNextFontWithInfo ( pointer client,
76 int *numFonts, pointer private );
77 extern int FontFileStartListFontsAndAliases ( pointer client,
78 FontPathElementPtr fpe,
79 - char *pat, int len, int max,
80 + const char *pat, int len, int max,
81 pointer *privatep );
82 extern int FontFileListNextFontOrAlias ( pointer client,
83 FontPathElementPtr fpe,
84 @@ -173,7 +173,7 @@ extern int FontFileMatchBitmapSource ( FontPathElementPtr fpe,
85 fsBitmapFormatMask fmask,
86 Bool noSpecificSize );
87
88 -extern int FontFileReadDirectory ( char *directory, FontDirectoryPtr *pdir );
89 +extern int FontFileReadDirectory ( const char *directory, FontDirectoryPtr *pdir );
90 extern Bool FontFileDirectoryChanged ( FontDirectoryPtr dir );
91
92 #endif /* _FONTFILE_H_ */
93 diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h
94 index 73a8247..d3926a7 100644
95 --- a/include/X11/fonts/fontmisc.h
96 +++ b/include/X11/fonts/fontmisc.h
97 @@ -91,7 +91,7 @@ RepadBitmap (
98
99 extern void CopyISOLatin1Lowered(
100 char * /*dest*/,
101 - char * /*source*/,
102 + const char * /*source*/,
103 int /*length*/
104 );
105
106 diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
107 index 44e5e02..65efefc 100644
108 --- a/src/FreeType/ftfuncs.c
109 +++ b/src/FreeType/ftfuncs.c
110 @@ -1069,6 +1069,8 @@ FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index,
111 #endif
112 }
113
114 +#pragma GCC diagnostic ignored "-Wbad-function-cast"
115 +
116 int
117 FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp,
118 FTInstancePtr instance, int hasMetrics)
119 diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
120 index e89ba7c..b864a28 100644
121 --- a/src/bitmap/bitscale.c
122 +++ b/src/bitmap/bitscale.c
123 @@ -751,6 +751,8 @@ compute_xform_matrix(FontScalablePtr vals, double dx, double dy,
124 * ScaleFont
125 * returns a pointer to the new scaled font, or NULL (due to AllocError).
126 */
127 +#pragma GCC diagnostic ignored "-Wbad-function-cast"
128 +
129 static FontPtr
130 ScaleFont(FontPtr opf, /* originating font */
131 double widthMult, /* glyphs width scale factor */
132 @@ -811,8 +813,6 @@ ScaleFont(FontPtr opf, /* originating font */
133 needs to be for the output font */
134 if (vals->nranges)
135 {
136 - int i;
137 -
138 pfi->allExist = 0;
139 firstCol = 255;
140 lastCol = 0;
141 diff --git a/src/builtins/builtin.h b/src/builtins/builtin.h
142 index 75dff8d..f9a4cea 100644
143 --- a/src/builtins/builtin.h
144 +++ b/src/builtins/builtin.h
145 @@ -54,9 +54,9 @@ extern const int builtin_dir_count;
146 extern const BuiltinAliasRec builtin_alias[];
147 extern const int builtin_alias_count;
148
149 -extern FontFilePtr BuiltinFileOpen (char *);
150 +extern FontFilePtr BuiltinFileOpen (const char *);
151 extern int BuiltinFileClose (BufFilePtr, int);
152 -extern int BuiltinReadDirectory (char *, FontDirectoryPtr *);
153 +extern int BuiltinReadDirectory (const char *, FontDirectoryPtr *);
154 extern void BuiltinRegisterFontFileFunctions (void);
155
156 extern void BuiltinRegisterFpeFunctions (void);
157 diff --git a/src/builtins/dir.c b/src/builtins/dir.c
158 index 490e7e3..0225bfc 100644
159 --- a/src/builtins/dir.c
160 +++ b/src/builtins/dir.c
161 @@ -148,7 +148,7 @@ BuiltinAliasesRestore (BuiltinAliasPtr a_cur_tab,
162 }
163
164 int
165 -BuiltinReadDirectory (char *directory, FontDirectoryPtr *pdir)
166 +BuiltinReadDirectory (const char *directory, FontDirectoryPtr *pdir)
167 {
168 FontDirectoryPtr dir;
169 int i;
170 diff --git a/src/builtins/file.c b/src/builtins/file.c
171 index 3f657d9..93527c1 100644
172 --- a/src/builtins/file.c
173 +++ b/src/builtins/file.c
174 @@ -90,7 +90,7 @@ BuiltinClose (BufFilePtr f, int unused)
175
176
177 FontFilePtr
178 -BuiltinFileOpen (char *name)
179 +BuiltinFileOpen (const char *name)
180 {
181 int i;
182 BuiltinIOPtr io;
183 diff --git a/src/builtins/fpe.c b/src/builtins/fpe.c
184 index 689f22a..4f5d4cf 100644
185 --- a/src/builtins/fpe.c
186 +++ b/src/builtins/fpe.c
187 @@ -32,7 +32,7 @@ static int font_file_type;
188 static const char builtin_fonts[] = "built-ins";
189
190 static int
191 -BuiltinNameCheck (char *name)
192 +BuiltinNameCheck (const char *name)
193 {
194 return (strcmp (name, builtin_fonts) == 0);
195 }
196 diff --git a/src/fc/fsconvert.c b/src/fc/fsconvert.c
197 index faf2e5d..75b5372 100644
198 --- a/src/fc/fsconvert.c
199 +++ b/src/fc/fsconvert.c
200 @@ -634,7 +634,7 @@ _fs_unload_font(FontPtr pfont)
201
202 FontPtr
203 fs_create_font (FontPathElementPtr fpe,
204 - char *name,
205 + const char *name,
206 int namelen,
207 fsBitmapFormat format,
208 fsBitmapFormatMask fmask)
209 diff --git a/src/fc/fserve.c b/src/fc/fserve.c
210 index fc44d19..be1c89f 100644
211 --- a/src/fc/fserve.c
212 +++ b/src/fc/fserve.c
213 @@ -137,7 +137,7 @@ static void
214 _fs_close_server (FSFpePtr conn);
215
216 static FSFpePtr
217 -_fs_init_conn (char *servername);
218 +_fs_init_conn (const char *servername);
219
220 static int
221 _fs_wait_connect (FSFpePtr conn);
222 @@ -212,7 +212,7 @@ _fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep)
223 #endif
224
225 static Bool
226 -fs_name_check(char *name)
227 +fs_name_check(const char *name)
228 {
229 /* Just make sure there is a protocol/ prefix */
230 return (name && *name != '/' && strchr(name, '/'));
231 @@ -270,7 +270,7 @@ static int
232 fs_init_fpe(FontPathElementPtr fpe)
233 {
234 FSFpePtr conn;
235 - char *name;
236 + const char *name;
237 int err;
238 int ret;
239
240 @@ -1517,7 +1517,7 @@ _fs_do_blocked (FSFpePtr conn)
241 /* ARGSUSED */
242 static int
243 fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
244 - char *name, int namelen,
245 + const char *name, int namelen,
246 fsBitmapFormat format, fsBitmapFormatMask fmask,
247 XID id, FontPtr *ppfont)
248 {
249 @@ -1709,7 +1709,7 @@ fs_send_query_bitmaps(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
250 /* ARGSUSED */
251 static int
252 fs_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
253 - char *name, int namelen,
254 + const char *name, int namelen,
255 fsBitmapFormat format, fsBitmapFormatMask fmask,
256 XID id, FontPtr *ppfont,
257 char **alias, FontPtr non_cachable_font)
258 @@ -2259,7 +2259,7 @@ fs_read_list(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
259 }
260
261 static int
262 -fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
263 +fs_send_list_fonts(pointer client, FontPathElementPtr fpe, const char *pattern,
264 int patlen, int maxnames, FontNamesPtr newnames)
265 {
266 FSFpePtr conn = (FSFpePtr) fpe->private;
267 @@ -2315,7 +2315,7 @@ fs_send_list_fonts(pointer client, FontPathElementPtr fpe, char *pattern,
268
269 static int
270 fs_list_fonts(pointer client, FontPathElementPtr fpe,
271 - char *pattern, int patlen, int maxnames, FontNamesPtr newnames)
272 + const char *pattern, int patlen, int maxnames, FontNamesPtr newnames)
273 {
274 FSFpePtr conn = (FSFpePtr) fpe->private;
275 FSBlockDataPtr blockrec;
276 @@ -2429,7 +2429,7 @@ done:
277 /* ARGSUSED */
278 static int
279 fs_start_list_with_info(pointer client, FontPathElementPtr fpe,
280 - char *pattern, int len, int maxnames, pointer *pdata)
281 + const char *pattern, int len, int maxnames, pointer *pdata)
282 {
283 FSFpePtr conn = (FSFpePtr) fpe->private;
284 FSBlockDataPtr blockrec;
285 @@ -3145,7 +3145,7 @@ _fs_start_reconnect (FSFpePtr conn)
286
287
288 static FSFpePtr
289 -_fs_init_conn (char *servername)
290 +_fs_init_conn (const char *servername)
291 {
292 FSFpePtr conn;
293
294 diff --git a/src/fc/fserve.h b/src/fc/fserve.h
295 index 5999861..502e201 100644
296 --- a/src/fc/fserve.h
297 +++ b/src/fc/fserve.h
298 @@ -72,7 +72,7 @@ typedef struct _fs_blocked_extents *FSBlockedExtentPtr;
299 extern void _fs_convert_char_info ( fsXCharInfo *src, xCharInfo *dst );
300 extern void _fs_free_props (FontInfoPtr pfi);
301 extern FontPtr fs_create_font (FontPathElementPtr fpe,
302 - char *name,
303 + const char *name,
304 int namelen,
305 fsBitmapFormat format,
306 fsBitmapFormatMask fmask);
307 diff --git a/src/fontfile/catalogue.c b/src/fontfile/catalogue.c
308 index 6230930..81a1e13 100644
309 --- a/src/fontfile/catalogue.c
310 +++ b/src/fontfile/catalogue.c
311 @@ -40,7 +40,7 @@ static const char CataloguePrefix[] = "catalogue:";
312 static int CatalogueFreeFPE (FontPathElementPtr fpe);
313
314 static int
315 -CatalogueNameCheck (char *name)
316 +CatalogueNameCheck (const char *name)
317 {
318 return strncmp(name, CataloguePrefix, sizeof(CataloguePrefix) - 1) == 0;
319 }
320 @@ -116,7 +116,7 @@ CatalogueUnrefFPEs (FontPathElementPtr fpe)
321 if (subfpe->refcount == 0)
322 {
323 FontFileFreeFPE (subfpe);
324 - free(subfpe->name);
325 + free((void *) subfpe->name);
326 free(subfpe);
327 }
328 }
329 @@ -158,6 +158,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
330 CatalogueUnrefFPEs (fpe);
331 while (entry = readdir(dir), entry != NULL)
332 {
333 + char *name;
334 snprintf(link, sizeof link, "%s/%s", path, entry->d_name);
335 len = readlink(link, dest, sizeof dest - 1);
336 if (len < 0)
337 @@ -191,15 +192,16 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
338 * (which uses font->fpe->type) goes to CatalogueCloseFont. */
339 subfpe->type = fpe->type;
340 subfpe->name_length = len;
341 - subfpe->name = malloc (len + 1);
342 - if (subfpe->name == NULL)
343 + name = malloc (len + 1);
344 + if (name == NULL)
345 {
346 free(subfpe);
347 continue;
348 }
349
350 - memcpy(subfpe->name, dest, len);
351 - subfpe->name[len] = '\0';
352 + memcpy(name, dest, len);
353 + name[len] = '\0';
354 + subfpe->name = name;
355
356 /* The X server will manipulate the subfpe ref counts
357 * associated with the font in OpenFont and CloseFont, so we
358 @@ -208,7 +210,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan)
359
360 if (FontFileInitFPE (subfpe) != Successful)
361 {
362 - free(subfpe->name);
363 + free((void *) subfpe->name);
364 free(subfpe);
365 continue;
366 }
367 @@ -280,7 +282,7 @@ CatalogueFreeFPE (FontPathElementPtr fpe)
368
369 static int
370 CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
371 - char *name, int namelen,
372 + const char *name, int namelen,
373 fsBitmapFormat format, fsBitmapFormatMask fmask,
374 XID id, FontPtr *pFont, char **aliasName,
375 FontPtr non_cachable_font)
376 @@ -314,7 +316,7 @@ CatalogueCloseFont (FontPathElementPtr fpe, FontPtr pFont)
377 }
378
379 static int
380 -CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat,
381 +CatalogueListFonts (pointer client, FontPathElementPtr fpe, const char *pat,
382 int len, int max, FontNamesPtr names)
383 {
384 CataloguePtr cat = fpe->private;
385 @@ -339,7 +341,7 @@ typedef struct _LFWIData {
386
387 static int
388 CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
389 - char *pat, int len, int max, pointer *privatep,
390 + const char *pat, int len, int max, pointer *privatep,
391 int mark_aliases)
392 {
393 CataloguePtr cat = fpe->private;
394 @@ -375,7 +377,7 @@ CatalogueStartListFonts(pointer client, FontPathElementPtr fpe,
395
396 static int
397 CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
398 - char *pat, int len, int max,
399 + const char *pat, int len, int max,
400 pointer *privatep)
401 {
402 return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 0);
403 @@ -413,7 +415,7 @@ CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
404
405 static int
406 CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
407 - char *pat, int len, int max,
408 + const char *pat, int len, int max,
409 pointer *privatep)
410 {
411 return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 1);
412 diff --git a/src/fontfile/dirfile.c b/src/fontfile/dirfile.c
413 index 0d34db9..cb28333 100644
414 --- a/src/fontfile/dirfile.c
415 +++ b/src/fontfile/dirfile.c
416 @@ -49,8 +49,10 @@ static int ReadFontAlias ( char *directory, Bool isFile,
417 static int lexAlias ( FILE *file, char **lexToken );
418 static int lexc ( FILE *file );
419
420 +#pragma GCC diagnostic ignored "-Wformat-nonliteral"
421 +
422 int
423 -FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
424 +FontFileReadDirectory (const char *directory, FontDirectoryPtr *pdir)
425 {
426 char file_name[MAXFONTFILENAMELEN];
427 char font_name[MAXFONTNAMELEN];
428 diff --git a/src/fontfile/fontfile.c b/src/fontfile/fontfile.c
429 index c55282b..05a9610 100644
430 --- a/src/fontfile/fontfile.c
431 +++ b/src/fontfile/fontfile.c
432 @@ -50,7 +50,7 @@ ISOLatin1ToLower(unsigned char source)
433 }
434
435 _X_HIDDEN void
436 -CopyISOLatin1Lowered(char *dest, char *source, int length)
437 +CopyISOLatin1Lowered(char *dest, const char *source, int length)
438 {
439 int i;
440 for (i = 0; i < length; i++, source++, dest++)
441 @@ -69,7 +69,7 @@ static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
442 FontPtr non_cachable_font);
443
444 int
445 -FontFileNameCheck (char *name)
446 +FontFileNameCheck (const char *name)
447 {
448 #ifndef NCD
449 #if defined(WIN32)
450 @@ -254,7 +254,7 @@ transfer_values_to_alias(char *entryname, int entrynamelength,
451 /* ARGSUSED */
452 int
453 FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
454 - char *name, int namelen,
455 + const char *name, int namelen,
456 fsBitmapFormat format, fsBitmapFormatMask fmask,
457 XID id, FontPtr *pFont, char **aliasName,
458 FontPtr non_cachable_font)
459 @@ -688,7 +688,7 @@ _FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
460 /* ARGSUSED */
461 static int
462 _FontFileListFonts (pointer client, FontPathElementPtr fpe,
463 - char *pat, int len, int max, FontNamesPtr names,
464 + const char *pat, int len, int max, FontNamesPtr names,
465 int mark_aliases)
466 {
467 FontDirectoryPtr dir;
468 @@ -794,7 +794,7 @@ typedef struct _LFWIData {
469 } LFWIDataRec, *LFWIDataPtr;
470
471 int
472 -FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
473 +FontFileListFonts (pointer client, FontPathElementPtr fpe, const char *pat,
474 int len, int max, FontNamesPtr names)
475 {
476 return _FontFileListFonts (client, fpe, pat, len, max, names, 0);
477 @@ -802,7 +802,7 @@ FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
478
479 int
480 FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
481 - char *pat, int len, int max,
482 + const char *pat, int len, int max,
483 pointer *privatep, int mark_aliases)
484 {
485 LFWIDataPtr data;
486 @@ -833,7 +833,7 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
487
488 int
489 FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
490 - char *pat, int len, int max,
491 + const char *pat, int len, int max,
492 pointer *privatep)
493 {
494 return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 0);
495 @@ -1067,7 +1067,7 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
496
497 int
498 FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
499 - char *pat, int len, int max,
500 + const char *pat, int len, int max,
501 pointer *privatep)
502 {
503 return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 1);
504 diff --git a/src/util/patcache.c b/src/util/patcache.c
505 index 9c05fa1..2101015 100644
506 --- a/src/util/patcache.c
507 +++ b/src/util/patcache.c
508 @@ -50,7 +50,7 @@ typedef unsigned char EntryPtr;
509 typedef struct _FontPatternCacheEntry {
510 struct _FontPatternCacheEntry *next, **prev;
511 short patlen;
512 - char *pattern;
513 + const char *pattern;
514 int hash;
515 FontPtr pFont; /* associated font */
516 } FontPatternCacheEntryRec, *FontPatternCacheEntryPtr;
517 @@ -74,7 +74,7 @@ EmptyFontPatternCache (FontPatternCachePtr cache)
518 cache->entries[i].next = &cache->entries[i+1];
519 cache->entries[i].prev = 0;
520 cache->entries[i].pFont = 0;
521 - free (cache->entries[i].pattern);
522 + free ((void *) cache->entries[i].pattern);
523 cache->entries[i].pattern = 0;
524 cache->entries[i].patlen = 0;
525 }
526 @@ -107,7 +107,7 @@ FreeFontPatternCache (FontPatternCachePtr cache)
527 int i;
528
529 for (i = 0; i < NENTRIES; i++)
530 - free (cache->entries[i].pattern);
531 + free ((void *) cache->entries[i].pattern);
532 free (cache);
533 }
534
535 @@ -128,7 +128,7 @@ Hash (const char *string, int len)
536 /* add entry */
537 void
538 CacheFontPattern (FontPatternCachePtr cache,
539 - char *pattern,
540 + const char *pattern,
541 int patlen,
542 FontPtr pFont)
543 {
544 @@ -154,7 +154,7 @@ CacheFontPattern (FontPatternCachePtr cache,
545 if (e->next)
546 e->next->prev = e->prev;
547 *e->prev = e->next;
548 - free (e->pattern);
549 + free ((void *) e->pattern);
550 }
551 /* set pattern */
552 memcpy (newpat, pattern, patlen);
553 @@ -174,7 +174,7 @@ CacheFontPattern (FontPatternCachePtr cache,
554 /* find matching entry */
555 FontPtr
556 FindCachedFontPattern (FontPatternCachePtr cache,
557 - char *pattern,
558 + const char *pattern,
559 int patlen)
560 {
561 int hash;
562 @@ -211,7 +211,7 @@ RemoveCachedFontPattern (FontPatternCachePtr cache,
563 *e->prev = e->next;
564 e->next = cache->free;
565 cache->free = e;
566 - free (e->pattern);
567 + free ((void *) e->pattern);
568 e->pattern = 0;
569 }
570 }
571 --
572 cgit v0.9.0.2-2-gbebe
573
574
575
576 1.1 x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch
577
578 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch?rev=1.1&view=markup
579 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/libXfont/files/libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch?rev=1.1&content-type=text/plain
580
581 Index: libXfont-1.4.8-fontsproto-2.1.3-configure_ac.patch
582 ===================================================================
583 From 5a398a55ccdd92d0ff05793692ef8e57f3a50198 Mon Sep 17 00:00:00 2001
584 From: Alan Coopersmith <alan.coopersmith@××××××.com>
585 Date: Mon, 21 Apr 2014 01:10:07 +0000
586 Subject: Require fontsproto 2.1.3 for matching function prototypes
587
588 Building current libXfont git against fontsproto 2.1.2 causes clang
589 complaints of:
590
591 patcache.c:130:1: error: conflicting types for 'CacheFontPattern'
592 CacheFontPattern (FontPatternCachePtr cache,
593 ^
594 patcache.c:176:1: error: conflicting types for 'FindCachedFontPattern'
595 FindCachedFontPattern (FontPatternCachePtr cache,
596 ^
597
598 due to the constification of arguments not matching.
599
600 Signed-off-by: Alan Coopersmith <alan.coopersmith@××××××.com>
601 Reviewed-by: Thomas Klausner <wiz@××××××.org>
602 ---
603 diff --git a/configure.ac b/configure.ac
604 index cbb540a..e78e56a 100644
605 --- a/configure.ac
606 +++ b/configure.ac
607 @@ -180,7 +180,7 @@ fi
608 AC_CHECK_LIB(m, hypot, [MATH_LIBS=-lm
609 AC_SUBST(MATH_LIBS)], AC_MSG_ERROR([*** libm is required]))
610
611 -PKG_CHECK_MODULES(XFONT, [xproto xtrans fontsproto < 2.1.3 fontenc])
612 +PKG_CHECK_MODULES(XFONT, [xproto xtrans fontsproto >= 2.1.3 fontenc])
613
614 # Transport selection macro from xtrans.m4
615 XTRANS_CONNECTION_FLAGS
616 --
617 cgit v0.9.0.2-2-gbebe