diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2012-08-15 15:52:01 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2012-08-16 13:42:13 +0800 |
commit | 628892bce8910976817037cb8de84794a0cb6883 (patch) | |
tree | a3d79cc88090ce9e5b77050d65024e12ca484628 /gtk/gtklevelbar.c | |
parent | c88a969d13b380bacdbd236f8961832f16708541 (diff) | |
download | gtk+-628892bce8910976817037cb8de84794a0cb6883.tar.gz |
gtk/gtklevelbar.c: Fix build on non-C99 compilers
-Include fallback-c89.c for the usage of round(), where an implementation
of round() is provided for compilers that don't have it
-Use g_ascii_strtod() instead of strtof as strtof() may not be universally
available.
Diffstat (limited to 'gtk/gtklevelbar.c')
-rw-r--r-- | gtk/gtklevelbar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 7207d01543..d82d3857b5 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -97,6 +97,8 @@ #include <math.h> #include <stdlib.h> +#include "fallback-c89.c" + #define DEFAULT_BLOCK_SIZE 3 /* these don't make sense outside of GtkLevelBar, so we don't add @@ -647,7 +649,7 @@ offset_start_element (GMarkupParseContext *context, if (name && value_str) { - offset = gtk_level_bar_offset_new (name, strtof (value_str, NULL)); + offset = gtk_level_bar_offset_new (name, g_ascii_strtod (value_str, NULL)); parser_data->offsets = g_list_prepend (parser_data->offsets, offset); } } |