Browse Source

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/; }'
Nick Mathewson 14 years ago
parent
commit
14bc4dcc22

+ 4 - 0
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.
+

+ 1 - 1
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 \

+ 1 - 1
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>

+ 1 - 1
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

+ 1 - 1
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"

+ 1 - 1
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>

+ 1 - 1
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"
 

+ 1 - 1
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"

+ 1 - 1
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]"

+ 1 - 1
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. */

+ 1 - 1
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)

+ 1 - 1
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

+ 0 - 0
src/common/log.h → src/common/torlog.h


+ 1 - 1
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>

+ 1 - 1
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"

+ 1 - 1
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

+ 1 - 1
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"

+ 1 - 1
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>

+ 1 - 1
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"
 

+ 1 - 1
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>