summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-29 11:13:15 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-29 12:21:52 -0400
commit714788b19549ad2a1d8c064bc74678605b0aa78e (patch)
tree74891f3e4ec9c4d55d2b0d38b176aedd56c57784 /src/common
parent71e56c70e9dd6aa47ad8c8fb7568a7c27144d95e (diff)
downloadtor-714788b19549ad2a1d8c064bc74678605b0aa78e.tar.gz
tor-714788b19549ad2a1d8c064bc74678605b0aa78e.zip
Remove non-windows system includes from compat.h and util.h
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.h42
-rw-r--r--src/common/util.h10
-rw-r--r--src/common/workqueue.c1
3 files changed, 1 insertions, 52 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index f2a6757482..eb47dcfdfc 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -9,35 +9,6 @@
#include "orconfig.h"
#include "lib/cc/torint.h"
#include "lib/testsupport/testsupport.h"
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#include <stdarg.h>
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET6_IN6_H
-#include <netinet6/in6.h>
-#endif
-
#include "lib/cc/compat_compiler.h"
#include "lib/arch/bytes.h"
#include "lib/time/compat_time.h"
@@ -53,19 +24,6 @@
#include "lib/fs/userdb.h"
#include "lib/wallclock/timeval.h"
#include "lib/intmath/cmp.h"
-
-#include <stdio.h>
-#include <errno.h>
-
-/* ===== Time compatibility */
-
-/* ===== File compatibility */
-
-/* ===== Net compatibility */
-
-/* ===== OS compatibility */
-
-/* This needs some of the declarations above so we include it here. */
#include "lib/thread/threads.h"
#endif /* !defined(TOR_COMPAT_H) */
diff --git a/src/common/util.h b/src/common/util.h
index bbb17d1c56..6132659e65 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -16,8 +16,6 @@
#include "common/compat.h"
#include "lib/ctime/di_ops.h"
#include "lib/testsupport/testsupport.h"
-#include <stdio.h>
-#include <stdlib.h>
#include "lib/err/torerr.h"
#include "lib/malloc/util_malloc.h"
#include "lib/wallclock/approx_time.h"
@@ -38,12 +36,4 @@
#include "lib/encoding/time_fmt.h"
#include "lib/encoding/cstring.h"
-/* Math functions */
-
-/* String manipulation */
-
-/* Time helpers */
-
-/* File helpers */
-
#endif /* !defined(TOR_UTIL_H) */
diff --git a/src/common/workqueue.c b/src/common/workqueue.c
index 0e8628da98..7b030052cf 100644
--- a/src/common/workqueue.c
+++ b/src/common/workqueue.c
@@ -36,6 +36,7 @@
#include "lib/intmath/weakrng.h"
#include <event2/event.h>
+#include <string.h>
#define WORKQUEUE_PRIORITY_FIRST WQ_PRI_HIGH
#define WORKQUEUE_PRIORITY_LAST WQ_PRI_LOW