]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix DOS line endings; autoconfize checks for strptime and inet_aton
authorNick Mathewson <nickm@torproject.org>
Tue, 9 Mar 2004 22:09:13 +0000 (22:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 9 Mar 2004 22:09:13 +0000 (22:09 +0000)
svn:r1248

configure.in
src/common/util.c
src/or/connection.c
src/or/routerlist.c
src/win32/orconfig.h

index 95407676efed3db910d2fec470a110bfa0b0b70e..8f318b8f046fc7152a228664931c8d251965731d 100644 (file)
@@ -136,7 +136,7 @@ dnl These headers are not essential
 
 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.
index 3c629561327f2aa1c1600c393ed377672476286d..a62b0d320b9164d9802e133ffaee9b417726da92 100644 (file)
@@ -865,8 +865,7 @@ int switch_id(char *user, char *group) {
 
 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;
@@ -881,4 +880,4 @@ int tor_inet_aton(const char *c, struct in_addr* addr)
   addr->s_addr = r;
   return 1;
 #endif
-}
\ No newline at end of file
+}
index 1c7e3cf219b4c41a4b3121a8a197c0e767920132..f2528aa00b44c1857847efa672dc1940353cebbf 100644 (file)
@@ -434,7 +434,7 @@ int retry_all_connections(void) {
 
   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;
index 4ade31c6f26705c49a04fbe5be77cd138d49a171..64d4e6457761216bb4c1dc40ee655d7440780b23 100644 (file)
@@ -544,8 +544,7 @@ int router_exit_policy_rejects_all(routerinfo_t *router) {
 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;
   }
@@ -903,7 +902,7 @@ routerinfo_t *router_get_entry_from_string(const char *s,
     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))) {
index 29524513baa8f177accc29f319b6cbc9409d33fd..c8e089fb3c25d095eddccc8a0a9fb68b00e89875 100644 (file)
 
 #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 ""