#include <sys/socket.h>
#endif]])
+AC_CHECK_TYPES([time_t], [], [], [[
+#include <time.h>
+]])
+
# Add C flags to display more warnings
AC_MSG_CHECKING([for C flags to get more warnings])
ac_save_CFLAGS="$CFLAGS"
#include "config.h"
+#include "mtr.h"
+
#include <strings.h>
#include <unistd.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
/* MacOSX may need this before socket.h...*/
#if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h>
-#else
-/* If a system doesn't have sys/types.h, lets hope that time_t is an int */
-# define time_t int
#endif
#include <sys/socket.h>
#include "display.h"
#include "utils.h"
-#include <time.h>
enum { NUM_FACTORS = 8 };
static double factors[NUM_FACTORS];
#ifndef MTR_MTR_H
#define MTR_MTR_H
+#include "config.h"
+
#include <stdint.h>
#include <sys/socket.h>
#include <arpa/inet.h>
typedef struct in_addr ip_t;
#endif
+#ifndef HAVE_TIME_T
+typedef int time_t;
+#endif
+
/* The __unused__ attribute was added in gcc 3.2.7. */
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define ATTRIBUTE_UNUSED __attribute__((__unused__))