summaryrefslogtreecommitdiff
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-09-22 10:14:55 +0200
committerXavier Claessens <xclaesse@gmail.com>2009-09-22 10:35:55 +0200
commitfecc657c0c64133dcf27477ee13e2da24a7f83ed (patch)
tree30d83b459662596b319749dd472f6009e6f3bf90 /libempathy-gtk
parent797cf36440241fd7ee358297efc5dda534069580 (diff)
downloadempathy-fecc657c0c64133dcf27477ee13e2da24a7f83ed.tar.gz
Do not use math.h for trunc(). It is useless and it does not build because we don't link with -lm.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-location-manager.c8
1 files 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 <math.h>
#include <string.h>
#include <time.h>
@@ -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),