1 From 60577129058e018f13748b99e51ab1a17088db8e Mon Sep 17 00:00:00 2001 |
|
2 From: Alan Coopersmith <[email protected]> |
|
3 Date: Thu, 16 Jun 2011 15:38:17 -0700 |
|
4 Subject: [PATCH:xrdb] Tokenize #define names in the PATHETICCPP case too |
|
5 |
|
6 Fixes generation of the EXT_<extension-name> #defines, since cpp treats |
|
7 a #define EXT_MIT-SHM as a token "EXT_MIT" with a value of "-SHM". |
|
8 |
|
9 Without this fix, an xrdb built with PATHETICCPP prints warnings of: |
|
10 macro EXT_XC redefines previous macro at "", line 27 |
|
11 macro EXT_XVideo redefines previous macro at "", line 33 |
|
12 macro EXT_MIT redefines previous macro at "", line 35 |
|
13 macro EXT_MIT redefines previous macro at "", line 37 |
|
14 |
|
15 due to extension #defines such as EXT_MIT-SCREEN-SAVER & EXT_MIT-SHM |
|
16 conflicting with each other. |
|
17 |
|
18 Now matches the non-PATHETICCPP handling of #define names. |
|
19 |
|
20 Signed-off-by: Alan Coopersmith <[email protected]> |
|
21 --- |
|
22 xrdb.c | 2 +- |
|
23 1 files changed, 1 insertions(+), 1 deletions(-) |
|
24 |
|
25 diff --git a/xrdb.c b/xrdb.c |
|
26 index ea698b9..cf2758a 100644 |
|
27 --- a/xrdb.c |
|
28 +++ b/xrdb.c |
|
29 @@ -420,7 +420,7 @@ AddDef(String *buff, char *title, char *value) |
|
30 #ifdef PATHETICCPP |
|
31 if (need_real_defines) { |
|
32 addstring(buff, "\n#define "); |
|
33 - addstring(buff, title); |
|
34 + addtokstring(buff, title); |
|
35 if (value && (value[0] != '\0')) { |
|
36 addstring(buff, " "); |
|
37 addstring(buff, value); |
|
38 -- |
|
39 1.7.3.2 |
|
40 |
|