WHAT'S NEW?
+ V0.80 Some compilation fixes for BSD by Jeremy Chadwick
+ <freebsd@jdc.parodius.com>
V0.78/0.79 some compilation fixes for BSD&others by
Thomas Klausner <wiz@NetBSD.org>
V0.76 display load sharing hosts in --raw output.
AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.79)
+AM_INIT_AUTOMAKE(mtr, 0.80)
AC_SUBST(GTK_OBJ)
int use_dns = 1;
#ifdef res_ninit
-#define RES_INIT() res_ninit(&myres);
+#define MY_RES_INIT() res_ninit(&myres);
#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
res_nmkquery(&myres, a, b, c, d, e, f, g, h, i)
struct __res_state myres;
#else
-#define RES_INIT() res_init();
+#define MY_RES_INIT() res_init();
#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
res_mkquery(a, b, c, d, e, f, g, h, i)
#define myres _res
int option,i;
if (!dns) return;
- RES_INIT();
+ MY_RES_INIT();
if (!myres.nscount) {
fprintf(stderr,"No nameservers defined.\n");
exit(-1);
N_COLS
};
+// Trick to cast a pointer to integer.....
+// We are mis-using a pointer as a single integer. On 64-bit
+// architectures, the pointer is 64 bits and the integer only 32.
+// The compiler warns us of loss of precision. However we know we
+// casted a normal 32-bit integer into this pointer a few microseconds
+// earlier, so it is ok. Nothing to worry about.... -- REW.
+#define POINTER_TO_INT(p) ((int)(long)(p))
+
void float_formatter(GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *tree_model,
{
gfloat f;
gchar text[64];
- gtk_tree_model_get(tree_model, iter, (gint)data, &f, -1);
+ gtk_tree_model_get(tree_model, iter, POINTER_TO_INT(data), &f, -1);
sprintf(text, "%.2f", f);
g_object_set(cell, "text", text, NULL);
}
{
gfloat f;
gchar text[64];
- gtk_tree_model_get(tree_model, iter, (gint)data, &f, -1);
+ gtk_tree_model_get(tree_model, iter, POINTER_TO_INT(data), &f, -1);
sprintf(text, "%.1f%%", f);
g_object_set(cell, "text", text, NULL);
}
ttl = index + 1;
+#ifdef ENABLE_IPV6
/* offset for ipv6 checksum calculation */
int offset = 6;
+#endif
if ( packetsize < MINPACKET ) packetsize = MINPACKET;
if ( packetsize > MAXPACKET ) packetsize = MAXPACKET;