2007-02-21 Tollef Fog Heen <tfheen@err.no>

* parse.c (parse_package_file and others): Move the reversal of
	the _libs lists to the end to avoid double-reversing either.
	Thanks to J. Scott Berg for both the bug and the fix.  Freedesktop
	#9132
This commit is contained in:
Tollef Fog Heen 2007-02-21 22:21:14 +01:00
parent e10e93faa1
commit b81987653f
2 changed files with 18 additions and 13 deletions

View file

@ -1,5 +1,10 @@
2007-02-21 Tollef Fog Heen <tfheen@err.no>
* parse.c (parse_package_file and others): Move the reversal of
the _libs lists to the end to avoid double-reversing either.
Thanks to J. Scott Berg for both the bug and the fix. Freedesktop
#9132
* configure.in: remove AC_CONFIG_AUX_DIR as it makes newer
automakes unhappy. Freedesktop #10028.

26
parse.c
View file

@ -558,8 +558,6 @@ parse_requires (Package *pkg, const char *str, const char *path)
}
g_slist_free (parsed);
pkg->requires = g_slist_reverse (pkg->requires);
}
static void
@ -607,8 +605,6 @@ parse_requires_private (Package *pkg, const char *str, const char *path)
}
g_slist_free (parsed);
pkg->requires_private = g_slist_reverse (pkg->requires_private);
}
static void
@ -719,10 +715,6 @@ static void _do_parse_libs (Package *pkg, int argc, char **argv)
++i;
}
pkg->l_libs = g_slist_reverse (pkg->l_libs);
pkg->L_libs = g_slist_reverse (pkg->L_libs);
pkg->other_libs = g_slist_reverse (pkg->other_libs);
}
@ -883,9 +875,6 @@ parse_cflags (Package *pkg, const char *str, const char *path)
g_free (argv);
g_free (trimmed);
pkg->I_cflags = g_slist_reverse (pkg->I_cflags);
pkg->other_cflags = g_slist_reverse (pkg->other_cflags);
}
static void
@ -1105,9 +1094,20 @@ parse_package_file (const char *path, gboolean ignore_requires, gboolean ignore_
fclose(f);
/* make ->requires_private include a copy of the public requires too */
pkg->requires_private = g_slist_concat(pkg->requires_private,
g_slist_copy (pkg->requires));
pkg->requires_private = g_slist_concat(g_slist_copy (pkg->requires),
pkg->requires_private);
pkg->requires = g_slist_reverse (pkg->requires);
pkg->requires_private = g_slist_reverse (pkg->requires_private);
pkg->I_cflags = g_slist_reverse (pkg->I_cflags);
pkg->other_cflags = g_slist_reverse (pkg->other_cflags);
pkg->l_libs = g_slist_reverse (pkg->l_libs);
pkg->L_libs = g_slist_reverse (pkg->L_libs);
pkg->other_libs = g_slist_reverse (pkg->other_libs);
return pkg;
}