mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-19 08:28:11 +02:00
Handle \ correctly on win32
2005-10-01 Tollef Fog Heen <tfheen@err.no>
* pkg.c(scan_dir): Turn backslashes into slashes or
poptParseArgvString() will eat them when ${prefix} has been
expanded in parse_libs(). Thanks to j^ for the patch.
This commit is contained in:
parent
d41fc58c55
commit
6b35e49c2d
2 changed files with 19 additions and 1 deletions
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
* pkg.c (packages_get_var): Don't try to chop if string length is
|
||||
zero. Freedesktop #4034.
|
||||
(scan_dir): Turn backslashes into slashes or poptParseArgvString()
|
||||
will eat them when ${prefix} has been expanded in parse_libs().
|
||||
Thanks to j^ for the patch.
|
||||
|
||||
2005-09-21 Tollef Fog Heen <tfheen@err.no>
|
||||
|
||||
|
|
|
|||
17
pkg.c
17
pkg.c
|
|
@ -144,7 +144,22 @@ scan_dir (const char *dirname)
|
|||
dirnamelen--;
|
||||
dirname_copy[dirnamelen] = '\0';
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
{
|
||||
gchar *p;
|
||||
/* Turn backslashes into slashes or
|
||||
* poptParseArgvString() will eat them when ${prefix}
|
||||
* has been expanded in parse_libs().
|
||||
*/
|
||||
p = dirname;
|
||||
while (*p)
|
||||
{
|
||||
if (*p == '\\')
|
||||
*p = '/';
|
||||
p++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
dir = opendir (dirname_copy);
|
||||
g_free (dirname_copy);
|
||||
if (!dir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue