commit 71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e Author: Nick Mathewson nickm@torproject.org Date: Fri Jun 29 11:07:16 2018 -0400
Remove windows libraries from util.h and compat.h --- src/common/compat.h | 5 ----- src/common/procmon.c | 7 +++++-- src/common/util.h | 5 ----- src/or/ntmain.c | 3 ++- src/test/test_util.c | 1 + 5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/common/compat.h b/src/common/compat.h index 48e6d916a..f2a675748 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -7,10 +7,6 @@ #define TOR_COMPAT_H
#include "orconfig.h" -#ifdef _WIN32 -#include <winsock2.h> -#include <ws2tcpip.h> -#endif #include "lib/cc/torint.h" #include "lib/testsupport/testsupport.h" #ifdef HAVE_SYS_PARAM_H @@ -48,7 +44,6 @@ #include "lib/string/compat_ctype.h" #include "lib/string/compat_string.h" #include "lib/string/printf.h" -#include "lib/log/win32err.h" #include "lib/net/socket.h" #include "lib/net/ipv4.h" #include "lib/net/ipv6.h" diff --git a/src/common/procmon.c b/src/common/procmon.c index 7703b88af..c1bee041f 100644 --- a/src/common/procmon.c +++ b/src/common/procmon.c @@ -8,7 +8,11 @@
#include "common/procmon.h"
-#include "common/util.h" +#include "lib/log/torlog.h" +#include "lib/log/util_bug.h" +#include "lib/log/win32err.h" +#include "lib/malloc/util_malloc.h" +#include "lib/string/parse_int.h"
#ifdef HAVE_SIGNAL_H #include <signal.h> @@ -329,4 +333,3 @@ tor_process_monitor_free_(tor_process_monitor_t *procmon)
tor_free(procmon); } - diff --git a/src/common/util.h b/src/common/util.h index 032842d8d..bbb17d1c5 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -18,10 +18,6 @@ #include "lib/testsupport/testsupport.h" #include <stdio.h> #include <stdlib.h> -#ifdef _WIN32 -/* for the correct alias to struct stat */ -#include <sys/stat.h> -#endif #include "lib/err/torerr.h" #include "lib/malloc/util_malloc.h" #include "lib/wallclock/approx_time.h" @@ -41,7 +37,6 @@ #include "lib/fs/path.h" #include "lib/encoding/time_fmt.h" #include "lib/encoding/cstring.h" -#include "lib/fs/winlib.h"
/* Math functions */
diff --git a/src/or/ntmain.c b/src/or/ntmain.c index 72ab5d9d5..e23a41fb8 100644 --- a/src/or/ntmain.c +++ b/src/or/ntmain.c @@ -23,6 +23,8 @@ #include "or/config.h" #include "or/main.h" #include "or/ntmain.h" +#include "lib/log/win32err.h" +#include "lib/fs/winlib.h"
#include <windows.h> #define GENSRV_SERVICENAME "tor" @@ -778,4 +780,3 @@ nt_service_parse_options(int argc, char **argv, int *should_exit) }
#endif /* defined(_WIN32) */ - diff --git a/src/test/test_util.c b/src/test/test_util.c index 105de2911..7f37a2ab9 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -25,6 +25,7 @@ #include "lib/compress/compress_zstd.h" #include "lib/encoding/keyval.h" #include "lib/fdio/fdio.h" +#include "lib/fs/winlib.h" #include "lib/process/env.h" #include "lib/process/pidfile.h" #include "lib/process/subprocess.h"