|
| 1 | +commit 28165a9b078583dc8e9e5c344510e37582284cef |
| 2 | +Author: fanquake < [email protected]> |
| 3 | +Date: Mon Aug 17 20:35:42 2020 +0800 |
| 4 | + |
| 5 | + Remove usage of CHAR_WIDTH |
| 6 | + |
| 7 | + CHAR_WIDTH which is reserved and clashes with glibc 2.25+ |
| 8 | + |
| 9 | + See #10851. |
| 10 | + |
| 11 | +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h |
| 12 | +index 5c72b22..843c532 100644 |
| 13 | +--- a/fontconfig/fontconfig.h |
| 14 | ++++ b/fontconfig/fontconfig.h |
| 15 | +@@ -128,7 +128,7 @@ typedef int FcBool; |
| 16 | + #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION |
| 17 | + |
| 18 | + /* Adjust outline rasterizer */ |
| 19 | +-#define FC_CHAR_WIDTH "charwidth" /* Int */ |
| 20 | ++#define FC_CHARWIDTH "charwidth" /* Int */ |
| 21 | + #define FC_CHAR_HEIGHT "charheight"/* Int */ |
| 22 | + #define FC_MATRIX "matrix" /* FcMatrix */ |
| 23 | + |
| 24 | +diff --git a/src/fcobjs.h b/src/fcobjs.h |
| 25 | +index 1fc4f65..d27864b 100644 |
| 26 | +--- a/src/fcobjs.h |
| 27 | ++++ b/src/fcobjs.h |
| 28 | +@@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL) |
| 29 | + FC_OBJECT (RGBA, FcTypeInteger, NULL) |
| 30 | + FC_OBJECT (SCALE, FcTypeDouble, NULL) |
| 31 | + FC_OBJECT (MINSPACE, FcTypeBool, NULL) |
| 32 | +-FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) |
| 33 | ++FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL) |
| 34 | + FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL) |
| 35 | + FC_OBJECT (MATRIX, FcTypeMatrix, NULL) |
| 36 | + FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet) |
| 37 | +diff --git a/src/fcobjshash.gperf b/src/fcobjshash.gperf |
| 38 | +index 80a0237..eb4ad84 100644 |
| 39 | +--- a/src/fcobjshash.gperf |
| 40 | ++++ b/src/fcobjshash.gperf |
| 41 | +@@ -44,7 +44,7 @@ int id; |
| 42 | + "rgba",FC_RGBA_OBJECT |
| 43 | + "scale",FC_SCALE_OBJECT |
| 44 | + "minspace",FC_MINSPACE_OBJECT |
| 45 | +-"charwidth",FC_CHAR_WIDTH_OBJECT |
| 46 | ++"charwidth",FC_CHARWIDTH_OBJECT |
| 47 | + "charheight",FC_CHAR_HEIGHT_OBJECT |
| 48 | + "matrix",FC_MATRIX_OBJECT |
| 49 | + "charset",FC_CHARSET_OBJECT |
| 50 | +diff --git a/src/fcobjshash.h b/src/fcobjshash.h |
| 51 | +index 5a4d1ea..4e66bb0 100644 |
| 52 | +--- a/src/fcobjshash.h |
| 53 | ++++ b/src/fcobjshash.h |
| 54 | +@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char *str, register unsigned int len) |
| 55 | + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, |
| 56 | + {-1}, |
| 57 | + #line 47 "fcobjshash.gperf" |
| 58 | +- {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, |
| 59 | ++ {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT}, |
| 60 | + #line 48 "fcobjshash.gperf" |
| 61 | + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, |
| 62 | + #line 55 "fcobjshash.gperf" |
0 commit comments