summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2011-04-13 22:02:51 +0200
committerTollef Fog Heen <tfheen@err.no>2011-04-13 22:02:51 +0200
commit1b1bd80f5fff35f20903489b0e988ba7a1159f95 (patch)
tree0ed2e85f2a1ff58ddf7aebe8e95c770333516e76
parent4366f5842fc6ca0432c5dfa6b6dcb20d83aa4ee8 (diff)
Allow $() through unescaped.
$(foo) is used for make escapes, so allow them through. Freedesktop #33920
-rwxr-xr-xcheck/check-whitespace2
-rw-r--r--check/whitespace.pc2
-rw-r--r--parse.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/check/check-whitespace b/check/check-whitespace
index 31a413c..c328f74 100755
--- a/check/check-whitespace
+++ b/check/check-whitespace
@@ -11,7 +11,7 @@ set -e
# expect cflags from whitespace
ARGS="--cflags whitespace"
-RESULT="-Dlala=misc -I/usr/white\\ space/include -Iinclude\\ dir -Iother\\ include\\ dir"
+RESULT='-Dlala=misc -I/usr/white\ space/include -I$(top_builddir) -Iinclude\ dir -Iother\ include\ dir'
run_test
# expect libs from whitespace
diff --git a/check/whitespace.pc b/check/whitespace.pc
index 50a8742..693bbc4 100644
--- a/check/whitespace.pc
+++ b/check/whitespace.pc
@@ -8,4 +8,4 @@ Description: Dummy pkgconfig test package for testing pkgconfig
Version: 1.0.0
Requires:
Libs: -L${libdir} -lfoo\ bar "-lbar baz" -r:foo
-Cflags: -I${includedir} -Iinclude\ dir "-Iother include dir" -Dlala=misc
+Cflags: -I${includedir} -I$(top_builddir) -Iinclude\ dir "-Iother include dir" -Dlala=misc
diff --git a/parse.c b/parse.c
index 4283a8a..be455cd 100644
--- a/parse.c
+++ b/parse.c
@@ -638,7 +638,9 @@ static char *strdup_escape_shell(const char *s)
size_t r_s = strlen(s)+10, c = 0;
char *r = g_malloc(r_s);
while (s[0]) {
- if ((s[0] < '+') ||
+ if ((s[0] < '$') ||
+ (s[0] > '$' && s[0] < '(') ||
+ (s[0] > ')' && s[0] < '+') ||
(s[0] > ':' && s[0] < '=') ||
(s[0] > '=' && s[0] < '@') ||
(s[0] > 'Z' && s[0] < '^') ||