From: Tollef Fog Heen Date: Wed, 21 Feb 2007 21:21:14 +0000 (+0100) Subject: 2007-02-21 Tollef Fog Heen X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b81987653f180c152d6a8daa83499e3f156d3511;p=pkg-config 2007-02-21 Tollef Fog Heen * 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 --- diff --git a/ChangeLog b/ChangeLog index e7fd955..0709146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-02-21 Tollef Fog Heen + * 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. diff --git a/parse.c b/parse.c index 87740ff..d91977a 100644 --- a/parse.c +++ b/parse.c @@ -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; }