From 71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 29 Jun 2018 11:07:16 -0400 Subject: [PATCH] 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 48e6d916a3..f2a6757482 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 -#include -#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 7703b88afd..c1bee041f8 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 @@ -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 032842d8dc..bbb17d1c56 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -18,10 +18,6 @@ #include "lib/testsupport/testsupport.h" #include #include -#ifdef _WIN32 -/* for the correct alias to struct stat */ -#include -#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 72ab5d9d58..e23a41fb83 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 #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 105de2911b..7f37a2ab9c 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"