]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove non-windows system includes from compat.h and util.h
authorNick Mathewson <nickm@torproject.org>
Fri, 29 Jun 2018 15:13:15 +0000 (11:13 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 29 Jun 2018 16:21:52 +0000 (12:21 -0400)
src/common/compat.h
src/common/util.h
src/common/workqueue.c
src/ext/csiphash.c
src/lib/arch/bytes.h

index f2a6757482e165441ec64527e81f8415a7970f4e..eb47dcfdfc299eab36d4fba79645d4b411d4194e 100644 (file)
@@ -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"
 #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) */
index bbb17d1c5623fe621b11d2c8fc80bc43187a6cb5..6132659e657ba9ff4d096a462c8ba414764abd3a 100644 (file)
@@ -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"
 #include "lib/encoding/time_fmt.h"
 #include "lib/encoding/cstring.h"
 
-/* Math functions */
-
-/* String manipulation */
-
-/* Time helpers */
-
-/* File helpers */
-
 #endif /* !defined(TOR_UTIL_H) */
index 0e8628da98d6704a1f0b2bca5bbe4a54a5a65dad..7b030052cfaeb483ccab9d80b55c274f4d549ce2 100644 (file)
@@ -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
index f82e10b103afbf8294352ec369a052d58cbadff6..a6a9846db48e9a3199dcc053f1d9477fc77af75e 100644 (file)
 */
 
 #include "lib/cc/torint.h"
+#include "lib/log/util_bug.h"
+
 #include "siphash.h"
-/* for tor_assert */
-#include "common/util.h"
-/* for memcpy */
 #include <string.h>
+#include <stdlib.h>
 #include "byteorder.h"
 
 #define ROTATE(x, b) (uint64_t)( ((x) << (b)) | ( (x) >> (64 - (b))) )
index d3b53f8cdf835e1398095e23101d26938d078c6a..4359b0f72388149dc74f66d1dd89aa0d33b96ed9 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef TOR_BYTES_H
 #define TOR_BYTES_H
 
-#include <stdlib.h>
+#include <string.h>
 #include "lib/cc/torint.h"
 
 /* The uint8 variants are defined to make the code more uniform. */