diff options
author | MichaĆ Sawicz <michal@sawicz.net> | 2012-11-13 18:32:03 +0000 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-12-08 12:11:55 -0800 |
commit | 69beecddb501b07c330110b1cc011e18e386a325 (patch) | |
tree | f7711c9f86ebd45feb18b7ba2e39b9338ff55985 | |
parent | 43f20b96a3d35bdcc34ec7409acdfdb3149ff426 (diff) | |
download | pkg-config-69beecddb501b07c330110b1cc011e18e386a325.tar.gz |
Allow ~ through unescaped
freedesktop #57078 (https://bugs.freedesktop.org/show_bug.cgi?id=57078)
-rw-r--r-- | check/Makefile.am | 6 | ||||
-rw-r--r-- | check/check-tilde | 13 | ||||
-rw-r--r-- | check/tilde.pc | 5 | ||||
-rw-r--r-- | parse.c | 3 |
4 files changed, 24 insertions, 3 deletions
diff --git a/check/Makefile.am b/check/Makefile.am index d5c84e2..30a527c 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -25,7 +25,8 @@ TESTS = \ check-sysroot \ check-uninstalled \ check-debug \ - check-gtk + check-gtk \ + check-tilde EXTRA_DIST = \ $(TESTS) \ @@ -91,4 +92,5 @@ EXTRA_DIST = \ gtk/xau.pc \ gtk/xcb.pc \ gtk/xproto.pc \ - gtk/xrender.pc + gtk/xrender.pc \ + tilde.pc diff --git a/check/check-tilde b/check/check-tilde new file mode 100644 index 0000000..0ffc8f5 --- /dev/null +++ b/check/check-tilde @@ -0,0 +1,13 @@ +#! /bin/sh + +set -e + +. ${srcdir}/common + +# expect unescaped tilde from cflags +RESULT='-I~' +run_test --cflags tilde + +# expect unescaped tilde from libs +RESULT='-L~' +run_test --libs tilde diff --git a/check/tilde.pc b/check/tilde.pc new file mode 100644 index 0000000..c3babc1 --- /dev/null +++ b/check/tilde.pc @@ -0,0 +1,5 @@ +Name: tilde +Description: tilde test module +Version: 1.0 +Libs: -L~ +Cflags: -I~ @@ -583,7 +583,8 @@ static char *strdup_escape_shell(const char *s) (s[0] > '=' && s[0] < '@') || (s[0] > 'Z' && s[0] < '^') || (s[0] == '`') || - (s[0] > 'z')) { + (s[0] > 'z' && s[0] < '~') || + (s[0] > '~')) { r[c] = '\\'; c++; } |