summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/cpp.py4
-rw-r--r--src/engine/SCons/cppTests.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/engine/SCons/cpp.py b/src/engine/SCons/cpp.py
index a160164..47d664c 100644
--- a/src/engine/SCons/cpp.py
+++ b/src/engine/SCons/cpp.py
@@ -66,10 +66,10 @@ cpp_lines_dict = {
# 2) The optional parentheses and arguments (if it's a function-like
# macro, '' if it's not).
# 3) The expansion value.
- ('define',) : '\s+([_A-Za-z][_A-Za-z0-9_]+)(\([^)]*\))?\s*(.*)',
+ ('define',) : '\s+([_A-Za-z][_A-Za-z0-9_]*)(\([^)]*\))?\s*(.*)',
# Fetch the #undefed keyword from a #undef line.
- ('undef',) : '\s+([_A-Za-z][A-Za-z0-9_]+)',
+ ('undef',) : '\s+([_A-Za-z][A-Za-z0-9_]*)',
}
# Create a table that maps each individual C preprocessor directive to
diff --git a/src/engine/SCons/cppTests.py b/src/engine/SCons/cppTests.py
index 1c83a13..252a064 100644
--- a/src/engine/SCons/cppTests.py
+++ b/src/engine/SCons/cppTests.py
@@ -300,6 +300,10 @@ macro_function_input = """
/* Make sure we don't die if the expansion isn't a string. */
#define FUNC_INTEGER(x) 1
+
+/* Make sure one-character names are recognized. */
+#define _(x) translate(x)
+#undef _
"""