summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-29 11:07:16 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-29 12:21:52 -0400
commit71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e (patch)
treef1bb5344e65bd54e52e9998dfac2adf5942eb87c /src
parent31897a256c129c12c5a406e630d0d4aaeb7728fd (diff)
downloadtor-71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e.tar.gz
tor-71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e.zip
Remove windows libraries from util.h and compat.h
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.h5
-rw-r--r--src/common/procmon.c7
-rw-r--r--src/common/util.h5
-rw-r--r--src/or/ntmain.c3
-rw-r--r--src/test/test_util.c1
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 <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 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 <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 032842d8dc..bbb17d1c56 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 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 <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 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"