aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-07-09 21:52:20 -0400
committerNick Mathewson <nickm@torproject.org>2010-07-09 22:05:38 -0400
commit14bc4dcc229fe45af48986820020779b440149cb (patch)
tree513ee7d878975353240bf41b4211b4ad2456133d
parentc3febf8660518f77ec890afe339c353dfcb61a87 (diff)
downloadtor-14bc4dcc229fe45af48986820020779b440149cb.tar
tor-14bc4dcc229fe45af48986820020779b440149cb.tar.gz
Rename log.h to torlog.h
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
-rw-r--r--changes/RemoveLogHeader4
-rw-r--r--src/common/Makefile.am2
-rw-r--r--src/common/address.c2
-rw-r--r--src/common/aes.c2
-rw-r--r--src/common/compat.c2
-rw-r--r--src/common/compat_libevent.c2
-rw-r--r--src/common/container.c2
-rw-r--r--src/common/crypto.c2
-rw-r--r--src/common/log.c2
-rw-r--r--src/common/memarea.c2
-rw-r--r--src/common/mempool.c2
-rw-r--r--src/common/torgzip.c2
-rw-r--r--src/common/torlog.h (renamed from src/common/log.h)0
-rw-r--r--src/common/tortls.c2
-rw-r--r--src/common/util.c2
-rw-r--r--src/or/buffers.c2
-rw-r--r--src/or/or.h2
-rw-r--r--src/tools/tor-checkkey.c2
-rw-r--r--src/tools/tor-gencert.c2
-rw-r--r--src/tools/tor-resolve.c2
20 files changed, 22 insertions, 18 deletions
diff --git a/changes/RemoveLogHeader b/changes/RemoveLogHeader
new file mode 100644
index 000000000..d93c9fffc
--- /dev/null
+++ b/changes/RemoveLogHeader
@@ -0,0 +1,4 @@
+ o Code simplifications and refactoring:
+ - Rename the "log.h" header to "torlog.h" so as to conflict with fewer
+ system headers.
+
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index eecfeb83f..b1e03cd71 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -16,7 +16,7 @@ libor_a_SOURCES = address.c log.c util.c compat.c container.c mempool.c \
libor_crypto_a_SOURCES = crypto.c aes.c tortls.c torgzip.c
libor_event_a_SOURCES = compat_libevent.c
-noinst_HEADERS = address.h log.h crypto.h util.h compat.h aes.h torint.h tortls.h strlcpy.c strlcat.c torgzip.h container.h ht.h mempool.h memarea.h ciphers.inc compat_libevent.h tortls_states.h
+noinst_HEADERS = address.h torlog.h crypto.h util.h compat.h aes.h torint.h tortls.h strlcpy.c strlcat.c torgzip.h container.h ht.h mempool.h memarea.h ciphers.inc compat_libevent.h tortls_states.h
common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(noinst_HEADERS)
if test "@SHA1SUM@" != none; then \
diff --git a/src/common/address.c b/src/common/address.c
index 4569373f3..c35f04c18 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -12,7 +12,7 @@
#include "compat.h"
#include "util.h"
#include "address.h"
-#include "log.h"
+#include "torlog.h"
#ifdef MS_WINDOWS
#include <process.h>
diff --git a/src/common/aes.c b/src/common/aes.c
index 2b6f0234b..a17328317 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -21,7 +21,7 @@
#include "compat.h"
#include "aes.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
/* We have 3 strategies for getting AES: Via OpenSSL's AES_encrypt function,
* via OpenSSL's EVP_EncryptUpdate function, or via the built-in AES
diff --git a/src/common/compat.c b/src/common/compat.c
index 7b79c5cc3..ebe8c03e3 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -88,7 +88,7 @@
#include <sys/prctl.h>
#endif
-#include "log.h"
+#include "torlog.h"
#include "util.h"
#include "container.h"
#include "address.h"
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index 153239227..5cdd687cf 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -15,7 +15,7 @@
#include "compat_libevent.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
#ifdef HAVE_EVENT2_EVENT_H
#include <event2/event.h>
diff --git a/src/common/container.c b/src/common/container.c
index ab5a9b032..72f347034 100644
--- a/src/common/container.c
+++ b/src/common/container.c
@@ -13,7 +13,7 @@
#include "compat.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
#include "container.h"
#include "crypto.h"
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 1d75555b2..bfb81d3cc 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -50,7 +50,7 @@
#define CRYPTO_PRIVATE
#include "crypto.h"
-#include "../common/log.h"
+#include "../common/torlog.h"
#include "aes.h"
#include "../common/util.h"
#include "container.h"
diff --git a/src/common/log.c b/src/common/log.c
index 6bf94721f..b639e7a78 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -33,7 +33,7 @@
#include "compat.h"
#include "util.h"
#define LOG_PRIVATE
-#include "log.h"
+#include "torlog.h"
#include "container.h"
#define TRUNCATED_STR "[...truncated]"
diff --git a/src/common/memarea.c b/src/common/memarea.c
index 0402e5f20..77579e63b 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -11,7 +11,7 @@
#include "memarea.h"
#include "util.h"
#include "compat.h"
-#include "log.h"
+#include "torlog.h"
/** If true, we try to detect any attempts to write beyond the length of a
* memarea. */
diff --git a/src/common/mempool.c b/src/common/mempool.c
index 256388a9f..c795d83f0 100644
--- a/src/common/mempool.c
+++ b/src/common/mempool.c
@@ -65,7 +65,7 @@
#include "orconfig.h"
#include "util.h"
#include "compat.h"
-#include "log.h"
+#include "torlog.h"
#define ALLOC(x) tor_malloc(x)
#define FREE(x) tor_free(x)
#define ASSERT(x) tor_assert(x)
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 9ebddf07b..a247d6c17 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -20,7 +20,7 @@
#include "torint.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
#include "torgzip.h"
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
diff --git a/src/common/log.h b/src/common/torlog.h
index 21219569e..21219569e 100644
--- a/src/common/log.h
+++ b/src/common/torlog.h
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 6732d55b8..b3c91a6ca 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -38,7 +38,7 @@
#include "crypto.h"
#include "tortls.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
#include "container.h"
#include "ht.h"
#include <string.h>
diff --git a/src/common/util.c b/src/common/util.c
index 8531d12eb..6830ef3aa 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -15,7 +15,7 @@
#include "orconfig.h"
#include "util.h"
-#include "log.h"
+#include "torlog.h"
#undef log
#include "crypto.h"
#include "torint.h"
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 970c1888c..c4ebc8135 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -13,7 +13,7 @@
#define BUFFERS_PRIVATE
#include "or.h"
#include "../common/util.h"
-#include "../common/log.h"
+#include "../common/torlog.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/src/or/or.h b/src/or/or.h
index 60987698b..2124d457e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -82,7 +82,7 @@
#include "crypto.h"
#include "tortls.h"
-#include "../common/log.h"
+#include "../common/torlog.h"
#include "compat.h"
#include "container.h"
#include "util.h"
diff --git a/src/tools/tor-checkkey.c b/src/tools/tor-checkkey.c
index a24412499..94c8cbd44 100644
--- a/src/tools/tor-checkkey.c
+++ b/src/tools/tor-checkkey.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "crypto.h"
-#include "log.h"
+#include "torlog.h"
#include "../common/util.h"
#include "compat.h"
#include <openssl/bn.h>
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c
index 13a640cb8..bc99c24bd 100644
--- a/src/tools/tor-gencert.c
+++ b/src/tools/tor-gencert.c
@@ -29,7 +29,7 @@
#include "compat.h"
#include "../common/util.h"
-#include "../common/log.h"
+#include "../common/torlog.h"
#include "crypto.h"
#include "address.h"
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 2639d9e59..f5b0becaf 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -8,7 +8,7 @@
#include "compat.h"
#include "../common/util.h"
#include "address.h"
-#include "../common/log.h"
+#include "../common/torlog.h"
#include <stdio.h>
#include <stdlib.h>