[gtk+] Fix build on C89 compilers
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix build on C89 compilers
- Date: Tue, 28 May 2013 05:37:03 +0000 (UTC)
commit da3198237938057a1b6cc3c5fb9cf50a31dbe640
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue May 28 13:36:54 2013 +0800
Fix build on C89 compilers
-Avoid defining variables in the middle of the block
-Include fallback-c89.c in gtkrevealer.c in place of math.h as
fallback-c89.c includes math.h itself, and is needed for round()
gtk/gtkbookmarksmanager.c | 3 ++-
gtk/gtkrevealer.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c
index c7eb026..f0cc53e 100644
--- a/gtk/gtkbookmarksmanager.c
+++ b/gtk/gtkbookmarksmanager.c
@@ -343,8 +343,9 @@ _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager,
if (link)
{
+ gchar *uri;
bookmark = link->data;
- gchar *uri = g_file_get_uri (bookmark->file);
+ uri = g_file_get_uri (bookmark->file);
g_set_error (error,
GTK_FILE_CHOOSER_ERROR,
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index a9aa18d..a38d2c6 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -26,7 +26,8 @@
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkintl.h"
-#include <math.h>
+
+#include "fallback-c89.c"
/**
* SECTION:gtkrevealer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]