mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Fix DOS line endings; autoconfize checks for strptime and inet_aton
svn:r1248
This commit is contained in:
parent
2da54de968
commit
0e5a134709
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
#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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user