aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-29 02:21:02 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-29 02:21:02 +0000
commite8a3fa91a60310559d6ef3eb66663eab4c55b1c1 (patch)
tree17dc47ab473e94d8c4abc9c88a59fff4214d0846
parentb0a8ecd19377d13592819b1bc17ea513523b2ed4 (diff)
downloadtor-e8a3fa91a60310559d6ef3eb66663eab4c55b1c1.tar
tor-e8a3fa91a60310559d6ef3eb66663eab4c55b1c1.tar.gz
Use a consistent naming standard for header file guard macros, taking care not to collide with any system headers. This tripped us up on Android.
svn:r17805
-rw-r--r--ChangeLog5
-rw-r--r--src/common/address.h4
-rw-r--r--src/common/aes.h4
-rw-r--r--src/common/compat.h4
-rw-r--r--src/common/container.h4
-rw-r--r--src/common/crypto.h4
-rw-r--r--src/common/ht.h4
-rw-r--r--src/common/log.h4
-rw-r--r--src/common/memarea.h4
-rw-r--r--src/common/mempool.h4
-rw-r--r--src/common/test.h4
-rw-r--r--src/common/torgzip.h4
-rw-r--r--src/common/torint.h4
-rw-r--r--src/common/tortls.h4
-rw-r--r--src/common/util.h4
-rw-r--r--src/or/eventdns.h4
-rw-r--r--src/or/or.h4
17 files changed, 37 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 186101064..94ae9b987 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,11 @@ Changes in version 0.2.1.10-alpha - 2009-01-??
- Make get_interface_address() function work properly again; stop
guessing the wrong parts of our address as our address.
+ o Code simplifications and refactoring:
+ - Change our header file guard macros to be less likely to conflict
+ with system headers. Adam Langley noticed that we were conflicting
+ with log.h on Android.
+
Changes in version 0.2.1.9-alpha - 2008-12-25
o New directory authorities:
diff --git a/src/common/address.h b/src/common/address.h
index 689d566ed..76b794754 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -9,8 +9,8 @@
* \brief Headers for address.h
**/
-#ifndef __ADDRESS_H
-#define __ADDRESS_H
+#ifndef _TOR_ADDRESS_H
+#define _TOR_ADDRESS_H
#define ADDRESS_H_ID "$Id$"
#include "orconfig.h"
diff --git a/src/common/aes.h b/src/common/aes.h
index e03fae6e8..ad9b78b23 100644
--- a/src/common/aes.h
+++ b/src/common/aes.h
@@ -6,8 +6,8 @@
/* Implements a minimal interface to counter-mode AES. */
-#ifndef __AES_H
-#define __AES_H
+#ifndef _TOR_AES_H
+#define _TOR_AES_H
#define AES_H_ID "$Id$"
/**
diff --git a/src/common/compat.h b/src/common/compat.h
index 336c8cd13..47156f241 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -4,8 +4,8 @@
/* See LICENSE for licensing information */
/* $Id$ */
-#ifndef __COMPAT_H
-#define __COMPAT_H
+#ifndef _TOR_COMPAT_H
+#define _TOR_COMPAT_H
#define COMPAT_H_ID "$Id$"
#include "orconfig.h"
diff --git a/src/common/container.h b/src/common/container.h
index 096d385a2..57c5c2c71 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -4,8 +4,8 @@
/* See LICENSE for licensing information */
/* $Id$ */
-#ifndef __CONTAINER_H
-#define __CONTAINER_H
+#ifndef _TOR_CONTAINER_H
+#define _TOR_CONTAINER_H
#define CONTAINER_H_ID \
"$Id$"
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 86dfa8807..e1c14c1c2 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -11,8 +11,8 @@
* \brief Headers for crypto.c
**/
-#ifndef __CRYPTO_H
-#define __CRYPTO_H
+#ifndef _TOR_CRYPTO_H
+#define _TOR_CRYPTO_H
#define CRYPTO_H_ID "$Id$"
#include <stdio.h>
diff --git a/src/common/ht.h b/src/common/ht.h
index 762f836bd..ab371ec36 100644
--- a/src/common/ht.h
+++ b/src/common/ht.h
@@ -5,8 +5,8 @@
/* Based on ideas by Christopher Clark and interfaces from Niels Provos. */
-#ifndef __HT_H
-#define __HT_H
+#ifndef _TOR_HT_H
+#define _TOR_HT_H
#define HT_H_ID "$Id$"
#define HT_HEAD(name, type) \
diff --git a/src/common/log.h b/src/common/log.h
index 15fb27e0a..aa1e87305 100644
--- a/src/common/log.h
+++ b/src/common/log.h
@@ -11,7 +11,7 @@
* \brief Headers for log.c
**/
-#ifndef __LOG_H
+#ifndef _TOR_LOG_H
#define LOG_H_ID "$Id$"
#include "compat.h"
@@ -205,6 +205,6 @@ extern const char *_log_fn_function_name;
#endif /* !GNUC */
-# define __LOG_H
+# define _TOR_LOG_H
#endif
diff --git a/src/common/memarea.h b/src/common/memarea.h
index 06c5be119..b6507728e 100644
--- a/src/common/memarea.h
+++ b/src/common/memarea.h
@@ -3,8 +3,8 @@
/* $Id$ */
/* Tor dependencies */
-#ifndef MEMAREA_H
-#define MEMAREA_H
+#ifndef _TOR_MEMAREA_H
+#define _TOR_MEMAREA_H
typedef struct memarea_t memarea_t;
diff --git a/src/common/mempool.h b/src/common/mempool.h
index 67e3785ec..584f0ae06 100644
--- a/src/common/mempool.h
+++ b/src/common/mempool.h
@@ -7,8 +7,8 @@
* \brief Headers for mempool.c
**/
-#ifndef MEMPOOL_H
-#define MEMPOOL_H
+#ifndef _TOR_MEMPOOL_H
+#define _TOR_MEMPOOL_H
/** A memory pool is a context in which a large number of fixed-sized
* objects can be allocated efficiently. See mempool.c for implementation
diff --git a/src/common/test.h b/src/common/test.h
index c5166bae4..6d4d9e47b 100644
--- a/src/common/test.h
+++ b/src/common/test.h
@@ -4,8 +4,8 @@
/* See LICENSE for licensing information */
/* $Id$ */
-#ifndef __TEST_H
-#define __TEST_H
+#ifndef _TOR_TEST_H
+#define _TOR_TEST_H
#define TEST_H_ID "$Id$"
/**
diff --git a/src/common/torgzip.h b/src/common/torgzip.h
index 8bcb8fd82..117237180 100644
--- a/src/common/torgzip.h
+++ b/src/common/torgzip.h
@@ -9,8 +9,8 @@
* \brief Headers for torgzip.h
**/
-#ifndef __TORGZIP_H
-#define __TORGZIP_H
+#ifndef _TOR_TORGZIP_H
+#define _TOR_TORGZIP_H
#define TORGZIP_H_ID "$Id$"
/** Enumeration of what kind of compression to use. Only ZLIB_METHOD is
diff --git a/src/common/torint.h b/src/common/torint.h
index 900477322..b36acc8d1 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -9,8 +9,8 @@
* \brief Header file to define uint32_t and friends
**/
-#ifndef __TORINT_H
-#define __TORINT_H
+#ifndef _TOR_TORINT_H
+#define _TOR_TORINT_H
#define TORINT_H_ID "$Id$"
#include "orconfig.h"
diff --git a/src/common/tortls.h b/src/common/tortls.h
index 4a47fd272..c20fccbb0 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -4,8 +4,8 @@
/* See LICENSE for licensing information */
/* $Id$ */
-#ifndef _TORTLS_H
-#define _TORTLS_H
+#ifndef _TOR_TORTLS_H
+#define _TOR_TORTLS_H
#define TORTLS_H_ID "$Id$"
/**
diff --git a/src/common/util.h b/src/common/util.h
index bcecdae49..d3e234185 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -9,8 +9,8 @@
* \brief Headers for util.c
**/
-#ifndef __UTIL_H
-#define __UTIL_H
+#ifndef _TOR_UTIL_H
+#define _TOR_UTIL_H
#define UTIL_H_ID "$Id$"
#include "orconfig.h"
diff --git a/src/or/eventdns.h b/src/or/eventdns.h
index df5b93692..8d9a0b8fb 100644
--- a/src/or/eventdns.h
+++ b/src/or/eventdns.h
@@ -209,8 +209,8 @@
* with the next probe.
*/
-#ifndef EVENTDNS_H
-#define EVENTDNS_H
+#ifndef _TOR_EVENTDNS_H
+#define _TOR_EVENTDNS_H
/* Error codes 0-5 are as described in RFC 1035. */
#define DNS_ERR_NONE 0
diff --git a/src/or/or.h b/src/or/or.h
index 139cb133d..5f21fea88 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -10,8 +10,8 @@
* \brief Master header file for Tor-specific functionality.
**/
-#ifndef __OR_H
-#define __OR_H
+#ifndef _TOR_OR_H
+#define _TOR_OR_H
#define OR_H_ID "$Id$"
#include "orconfig.h"