]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r14093@catbus: nickm | 2007-08-08 01:49:54 -0400
authorNick Mathewson <nickm@torproject.org>
Wed, 8 Aug 2007 05:50:31 +0000 (05:50 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 8 Aug 2007 05:50:31 +0000 (05:50 +0000)
 Include fewer redundant headers; use the compiler search paths better.

svn:r11060

19 files changed:
configure.in
src/common/aes.h
src/common/container.h
src/common/log.h
src/common/test.h
src/common/tortls.h
src/common/util.h
src/or/Makefile.am
src/or/circuitlist.c
src/or/config.c
src/or/dns.c
src/or/eventdns.c
src/or/eventdns_tor.h
src/or/or.h
src/or/relay.c
src/or/test.c
src/tools/Makefile.am
src/tools/tor-gencert.c
src/tools/tor-resolve.c

index ce045f486bd1227c49e02ce46082c9f92c816d64..5539c91d37c1df82630aec25fee4b8b32edc6050 100644 (file)
@@ -10,7 +10,7 @@ AM_CONFIG_HEADER(orconfig.h)
 AC_CANONICAL_HOST
 
 if test -f /etc/redhat-release ; then
-    CFLAGS="$CFLAGS -I/usr/kerberos/include"
+    CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
 fi
 
 AC_ARG_ENABLE(debug,
index 5dbd6f1f725f6bf745daa2311823a62307e9f956..0962e7261b6355935114a8c3b32eece5eb53291b 100644 (file)
@@ -14,7 +14,7 @@
  * \brief Headers for aes.c
  */
 
-#include "../common/torint.h"
+#include "torint.h"
 
 struct aes_cnt_cipher;
 typedef struct aes_cnt_cipher aes_cnt_cipher_t;
index 36df117666be6c0e91cd0c21da86ec97cae87da9..2953b0d68fd2a829c4359ad06da6fa7de291d29c 100644 (file)
@@ -8,7 +8,6 @@
 #define CONTAINER_H_ID \
   "$Id$"
 
-#include "compat.h"
 #include "util.h"
 
 /** A resizeable list of pointers, with associated helpful functionality.
index e6861404592e384210eb943d44bc6516768b45ed..4a29375fa49b262454aac61b0ab5ff2901ed4d27 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef __LOG_H
 #define LOG_H_ID "$Id$"
 
-#include "../common/compat.h"
+#include "compat.h"
 
 #ifdef HAVE_SYSLOG_H
 #include <syslog.h>
index 6919376d26d55fc464fbced5492f46efda73e6c9..b6b10d4c228e9765cff13dca160804691501fa57 100644 (file)
@@ -12,8 +12,6 @@
  * \brief Macros used by unit tests.
  */
 
-#include <string.h>
-#include <stdio.h>
 #include "compat.h"
 
 #ifdef __GNUC__
index 00a57dfaec020af3281a2cdb1ead5838eff44fd9..7d69f8e6c40ce7ca2137c84a8381c2f255ffc7f4 100644 (file)
@@ -12,8 +12,8 @@
  * \brief Headers for tortls.c
  **/
 
-#include "../common/crypto.h"
-#include "../common/compat.h"
+#include "crypto.h"
+#include "compat.h"
 
 /* Opaque structure to hold a TLS connection. */
 typedef struct tor_tls_t tor_tls_t;
index 4837c172db36f06fe811703532daf836712f20d3..80d4aad743410a7e3d9b5181f04e5df8b0e562b3 100644 (file)
 #include "compat.h"
 #include <stdio.h>
 #include <stdlib.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
 
 /* Replace assert() with a variant that sends failures to the log before
  * calling assert() normally.
index fd86aa21eb66dd03108f386ae48f0aeee2dd2fdc..fea5fcfea8a4fa440614fd761b1c5c509b6ed40b 100644 (file)
@@ -1,3 +1,5 @@
+CPPFLAGS += -I../common
+
 TESTS = test
 
 noinst_PROGRAMS = test
@@ -40,7 +42,7 @@ noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
 
 tor_main.o: micro-revision.i
 
-micro-revision.i: FORCE
+micro-revision.i:
        @svkdir=$$SVKROOT; \
        if test "x$$svkdir" = x ; then \
          svkdir=$$HOME/.svk; \
index 5c48c6159ac9872d7447be4bad493dff3622fdb4..f199af2062e4c3d77d391ded0d2084a56a68e978 100644 (file)
@@ -12,8 +12,7 @@ const char circuitlist_c_id[] =
  **/
 
 #include "or.h"
-
-#include "../common/ht.h"
+#include "ht.h"
 
 /********* START VARIABLES **********/
 
index 732bb0d78449941b04763f2bf6cac76b3a5b0de5..e1260e96a2b2b426885897786d81e1813f66f00d 100644 (file)
@@ -17,7 +17,6 @@ const char config_c_id[] = \
 #ifdef MS_WINDOWS
 #include <shlobj.h>
 #endif
-#include "../common/aes.h"
 
 /** Enumeration of types which option values can take */
 typedef enum config_type_t {
@@ -4556,8 +4555,9 @@ getinfo_helper_config(control_connection_t *conn,
   return 0;
 }
 
-#include "../common/ht.h"
-#include "../common/test.h"
+#include "aes.h"
+#include "ht.h"
+#include "test.h"
 
 extern const char aes_c_id[];
 extern const char compat_c_id[];
index 2a8048a3401f214796c8fde1c56c43c37fdc2f56..b03cbb5aadc78a310d8aa0c61aa264c2c8566f51 100644 (file)
@@ -14,7 +14,7 @@ const char dns_c_id[] =
  **/
 
 #include "or.h"
-#include "../common/ht.h"
+#include "ht.h"
 #include "eventdns.h"
 
 /** Longest hostname we're willing to resolve. */
index 2ecdfc0d090e62de3e555bd087f4556d0da196be..1fb458118ea54fe36d54b26df1d90ed0cfb17132 100644 (file)
@@ -123,8 +123,8 @@ typedef int socklen_t;
 #endif
 
 /* XXXX020 These are for debugging possible memory leaks. */
-#include "../common/util.h"
-#include "../common/compat.h"
+#include "util.h"
+#include "compat.h"
 #define malloc(x) tor_malloc(x)
 #define realloc(x,y) tor_realloc((x),(y))
 #define free(x) tor_free(x)
index d1acfe275ecf8c09241c104489ea70f3c4229f01..03807065fcc9216eeb75fe33221aed56c5b50c70 100644 (file)
@@ -10,7 +10,7 @@ typedef unsigned char u_char;
 #ifdef MS_WINDOWS
 #define inline __inline
 #endif
-#include "../common/torint.h"
+#include "torint.h"
 
 #if defined(MS_WINDOWS) && !defined(WIN32)
 /* How did _this_ happen? */
index 3bad8794919157d137c1c151b9d4f0e4273e2c88..5d41658d6df1b6709e6bb5d707c44a7e5d93ea12 100644 (file)
 #define WIN32_LEAN_AND_MEAN
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
+// #include <stdio.h>
+// #include <stdlib.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
+//#ifdef HAVE_STRING_H
+//#include <string.h>
+//#endif
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#ifdef HAVE_CTYPE_H
-#include <ctype.h>
-#endif
+//#ifdef HAVE_CTYPE_H
+//#include <ctype.h>
+//#endif
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h> /* FreeBSD needs this to know what version it is */
 #endif
-#include "../common/torint.h"
+#include "torint.h"
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
+//#ifdef HAVE_SYS_SOCKET_H
+//#include <sys/socket.h>
+//#endif
 #ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
+//#ifdef HAVE_SYS_TIME_H
+//#include <sys/time.h>
+//#endif
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
+//#ifdef HAVE_NETINET_IN_H
+//#include <netinet/in.h>
+//#endif
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
@@ -91,6 +91,7 @@
 #define MAXCONNECTIONS 15000
 #endif
 
+#if 0
 #ifdef MS_WINDOWS
 /* No, we don't need to redefine FD_SETSIZE before including winsock:
  * we use libevent now, and libevent handles the select() stuff.  Yes,
 #include <ws2tcpip.h>
 #endif
 #endif
+#endif
 
 #ifdef MS_WINDOWS
 #include <io.h>
 
 #include <event.h>
 
-#include "../common/crypto.h"
-#include "../common/tortls.h"
-#include "../common/log.h"
-#include "../common/compat.h"
-#include "../common/container.h"
-#include "../common/util.h"
-#include "../common/torgzip.h"
+#include "crypto.h"
+#include "tortls.h"
+#include "log.h"
+#include "compat.h"
+#include "container.h"
+#include "util.h"
+#include "torgzip.h"
 
 /* These signals are defined to help control_signal_act work.
  */
index 364b976b5c04ba263110c40e430d2426b0961492..68b8a5f82d2142a8e41b7479ff4f5eb5e67c85f8 100644 (file)
@@ -13,7 +13,7 @@ const char relay_c_id[] =
  **/
 
 #include "or.h"
-#include "../common/mempool.h"
+#include "mempool.h"
 
 static int relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction,
                 crypt_path_t **layer_hint, char *recognized);
index e678d0f7b63f5b753bdb63b8cc9090c4a8df7803..e082bbfa9c3acbd5eb18f30148f0446bb693b1f1 100644 (file)
@@ -36,9 +36,9 @@ const char tor_svn_revision[] = "";
 #define ROUTER_PRIVATE
 
 #include "or.h"
-#include "../common/test.h"
-#include "../common/torgzip.h"
-#include "../common/mempool.h"
+#include "test.h"
+#include "torgzip.h"
+#include "mempool.h"
 
 int have_failed = 0;
 
index 7d7f2c7b8f81a5fe826f56b72cfb00b4cd7a098b..8861ec84afa1de85963e79a14e53c6649beaccb0 100644 (file)
@@ -1,3 +1,5 @@
+CPPFLAGS += -I../common
+
 bin_PROGRAMS = tor-resolve tor-gencert
 
 tor_resolve_SOURCES = tor-resolve.c
index 1dd9c9e59b6973670284ca32547da376203144ef..abb2ac298a786078d95f2a0cfbd0f065791b6eeb 100644 (file)
 
 #define CRYPTO_PRIVATE
 
-#include "../common/compat.h"
-#include "../common/util.h"
-#include "../common/log.h"
-#include "../common/crypto.h"
+#include "compat.h"
+#include "util.h"
+#include "log.h"
+#include "crypto.h"
 
 #define IDENTITY_KEY_BITS 3072
 #define SIGNING_KEY_BITS 1024
index c23a463ed7d217daac12e37205378295ec1fbc17..e6561443bf2ccb186523334acbaab30efe78977c 100644 (file)
@@ -4,9 +4,9 @@
 
 #include "orconfig.h"
 
-#include "../common/compat.h"
-#include "../common/util.h"
-#include "../common/log.h"
+#include "compat.h"
+#include "util.h"
+#include "log.h"
 
 #include <stdio.h>
 #include <stdlib.h>