mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-14 11:48:10 +02:00
Allow ~ through unescaped
freedesktop #57078 (https://bugs.freedesktop.org/show_bug.cgi?id=57078)
This commit is contained in:
parent
43f20b96a3
commit
69beecddb5
4 changed files with 24 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
13
check/check-tilde
Normal file
13
check/check-tilde
Normal file
|
|
@ -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
|
||||
5
check/tilde.pc
Normal file
5
check/tilde.pc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Name: tilde
|
||||
Description: tilde test module
|
||||
Version: 1.0
|
||||
Libs: -L~
|
||||
Cflags: -I~
|
||||
3
parse.c
3
parse.c
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue