forked from ariadne/pkgconf
fix missing backslashes in paths on Windows
According to https://docs.microsoft.com/fr-fr/windows/win32/fileio/naming-a-file backslashes (with slashes) are a path separator, hence must no be considered as an escape code. The first fix, in argvsplit.c, disables this. But because of fragment_quote(), the backslashes are doubled. Hence the second fix in fragment.c With this pc file : prefix=C:/Documents/msys2/opt/efl_64 libdir=${prefix}/lib includedir=${prefix}/include Name: eina Description: efl: eina Version: 1.24.99 Requires.private: iconv Libs: -L${libdir} -leina -pthread -levil Libs.private: -lpsapi -lole32 -lws2_32 -lsecur32 -luuid -lregex -lm Cflags:-I${includedir}/eina-1 -I${includedir}/efl-1 -I${includedir}/eina-1/eina -pthread pkgconf.exe --cflags eina returns : -IC:\Documents\msys2\opt\efl_64/include/eina-1 -IC:\Documents\msys2\opt\efl_64/include/efl-1 -IC:\Documents\msys2\opt\efl_64/include/eina-1/eina -pthread -DWINICONV_CONST= -IC:\Documents\msys2\opt\ewpi_64/includebsdstubs-errno
parent
e3e89926b5
commit
42b355310f
|
@ -118,9 +118,11 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv)
|
|||
}
|
||||
else switch(*src_iter)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
case '\\':
|
||||
escaped = true;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case '\"':
|
||||
case '\'':
|
||||
|
|
|
@ -433,7 +433,11 @@ fragment_quote(const pkgconf_fragment_t *frag)
|
|||
(*src > ')' && *src < '+') ||
|
||||
(*src > ':' && *src < '=') ||
|
||||
(*src > '=' && *src < '@') ||
|
||||
(*src > 'Z' && *src < '^') ||
|
||||
(*src > 'Z' && *src < '\\') ||
|
||||
#ifndef _WIN32
|
||||
(*src == '\\') ||
|
||||
#endif
|
||||
(*src > '\\' && *src < '^') ||
|
||||
(*src == '`') ||
|
||||
(*src > 'z' && *src < '~') ||
|
||||
(*src > '~')))
|
||||
|
|
Loading…
Reference in New Issue