From 769a1dce179fbcdcdae3328ef8d4b969e3113668 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Sat, 25 Sep 2010 12:42:51 +0200 Subject: [PATCH] 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. --- katze/katze-array.c | 2 ++ katze/katze-array.h | 2 +- wscript | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.5