argvsplit: fix some quoting rules
parent
212c85863a
commit
6d1f160e89
|
@ -89,11 +89,6 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* If we are outside a quoted string/char, an escaped space is usually used to
|
||||
preserve spaces in file names. */
|
||||
if (!(*src_iter == '$' || *src_iter == '`' || *src_iter == '"' || *src_iter == '\\' || *src_iter == ' '))
|
||||
*dst_iter++ = '\\';
|
||||
|
||||
*dst_iter++ = *src_iter;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ Name: quotes
|
|||
Description: A testing pkg-config file
|
||||
Version: 1.2.3
|
||||
Libs: -L${libdir} -lfoo
|
||||
Cflags: -DQUOTED=\"bla\"
|
||||
Cflags: -DQUOTED=\"bla\" -DA=\"escaped\ string\'\ \literal\" -DB="\1\$" -DC='bla'
|
||||
|
|
|
@ -142,7 +142,7 @@ quoted_body()
|
|||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-o inline:"-DQUOTED=\\\"bla\\\"\n" \
|
||||
-o inline:"-DQUOTED=\\\"bla\\\" -DA=\\\"escaped\\ string\\\'\\ literal\\\" -DB=\\\\\\1\$ -DC=bla\n" \
|
||||
pkgconf --cflags quotes
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue