File: 0001-Rename-constexpr-to-avoid-keyword.patch

package info (click to toggle)
unifdef 2.12-1.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 1,852 kB
  • sloc: ansic: 2,111; sh: 352; makefile: 56; perl: 33
file content (54 lines) | stat: -rw-r--r-- 1,877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Boyuan Yang <byang@debian.org>
Date: Sun, 21 Dec 2025 19:17:37 -0500
Subject: Rename constexpr to avoid keyword

Bug-Debian: https://bugs.debian.org/1098038
Forwarded: https://github.com/fanf2/unifdef/pull/19
---
 unifdef.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/unifdef.c b/unifdef.c
index dc145a2..9d4c81b 100644
--- a/unifdef.c
+++ b/unifdef.c
@@ -202,7 +202,7 @@ static int              depth;			/* current #if nesting */
 static int              delcount;		/* count of deleted lines */
 static unsigned         blankcount;		/* count of blank lines */
 static unsigned         blankmax;		/* maximum recent blankcount */
-static bool             constexpr;		/* constant #if expression */
+static bool             is_constexpr;		/* constant #if expression */
 static bool             zerosyms;		/* to format symdepth output */
 static bool             firstsym;		/* ditto */
 
@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
 			*valp = (value[sym] != NULL);
 			lt = *valp ? LT_TRUE : LT_FALSE;
 		}
-		constexpr = false;
+		is_constexpr = false;
 	} else if (!endsym(*cp)) {
 		debug("eval%d symbol", prec(ops));
 		sym = findsym(&cp);
@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp)
 			lt = *valp ? LT_TRUE : LT_FALSE;
 			cp = skipargs(cp);
 		}
-		constexpr = false;
+		is_constexpr = false;
 	} else {
 		debug("eval%d bad expr", prec(ops));
 		return (LT_ERROR);
@@ -1170,10 +1170,10 @@ ifeval(const char **cpp)
 	long val = 0;
 
 	debug("eval %s", *cpp);
-	constexpr = killconsts ? false : true;
+	is_constexpr = killconsts ? false : true;
 	ret = eval_table(eval_ops, &val, cpp);
 	debug("eval = %d", val);
-	return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
+	return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
 }
 
 /*