Loading configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requ dnl These headers are not essential AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h) AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h utime.h sys/utime.h) AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem) Loading src/common/compat.c +15 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,12 @@ const char compat_c_id[] = "$Id$"; #ifdef HAVE_PTHREAD_H #include <pthread.h> #endif #ifdef HAVE_UTIME_H #include <utime.h> #endif #ifdef HAVE_SYS_UTIME_H #include <sys/utime.h> #endif #include "log.h" #include "util.h" Loading Loading @@ -269,6 +275,15 @@ replace_file(const char *from, const char *to) #endif } /** Change <b>fname</b>'s modification time to now. */ int touch_file(const char *fname) { if (utime(fname, NULL)!=0) return -1; return 0; } /** Turn <b>socket</b> into a nonblocking socket. */ void Loading src/common/compat.h +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ struct tm *tor_gmtime_r(const time_t *timep, struct tm *result); /* ===== File compatibility */ int replace_file(const char *from, const char *to); int touch_file(const char *fname); #ifdef MS_WINDOWS #define PATH_SEPARATOR "\\" Loading Loading
configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requ dnl These headers are not essential AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h) AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h utime.h sys/utime.h) AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem) Loading
src/common/compat.c +15 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,12 @@ const char compat_c_id[] = "$Id$"; #ifdef HAVE_PTHREAD_H #include <pthread.h> #endif #ifdef HAVE_UTIME_H #include <utime.h> #endif #ifdef HAVE_SYS_UTIME_H #include <sys/utime.h> #endif #include "log.h" #include "util.h" Loading Loading @@ -269,6 +275,15 @@ replace_file(const char *from, const char *to) #endif } /** Change <b>fname</b>'s modification time to now. */ int touch_file(const char *fname) { if (utime(fname, NULL)!=0) return -1; return 0; } /** Turn <b>socket</b> into a nonblocking socket. */ void Loading
src/common/compat.h +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ struct tm *tor_gmtime_r(const time_t *timep, struct tm *result); /* ===== File compatibility */ int replace_file(const char *from, const char *to); int touch_file(const char *fname); #ifdef MS_WINDOWS #define PATH_SEPARATOR "\\" Loading