From 775ad4a575d720ef964d08e1ab12099da2f3af71 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 22 Sep 2009 10:14:55 +0200 Subject: Do not use math.h for trunc(). It is useless and it does not build because we don't link with -lm. --- libempathy-gtk/empathy-location-manager.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index 2018b5c5a..17e40aa16 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -21,10 +21,6 @@ #include "config.h" -/* Needed for trunc */ -#define _ISOC9X_SOURCE 1 -#define _ISOC99_SOURCE 1 -#include #include #include @@ -375,7 +371,7 @@ position_changed_cb (GeocluePosition *position, if (priv->reduce_accuracy) /* Truncate at 1 decimal place */ - longitude = trunc (longitude * 10.0) / 10.0; + longitude = ((int) (longitude * 10)) / 10.0; new_value = tp_g_value_slice_new_double (longitude); g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LON), @@ -391,7 +387,7 @@ position_changed_cb (GeocluePosition *position, { if (priv->reduce_accuracy) /* Truncate at 1 decimal place */ - latitude = trunc (latitude * 10.0) / 10.0; + latitude = ((int) (latitude * 10)) / 10.0; new_value = tp_g_value_slice_new_double (latitude); g_hash_table_replace (priv->location, g_strdup (EMPATHY_LOCATION_LAT), -- cgit v1.2.3