[or-cvs] r11060: Include fewer redundant headers; use the compiler search pat (in tor/trunk: . src/common src/or src/tools)
nickm at seul.org
nickm at seul.org
Wed Aug 8 05:50:32 UTC 2007
Author: nickm
Date: 2007-08-08 01:50:31 -0400 (Wed, 08 Aug 2007)
New Revision: 11060
Modified:
tor/trunk/
tor/trunk/configure.in
tor/trunk/src/common/aes.h
tor/trunk/src/common/container.h
tor/trunk/src/common/log.h
tor/trunk/src/common/test.h
tor/trunk/src/common/tortls.h
tor/trunk/src/common/util.h
tor/trunk/src/or/Makefile.am
tor/trunk/src/or/circuitlist.c
tor/trunk/src/or/config.c
tor/trunk/src/or/dns.c
tor/trunk/src/or/eventdns.c
tor/trunk/src/or/eventdns_tor.h
tor/trunk/src/or/or.h
tor/trunk/src/or/relay.c
tor/trunk/src/or/test.c
tor/trunk/src/tools/Makefile.am
tor/trunk/src/tools/tor-gencert.c
tor/trunk/src/tools/tor-resolve.c
Log:
r14093 at catbus: nickm | 2007-08-08 01:49:54 -0400
Include fewer redundant headers; use the compiler search paths better.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r14093] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/configure.in 2007-08-08 05:50:31 UTC (rev 11060)
@@ -10,7 +10,7 @@
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,
Modified: tor/trunk/src/common/aes.h
===================================================================
--- tor/trunk/src/common/aes.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/aes.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -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;
Modified: tor/trunk/src/common/container.h
===================================================================
--- tor/trunk/src/common/container.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/container.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -8,7 +8,6 @@
#define CONTAINER_H_ID \
"$Id$"
-#include "compat.h"
#include "util.h"
/** A resizeable list of pointers, with associated helpful functionality.
Modified: tor/trunk/src/common/log.h
===================================================================
--- tor/trunk/src/common/log.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/log.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -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>
Modified: tor/trunk/src/common/test.h
===================================================================
--- tor/trunk/src/common/test.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/test.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -12,8 +12,6 @@
* \brief Macros used by unit tests.
*/
-#include <string.h>
-#include <stdio.h>
#include "compat.h"
#ifdef __GNUC__
Modified: tor/trunk/src/common/tortls.h
===================================================================
--- tor/trunk/src/common/tortls.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/tortls.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -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;
Modified: tor/trunk/src/common/util.h
===================================================================
--- tor/trunk/src/common/util.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/common/util.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -17,12 +17,6 @@
#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.
Modified: tor/trunk/src/or/Makefile.am
===================================================================
--- tor/trunk/src/or/Makefile.am 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/Makefile.am 2007-08-08 05:50:31 UTC (rev 11060)
@@ -1,3 +1,5 @@
+CPPFLAGS += -I../common
+
TESTS = test
noinst_PROGRAMS = test
@@ -40,7 +42,7 @@
tor_main.o: micro-revision.i
-micro-revision.i: FORCE
+micro-revision.i:
@svkdir=$$SVKROOT; \
if test "x$$svkdir" = x ; then \
svkdir=$$HOME/.svk; \
Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/circuitlist.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -12,9 +12,8 @@
**/
#include "or.h"
+#include "ht.h"
-#include "../common/ht.h"
-
/********* START VARIABLES **********/
/** A global list of all circuits at this hop. */
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/config.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -17,7 +17,6 @@
#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 @@
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[];
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/dns.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -14,7 +14,7 @@
**/
#include "or.h"
-#include "../common/ht.h"
+#include "ht.h"
#include "eventdns.h"
/** Longest hostname we're willing to resolve. */
Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/eventdns.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -123,8 +123,8 @@
#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)
Modified: tor/trunk/src/or/eventdns_tor.h
===================================================================
--- tor/trunk/src/or/eventdns_tor.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/eventdns_tor.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -10,7 +10,7 @@
#ifdef MS_WINDOWS
#define inline __inline
#endif
-#include "../common/torint.h"
+#include "torint.h"
#if defined(MS_WINDOWS) && !defined(WIN32)
/* How did _this_ happen? */
Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/or.h 2007-08-08 05:50:31 UTC (rev 11060)
@@ -20,27 +20,27 @@
#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
@@ -53,21 +53,21 @@
#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,
@@ -107,6 +108,7 @@
#include <ws2tcpip.h>
#endif
#endif
+#endif
#ifdef MS_WINDOWS
#include <io.h>
@@ -118,13 +120,13 @@
#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.
*/
Modified: tor/trunk/src/or/relay.c
===================================================================
--- tor/trunk/src/or/relay.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/relay.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -13,7 +13,7 @@
**/
#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);
Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/or/test.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -36,9 +36,9 @@
#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;
Modified: tor/trunk/src/tools/Makefile.am
===================================================================
--- tor/trunk/src/tools/Makefile.am 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/tools/Makefile.am 2007-08-08 05:50:31 UTC (rev 11060)
@@ -1,3 +1,5 @@
+CPPFLAGS += -I../common
+
bin_PROGRAMS = tor-resolve tor-gencert
tor_resolve_SOURCES = tor-resolve.c
Modified: tor/trunk/src/tools/tor-gencert.c
===================================================================
--- tor/trunk/src/tools/tor-gencert.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/tools/tor-gencert.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -27,10 +27,10 @@
#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
Modified: tor/trunk/src/tools/tor-resolve.c
===================================================================
--- tor/trunk/src/tools/tor-resolve.c 2007-08-08 05:14:03 UTC (rev 11059)
+++ tor/trunk/src/tools/tor-resolve.c 2007-08-08 05:50:31 UTC (rev 11060)
@@ -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>
More information about the tor-commits
mailing list