summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2008-03-23 18:00:36 +0100
committerTollef Fog Heen <tfheen@err.no>2008-03-23 18:00:36 +0100
commit762172849c13754a5c25d425cc8c403c1e5c9409 (patch)
treea74ee8dfe8147749d209d5862626a2cd2bc0540e
parentb4cdd181659fa9764736a27af6ddf4a0734075b3 (diff)
parent89932ecfcfc31392884171008d8265ada2631249 (diff)
downloadpkg-config-762172849c13754a5c25d425cc8c403c1e5c9409.tar.gz
Merge in static change
-rw-r--r--ChangeLog9
-rw-r--r--main.c40
2 files changed, 29 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 1af79aa..038e4cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-03-23 Tollef Fog Heen <tfheen@err.no>
+
+ * main.c (main): Fix small portability problem by defining all the
+ variables in main that are used in the static initialiser as
+ static variables. This makes the IRIX/mipseb compiler happier.
+ Thanks to Roland Illig of NetBSD for the patch. This doesn't
+ apply to some of the Win32 variables, but I don't believe that is
+ a problem with the existing compilers there.
+
2008-01-31 Tollef Fog Heen <tfheen@err.no>
* configure.in: If prefix is unset, add /usr/lib/pkgconfig and
diff --git a/main.c b/main.c
index 13cdd2e..6a8fb6e 100644
--- a/main.c
+++ b/main.c
@@ -173,27 +173,27 @@ pkg_uninstalled (Package *pkg)
int
main (int argc, char **argv)
{
- int want_my_version = 0;
- int want_version = 0;
- int want_libs = 0;
- int want_cflags = 0;
- int want_l_libs = 0;
- int want_L_libs = 0;
- int want_other_libs = 0;
- int want_I_cflags = 0;
- int want_other_cflags = 0;
- int want_list = 0;
- int want_static_lib_list = ENABLE_INDIRECT_DEPS;
- int want_short_errors = 0;
+ static int want_my_version = 0;
+ static int want_version = 0;
+ static int want_libs = 0;
+ static int want_cflags = 0;
+ static int want_l_libs = 0;
+ static int want_L_libs = 0;
+ static int want_other_libs = 0;
+ static int want_I_cflags = 0;
+ static int want_other_cflags = 0;
+ static int want_list = 0;
+ static int want_static_lib_list = ENABLE_INDIRECT_DEPS;
+ static int want_short_errors = 0;
+ static int want_uninstalled = 0;
+ static char *variable_name = NULL;
+ static int want_exists = 0;
+ static char *required_atleast_version = NULL;
+ static char *required_exact_version = NULL;
+ static char *required_max_version = NULL;
+ static char *required_pkgconfig_version = NULL;
+ static int want_silence_errors = 0;
int result;
- int want_uninstalled = 0;
- char *variable_name = NULL;
- int want_exists = 0;
- char *required_atleast_version = NULL;
- char *required_exact_version = NULL;
- char *required_max_version = NULL;
- char *required_pkgconfig_version = NULL;
- int want_silence_errors = 0;
GString *str;
GSList *packages = NULL;
char *search_path;