AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/wait.h netinet/in.h arpa/inet.h)
-AC_CHECK_FUNCS(gettimeofday ftime socketpair uname)
+AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime)
dnl In case we aren't given a working stdint.h, we'll need to grow our own.
dnl Watch out.
int tor_inet_aton(const char *c, struct in_addr* addr)
{
-#ifndef MS_WINDOWS
- /* XXXX WWWW Should be HAVE_INET_ATON */
+#ifdef HAVE_INET_ATON
return inet_aton(c, addr);
#else
uint32_t r;
addr->s_addr = r;
return 1;
#endif
-}
\ No newline at end of file
+}
if(options.SocksPort) {
listener_close_if_present(CONN_TYPE_AP_LISTENER);
- if(connection_create_listener(options.SocksBindAddress,
+ if(connection_create_listener(options.SocksBindAddress,
(uint16_t) options.SocksPort,
CONN_TYPE_AP_LISTENER) < 0)
return -1;
static time_t parse_time(const char *cp)
{
struct tm st_tm;
- /* XXXX WWWW should be HAVE_STRPTIME */
-#ifndef MS_WINDOWS
+#ifdef HAVE_STRPTIME
if (!strptime(cp, "%Y-%m-%d %H:%M:%S", &st_tm)) {
log_fn(LOG_WARN, "Published time was unparseable"); return 0;
}
log_fn(LOG_WARN, "Missing published time"); goto err;
}
assert(tok->n_args == 1);
- if (!(router->published_on = parse_time(tok->args[0])))
+ if (!(router->published_on = parse_time(tok->args[0])))
goto err;
if (!(tok = find_first_by_keyword(tokens, K_ONION_KEY))) {
#undef HAVE_GETTIMEOFDAY
+#undef HAVE_STRPTIME
+
+#undef HAVE_INET_ATON
+
/* Define to 1 if the system has the type `int16_t'. */
#undef HAVE_INT16_T
#define VERSION "0.0.2pre6"
/* XXXX WWWW */
-#define CONFDIR ""
\ No newline at end of file
+#define CONFDIR ""