From: Enrico Tröger Date: Sat, 25 Sep 2010 10:42:51 +0000 (+0200) Subject: Define kalistglobal only once, declare it globally X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769a1dce179fbcdcdae3328ef8d4b969e3113668;p=midori Define kalistglobal only once, declare it globally This fixes building with gcc and the -fno-common option. The option is now added to compiler flags in full debugging mode. --- diff --git a/katze/katze-array.c b/katze/katze-array.c index 2c46c950..fb177c7c 100644 --- a/katze/katze-array.c +++ b/katze/katze-array.c @@ -65,6 +65,8 @@ enum { static guint signals[LAST_SIGNAL]; +GList* kalistglobal; + static void katze_array_finalize (GObject* object); diff --git a/katze/katze-array.h b/katze/katze-array.h index f54f66ba..c4d45d5d 100644 --- a/katze/katze-array.h +++ b/katze/katze-array.h @@ -83,7 +83,7 @@ katze_array_get_items (KatzeArray* array); GList* katze_array_peek_items (KatzeArray* array); -GList* kalistglobal; +extern GList* kalistglobal; #define KATZE_ARRAY_FOREACH_ITEM(kaitem, kaarray) \ for (kalistglobal = katze_array_peek_items (kaarray), \ kaitem = kalistglobal ? kalistglobal->data : NULL; \ diff --git a/wscript b/wscript index da389ef5..0ffd4367 100644 --- a/wscript +++ b/wscript @@ -308,7 +308,7 @@ def configure (conf): '-Wno-missing-field-initializers ' '-Wredundant-decls -Wmissing-noreturn ' '-Wshadow -Wpointer-arith -Wcast-align ' - '-Winline -Wformat-security ' + '-Winline -Wformat-security -fno-common ' '-Winit-self -Wundef -Wdeclaration-after-statement ' '-Wmissing-format-attribute -Wnested-externs ' # -DGSEAL_ENABLE