diff --git a/src/common/address.h b/src/common/address.h
index 9e7d7501262e8c6ffcfb2028bd9e1d02bdf88ba4..6c1b37f21d9b81cb74d2766f09ab144121826f2b 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -8,8 +8,8 @@
  * \brief Headers for address.h
  **/
 
-#ifndef _TOR_ADDRESS_H
-#define _TOR_ADDRESS_H
+#ifndef TOR_ADDRESS_H
+#define TOR_ADDRESS_H
 
 #include "orconfig.h"
 #include "torint.h"
diff --git a/src/common/aes.h b/src/common/aes.h
index bde567f87fa13ac92424461a943a60c6c89a5481..fadeacc7ad8c0bd820655a94d426ea62dfd752e0 100644
--- a/src/common/aes.h
+++ b/src/common/aes.h
@@ -5,8 +5,8 @@
 
 /* Implements a minimal interface to counter-mode AES. */
 
-#ifndef _TOR_AES_H
-#define _TOR_AES_H
+#ifndef TOR_AES_H
+#define TOR_AES_H
 
 /**
  * \file aes.h
diff --git a/src/common/compat.h b/src/common/compat.h
index 42648bb04bf9a588e1f780149360c1dff75ab08b..0a7b40252441c1da0d459c3a9b2c58b120509742 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -3,8 +3,8 @@
  * Copyright (c) 2007-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_COMPAT_H
-#define _TOR_COMPAT_H
+#ifndef TOR_COMPAT_H
+#define TOR_COMPAT_H
 
 #include "orconfig.h"
 #include "torint.h"
diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h
index 56285ef80df9ea6bc824ff7148e147bdd5384bca..68da472cfc9a5c29c09b56019e4b20e3cb6171ec 100644
--- a/src/common/compat_libevent.h
+++ b/src/common/compat_libevent.h
@@ -1,8 +1,8 @@
 /* Copyright (c) 2009-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_COMPAT_LIBEVENT_H
-#define _TOR_COMPAT_LIBEVENT_H
+#ifndef TOR_COMPAT_LIBEVENT_H
+#define TOR_COMPAT_LIBEVENT_H
 
 #include "orconfig.h"
 
diff --git a/src/common/container.h b/src/common/container.h
index dab3b83f37933132f5fd9f5a350cf7efee65538f..0b3a3d1412af61104873e8e924f70e909f927bc6 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -3,8 +3,8 @@
  * Copyright (c) 2007-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_CONTAINER_H
-#define _TOR_CONTAINER_H
+#ifndef TOR_CONTAINER_H
+#define TOR_CONTAINER_H
 
 #include "util.h"
 
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 542bc24ed39f5b93e55849ac6f166376ffc3f0cf..22b1cde2b4ef80ff1e87c4b142f26ff2171cd51c 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -10,8 +10,8 @@
  * \brief Headers for crypto.c
  **/
 
-#ifndef _TOR_CRYPTO_H
-#define _TOR_CRYPTO_H
+#ifndef TOR_CRYPTO_H
+#define TOR_CRYPTO_H
 
 #include <stdio.h>
 #include "torint.h"
diff --git a/src/common/memarea.h b/src/common/memarea.h
index b3c76d8d0cc592fe4cc137cb4801e74a43f6a6f0..26c3e6dfe3df02060d322fa7d49cde01c112f934 100644
--- a/src/common/memarea.h
+++ b/src/common/memarea.h
@@ -2,8 +2,8 @@
 /* See LICENSE for licensing information */
 /* Tor dependencies */
 
-#ifndef _TOR_MEMAREA_H
-#define _TOR_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 d0a7bc2f3605be2f6aff9856ac73fa70bb7b6675..b01277df86e63bd94cd046d316d9546f564ac7d3 100644
--- a/src/common/mempool.h
+++ b/src/common/mempool.h
@@ -6,8 +6,8 @@
  * \brief Headers for mempool.c
  **/
 
-#ifndef _TOR_MEMPOOL_H
-#define _TOR_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/torgzip.h b/src/common/torgzip.h
index d3ded81f9c13a9a1fb9216a17ed684a2e3b66f0d..921b232b0f11516e9bc8e9755992b341f7a0e767 100644
--- a/src/common/torgzip.h
+++ b/src/common/torgzip.h
@@ -8,8 +8,8 @@
  * \brief Headers for torgzip.h
  **/
 
-#ifndef _TOR_TORGZIP_H
-#define _TOR_TORGZIP_H
+#ifndef TOR_TORGZIP_H
+#define TOR_TORGZIP_H
 
 /** Enumeration of what kind of compression to use.  Only ZLIB_METHOD is
  * guaranteed to be supported by the compress/uncompress functions here;
diff --git a/src/common/torint.h b/src/common/torint.h
index 8771802d70550a1e7214c930601c64c5fe56c79a..0db9cc7e24a470b1bd0b16e15229baca3e676fa4 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -8,8 +8,8 @@
  * \brief Header file to define uint32_t and friends
  **/
 
-#ifndef _TOR_TORINT_H
-#define _TOR_TORINT_H
+#ifndef TOR_TORINT_H
+#define TOR_TORINT_H
 
 #include "orconfig.h"
 
diff --git a/src/common/torlog.h b/src/common/torlog.h
index fd34db1ac9ba7152561fd475323369267ba3cda3..fdd43994af76bfb08853962e67f9dd5cbab3824f 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -10,7 +10,7 @@
  * \brief Headers for log.c
  **/
 
-#ifndef _TOR_LOG_H
+#ifndef TOR_TORLOG_H
 
 #include "compat.h"
 
@@ -213,6 +213,6 @@ extern const char *_log_fn_function_name;
 
 #endif /* !GNUC */
 
-# define _TOR_LOG_H
+# define TOR_TORLOG_H
 #endif
 
diff --git a/src/common/tortls.h b/src/common/tortls.h
index 491a5419dfe26fa8ed577a9fd8743fe23a00966a..42173f14fbaa8dfc7e66b96d45cca14ed965ed80 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -3,8 +3,8 @@
  * Copyright (c) 2007-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_TORTLS_H
-#define _TOR_TORTLS_H
+#ifndef TOR_TORTLS_H
+#define TOR_TORTLS_H
 
 /**
  * \file tortls.h
diff --git a/src/common/util.h b/src/common/util.h
index 6667978d183cfc258802b56ea5333034e52918e2..dc4af6334d8291eddeb5c4eb8771e9970e4e3d67 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -8,8 +8,8 @@
  * \brief Headers for util.c
  **/
 
-#ifndef _TOR_UTIL_H
-#define _TOR_UTIL_H
+#ifndef TOR_UTIL_H
+#define TOR_UTIL_H
 
 #include "orconfig.h"
 #include "torint.h"
diff --git a/src/or/buffers.h b/src/or/buffers.h
index a5886adc7ad3160efc6c836dc4e3dd96a7f5656f..f31d2910f7a293bd5e39c87450636c4987b4ca30 100644
--- a/src/or/buffers.h
+++ b/src/or/buffers.h
@@ -9,8 +9,8 @@
  * \brief Header file for buffers.c.
  **/
 
-#ifndef _TOR_BUFFERS_H
-#define _TOR_BUFFERS_H
+#ifndef TOR_BUFFERS_H
+#define TOR_BUFFERS_H
 
 buf_t *buf_new(void);
 buf_t *buf_new_with_capacity(size_t size);
diff --git a/src/or/channel.h b/src/or/channel.h
index cb9835a9f5878583e206473deadf04c86851dd40..716eb57d62c3d510d57ec11221d43d829f4f7349 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -6,8 +6,8 @@
  * \brief Header file for channel.c
  **/
 
-#ifndef _TOR_CHANNEL_H
-#define _TOR_CHANNEL_H
+#ifndef TOR_CHANNEL_H
+#define TOR_CHANNEL_H
 
 #include "or.h"
 #include "circuitmux.h"
diff --git a/src/or/channeltls.h b/src/or/channeltls.h
index ca2fc8894020dac9e9fe4d55c63981a1fa12bb63..8eb2a63760f49b4ce91ac4c53d2be0e77cd0ed7a 100644
--- a/src/or/channeltls.h
+++ b/src/or/channeltls.h
@@ -6,8 +6,8 @@
  * \brief Header file for channeltls.c
  **/
 
-#ifndef _TOR_CHANNEL_TLS_H
-#define _TOR_CHANNEL_TLS_H
+#ifndef TOR_CHANNELTLS_H
+#define TOR_CHANNELTLS_H
 
 #include "or.h"
 #include "channel.h"
diff --git a/src/or/circuitbuild.h b/src/or/circuitbuild.h
index 0abffc5166d1dfdad38299495172faca60c01b0a..3ab8fd5ca08d1acf3ad79a9c5c45030a5548fa2e 100644
--- a/src/or/circuitbuild.h
+++ b/src/or/circuitbuild.h
@@ -9,8 +9,8 @@
  * \brief Header file for circuitbuild.c.
  **/
 
-#ifndef _TOR_CIRCUITBUILD_H
-#define _TOR_CIRCUITBUILD_H
+#ifndef TOR_CIRCUITBUILD_H
+#define TOR_CIRCUITBUILD_H
 
 char *circuit_list_path(origin_circuit_t *circ, int verbose);
 char *circuit_list_path_for_controller(origin_circuit_t *circ);
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h
index 89e957c70afaeb359f0fc88c07572951b68c9259..0239da306a288f11c55426496a96b553f9576dd8 100644
--- a/src/or/circuitlist.h
+++ b/src/or/circuitlist.h
@@ -9,8 +9,8 @@
  * \brief Header file for circuitlist.c.
  **/
 
-#ifndef _TOR_CIRCUITLIST_H
-#define _TOR_CIRCUITLIST_H
+#ifndef TOR_CIRCUITLIST_H
+#define TOR_CIRCUITLIST_H
 
 circuit_t * _circuit_get_global_list(void);
 const char *circuit_state_to_string(int state);
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h
index a3eacaf7d41bbe6ab4d89024a453d578c9704b14..b22d1423d0c3db97ae727e43c430360c9a87ad91 100644
--- a/src/or/circuitmux.h
+++ b/src/or/circuitmux.h
@@ -6,8 +6,8 @@
  * \brief Header file for circuitmux.c
  **/
 
-#ifndef _TOR_CIRCUITMUX_H
-#define _TOR_CIRCUITMUX_H
+#ifndef TOR_CIRCUITMUX_H
+#define TOR_CIRCUITMUX_H
 
 #include "or.h"
 
@@ -132,5 +132,5 @@ void circuitmux_clear_num_cells(circuitmux_t *cmux, circuit_t *circ);
 void circuitmux_set_num_cells(circuitmux_t *cmux, circuit_t *circ,
                               unsigned int n_cells);
 
-#endif /* _TOR_CIRCUITMUX_H */
+#endif /* TOR_CIRCUITMUX_H */
 
diff --git a/src/or/circuitmux_ewma.h b/src/or/circuitmux_ewma.h
index eec16f3729bcea22e8096ed00318e4af7574578e..dd612e16cb2245e1993ab9f0da7930ceb7d8a427 100644
--- a/src/or/circuitmux_ewma.h
+++ b/src/or/circuitmux_ewma.h
@@ -6,8 +6,8 @@
  * \brief Header file for circuitmux_ewma.c
  **/
 
-#ifndef _TOR_CIRCUITMUX_EWMA_H
-#define _TOR_CIRCUITMUX_EWMA_H
+#ifndef TOR_CIRCUITMUX_EWMA_H
+#define TOR_CIRCUITMUX_EWMA_H
 
 #include "or.h"
 #include "circuitmux.h"
@@ -25,5 +25,5 @@ unsigned int cell_ewma_get_tick(void);
 void cell_ewma_set_scale_factor(const or_options_t *options,
                                 const networkstatus_t *consensus);
 
-#endif /* _TOR_CIRCUITMUX_EWMA_H */
+#endif /* TOR_CIRCUITMUX_EWMA_H */
 
diff --git a/src/or/circuituse.h b/src/or/circuituse.h
index be2bd7ec519600ecf3a20462aa5a7dae469c814a..e8760c22d34ab7383ea0c2b1263d73d8c28be9e6 100644
--- a/src/or/circuituse.h
+++ b/src/or/circuituse.h
@@ -9,8 +9,8 @@
  * \brief Header file for circuituse.c.
  **/
 
-#ifndef _TOR_CIRCUITUSE_H
-#define _TOR_CIRCUITUSE_H
+#ifndef TOR_CIRCUITUSE_H
+#define TOR_CIRCUITUSE_H
 
 void circuit_expire_building(void);
 void circuit_remove_handled_ports(smartlist_t *needed_ports);
diff --git a/src/or/command.h b/src/or/command.h
index f9a0ef20b726bcb41882d84f98303e62e929d7a0..375d704561aa6c024b63af7f7028313362fb2afd 100644
--- a/src/or/command.h
+++ b/src/or/command.h
@@ -9,8 +9,8 @@
  * \brief Header file for command.c.
  **/
 
-#ifndef _TOR_COMMAND_H
-#define _TOR_COMMAND_H
+#ifndef TOR_COMMAND_H
+#define TOR_COMMAND_H
 
 #include "channel.h"
 
diff --git a/src/or/config.h b/src/or/config.h
index 9d170b8af58a74c2511a8f19ea4bef1cfaad8c9e..f3b28adb78bff43ba18e224b18ac557ecced0782 100644
--- a/src/or/config.h
+++ b/src/or/config.h
@@ -9,8 +9,8 @@
  * \brief Header file for config.c.
  **/
 
-#ifndef _TOR_CONFIG_H
-#define _TOR_CONFIG_H
+#ifndef TOR_CONFIG_H
+#define TOR_CONFIG_H
 
 const char *get_dirportfrontpage(void);
 const or_options_t *get_options(void);
diff --git a/src/or/connection.h b/src/or/connection.h
index 785625e44b4d1bcf50cc002170074779796ad4f1..d32c30c4aba902d1d4fcf297078ac90f0e15f571 100644
--- a/src/or/connection.h
+++ b/src/or/connection.h
@@ -9,8 +9,8 @@
  * \brief Header file for connection.c.
  **/
 
-#ifndef _TOR_CONNECTION_H
-#define _TOR_CONNECTION_H
+#ifndef TOR_CONNECTION_H
+#define TOR_CONNECTION_H
 
 /* XXXX For buf_datalen in inline function */
 #include "buffers.h"
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index c320d6ba49819fd4f5e30ac6b227e3b392d38d5f..499bf421ddb680ee4f2a17de1383d5ad9b6e327e 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -9,8 +9,8 @@
  * \brief Header file for connection_edge.c.
  **/
 
-#ifndef _TOR_CONNECTION_EDGE_H
-#define _TOR_CONNECTION_EDGE_H
+#ifndef TOR_CONNECTION_EDGE_H
+#define TOR_CONNECTION_EDGE_H
 
 #define connection_mark_unattached_ap(conn, endreason) \
   _connection_mark_unattached_ap((conn), (endreason), __LINE__, _SHORT_FILE_)
diff --git a/src/or/connection_or.h b/src/or/connection_or.h
index 22126b05fe93e51875bc2c543800a872d17d2f88..adfdde8d1b42961d8aa00a50980a001fe6dd44bb 100644
--- a/src/or/connection_or.h
+++ b/src/or/connection_or.h
@@ -9,8 +9,8 @@
  * \brief Header file for connection_or.c.
  **/
 
-#ifndef _TOR_CONNECTION_OR_H
-#define _TOR_CONNECTION_OR_H
+#ifndef TOR_CONNECTION_OR_H
+#define TOR_CONNECTION_OR_H
 
 void connection_or_remove_from_identity_map(or_connection_t *conn);
 void connection_or_clear_identity_map(void);
diff --git a/src/or/control.h b/src/or/control.h
index f301ce91be0a987af0203b78fe615ae2dd451242..eea3af724ce36daf6f70845ccb751eadb8a65204 100644
--- a/src/or/control.h
+++ b/src/or/control.h
@@ -9,8 +9,8 @@
  * \brief Header file for control.c.
  **/
 
-#ifndef _TOR_CONTROL_H
-#define _TOR_CONTROL_H
+#ifndef TOR_CONTROL_H
+#define TOR_CONTROL_H
 
 void control_update_global_event_mask(void);
 void control_adjust_event_log_severity(void);
diff --git a/src/or/cpuworker.h b/src/or/cpuworker.h
index 91172caa56acc14161c0bc79e72ed1191507c51c..73c7eefd4c68c77810e744f432492eeb552cbb14 100644
--- a/src/or/cpuworker.h
+++ b/src/or/cpuworker.h
@@ -9,8 +9,8 @@
  * \brief Header file for cpuworker.c.
  **/
 
-#ifndef _TOR_CPUWORKER_H
-#define _TOR_CPUWORKER_H
+#ifndef TOR_CPUWORKER_H
+#define TOR_CPUWORKER_H
 
 void cpu_init(void);
 void cpuworkers_rotate(void);
diff --git a/src/or/directory.h b/src/or/directory.h
index fef671a0efc7a655ce4a9c626bdc6cc62c756e24..9ff78d12c49cea2968b621bb282128c9799929be 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -9,8 +9,8 @@
  * \brief Header file for directory.c.
  **/
 
-#ifndef _TOR_DIRECTORY_H
-#define _TOR_DIRECTORY_H
+#ifndef TOR_DIRECTORY_H
+#define TOR_DIRECTORY_H
 
 int directories_have_accepted_server_descriptor(void);
 void directory_post_to_dirservers(uint8_t dir_purpose, uint8_t router_purpose,
diff --git a/src/or/dirserv.h b/src/or/dirserv.h
index 8508c938a870a67fe7020ad4c256d659ce91236b..ca401407d5006c8feef21aff0f904ba8418f4284 100644
--- a/src/or/dirserv.h
+++ b/src/or/dirserv.h
@@ -9,8 +9,8 @@
  * \brief Header file for dirserv.c.
  **/
 
-#ifndef _TOR_DIRSERV_H
-#define _TOR_DIRSERV_H
+#ifndef TOR_DIRSERV_H
+#define TOR_DIRSERV_H
 
 /** What fraction (1 over this number) of the relay ID space do we
  * (as a directory authority) launch connections to at each reachability
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index 621121864175140ce9cad4674d222f3b80379564..04cf2f9710e0a98ac0cdc08f30d1fe48d34127ba 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -9,8 +9,8 @@
  * \brief Header file for dirvote.c.
  **/
 
-#ifndef _TOR_DIRVOTE_H
-#define _TOR_DIRVOTE_H
+#ifndef TOR_DIRVOTE_H
+#define TOR_DIRVOTE_H
 
 /** Lowest allowable value for VoteSeconds. */
 #define MIN_VOTE_SECONDS 20
diff --git a/src/or/dns.h b/src/or/dns.h
index 8c8b476ac888940e0fe7582152ef79638c138ec4..441a6c35061539ed5b4aa22619d82fc1a1fe5d4e 100644
--- a/src/or/dns.h
+++ b/src/or/dns.h
@@ -9,8 +9,8 @@
  * \brief Header file for dns.c.
  **/
 
-#ifndef _TOR_DNS_H
-#define _TOR_DNS_H
+#ifndef TOR_DNS_H
+#define TOR_DNS_H
 
 int dns_init(void);
 int has_dns_init_failed(void);
diff --git a/src/or/dnsserv.h b/src/or/dnsserv.h
index 3aaa038d2ba35fcd5046b0895c5f76a0ff190abe..39bd1d33b27d1a6277d5e432f2c331579f890ab8 100644
--- a/src/or/dnsserv.h
+++ b/src/or/dnsserv.h
@@ -9,8 +9,8 @@
  * \brief Header file for dnsserv.c.
  **/
 
-#ifndef _TOR_DNSSERV_H
-#define _TOR_DNSSERV_H
+#ifndef TOR_DNSSERV_H
+#define TOR_DNSSERV_H
 
 void dnsserv_configure_listener(connection_t *conn);
 void dnsserv_close_listener(connection_t *conn);
diff --git a/src/or/geoip.h b/src/or/geoip.h
index 4aed4e07bbbb66070e3000fb0bf290ebce00b435..bda5fe2c5880483270da13f7d3851f77f6fb81ae 100644
--- a/src/or/geoip.h
+++ b/src/or/geoip.h
@@ -9,8 +9,8 @@
  * \brief Header file for geoip.c.
  **/
 
-#ifndef _TOR_GEOIP_H
-#define _TOR_GEOIP_H
+#ifndef TOR_GEOIP_H
+#define TOR_GEOIP_H
 
 #ifdef GEOIP_PRIVATE
 int geoip_parse_entry(const char *line);
diff --git a/src/or/hibernate.h b/src/or/hibernate.h
index 9aa026b7b04e911b3987d602200086a1e1c97a82..5f99cde015d2123bf51917d1228f996c543574af 100644
--- a/src/or/hibernate.h
+++ b/src/or/hibernate.h
@@ -9,8 +9,8 @@
  * \brief Header file for hibernate.c.
  **/
 
-#ifndef _TOR_HIBERNATE_H
-#define _TOR_HIBERNATE_H
+#ifndef TOR_HIBERNATE_H
+#define TOR_HIBERNATE_H
 
 int accounting_parse_options(const or_options_t *options, int validate_only);
 int accounting_is_enabled(const or_options_t *options);
diff --git a/src/or/main.h b/src/or/main.h
index f843b6f9fcdd6516285c79ea15a77c64ac7f15cb..da2bcfd4931fde414b7656f7a2e4ea86feab143a 100644
--- a/src/or/main.h
+++ b/src/or/main.h
@@ -9,8 +9,8 @@
  * \brief Header file for main.c.
  **/
 
-#ifndef _TOR_MAIN_H
-#define _TOR_MAIN_H
+#ifndef TOR_MAIN_H
+#define TOR_MAIN_H
 
 extern int can_complete_circuit;
 
diff --git a/src/or/microdesc.h b/src/or/microdesc.h
index 5646fc7a8534ecdb30edf2fbf08c98a17ddf45f7..4b18caaae073e9d45ab829151cc532a5e2d47b03 100644
--- a/src/or/microdesc.h
+++ b/src/or/microdesc.h
@@ -9,8 +9,8 @@
  * \brief Header file for microdesc.c.
  **/
 
-#ifndef _TOR_MICRODESC_H
-#define _TOR_MICRODESC_H
+#ifndef TOR_MICRODESC_H
+#define TOR_MICRODESC_H
 
 microdesc_cache_t *get_microdesc_cache(void);
 
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index dcd58f8898a5de9ff34b4532c0978ff50b1e2703..fe16f33918014ef0a1c4f382808f7d93c540c6d2 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -9,8 +9,8 @@
  * \brief Header file for networkstatus.c.
  **/
 
-#ifndef _TOR_NETWORKSTATUS_H
-#define _TOR_NETWORKSTATUS_H
+#ifndef TOR_NETWORKSTATUS_H
+#define TOR_NETWORKSTATUS_H
 
 /** How old do we allow a v2 network-status to get before removing it
  * completely? */
diff --git a/src/or/nodelist.h b/src/or/nodelist.h
index 2e978f17828a91be901c00b528f16214b947959a..13a38474140c775f001ef46363a920d0b0991785 100644
--- a/src/or/nodelist.h
+++ b/src/or/nodelist.h
@@ -9,8 +9,8 @@
  * \brief Header file for nodelist.c.
  **/
 
-#ifndef _TOR_NODELIST_H
-#define _TOR_NODELIST_H
+#ifndef TOR_NODELIST_H
+#define TOR_NODELIST_H
 
 #define node_assert_ok(n) STMT_BEGIN {                          \
     tor_assert((n)->ri || (n)->rs);                             \
diff --git a/src/or/ntmain.h b/src/or/ntmain.h
index 07fdcf466b1c99c259d22c502f042d53e098265b..95a835a42e6ee83a0c37bdc5955355059ae1a45c 100644
--- a/src/or/ntmain.h
+++ b/src/or/ntmain.h
@@ -9,8 +9,8 @@
  * \brief Header file for ntmain.c.
  **/
 
-#ifndef _TOR_NTMAIN_H
-#define _TOR_NTMAIN_H
+#ifndef TOR_NTMAIN_H
+#define TOR_NTMAIN_H
 
 #ifdef _WIN32
 #if !defined (WINCE)
diff --git a/src/or/onion.h b/src/or/onion.h
index 7e0f873c737982e2eb25e92a2bcecf0be7a0a0c4..e7626f97093e65978e15e21f9e57266919c42ccf 100644
--- a/src/or/onion.h
+++ b/src/or/onion.h
@@ -9,8 +9,8 @@
  * \brief Header file for onion.c.
  **/
 
-#ifndef _TOR_ONION_H
-#define _TOR_ONION_H
+#ifndef TOR_ONION_H
+#define TOR_ONION_H
 
 int onion_pending_add(or_circuit_t *circ, char *onionskin);
 or_circuit_t *onion_next_task(char **onionskin_out);
diff --git a/src/or/or.h b/src/or/or.h
index 96e029961439293887b759f0649cccb4c9e5a133..39b6d2bb3646b4ab7818e8db66caf7ca7af427bb 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -9,8 +9,8 @@
  * \brief Master header file for Tor-specific functionality.
  **/
 
-#ifndef _TOR_OR_H
-#define _TOR_OR_H
+#ifndef TOR_OR_H
+#define TOR_OR_H
 
 #include "orconfig.h"
 
diff --git a/src/or/policies.h b/src/or/policies.h
index 31f3f06c7d348910fbb1d479f59403057f5eca61..93fd572e2c30b00d190d470fff39ad027b7eb405 100644
--- a/src/or/policies.h
+++ b/src/or/policies.h
@@ -9,8 +9,8 @@
  * \brief Header file for policies.c.
  **/
 
-#ifndef _TOR_POLICIES_H
-#define _TOR_POLICIES_H
+#ifndef TOR_POLICIES_H
+#define TOR_POLICIES_H
 
 /* (length of "accept 255.255.255.255/255.255.255.255:65535-65535\n" plus a
  * NUL.)
diff --git a/src/or/reasons.h b/src/or/reasons.h
index 377b61b1136f33f727d4d2459d86007d15105987..0dbf5aa6935c3eb727789b305de755b73d60e6cf 100644
--- a/src/or/reasons.h
+++ b/src/or/reasons.h
@@ -9,8 +9,8 @@
  * \brief Header file for reasons.c.
  **/
 
-#ifndef _TOR_REASONS_H
-#define _TOR_REASONS_H
+#ifndef TOR_REASONS_H
+#define TOR_REASONS_H
 
 const char *stream_end_reason_to_control_string(int reason);
 const char *stream_end_reason_to_string(int reason);
diff --git a/src/or/relay.h b/src/or/relay.h
index 5759c5180166465474eed96ebd50ee1292a6516e..3906d6bf859040ab2638d10b28453b1d8eff50d2 100644
--- a/src/or/relay.h
+++ b/src/or/relay.h
@@ -9,8 +9,8 @@
  * \brief Header file for relay.c.
  **/
 
-#ifndef _TOR_RELAY_H
-#define _TOR_RELAY_H
+#ifndef TOR_RELAY_H
+#define TOR_RELAY_H
 
 extern uint64_t stats_n_relay_cells_relayed;
 extern uint64_t stats_n_relay_cells_delivered;
diff --git a/src/or/rendclient.h b/src/or/rendclient.h
index 393b556e32dbf7b9b8d30e67d46ac69e58d4d652..b71fe48be33d3ccefb83923888325457e25bfc53 100644
--- a/src/or/rendclient.h
+++ b/src/or/rendclient.h
@@ -9,8 +9,8 @@
  * \brief Header file for rendclient.c.
  **/
 
-#ifndef _TOR_RENDCLIENT_H
-#define _TOR_RENDCLIENT_H
+#ifndef TOR_RENDCLIENT_H
+#define TOR_RENDCLIENT_H
 
 void rend_client_purge_state(void);
 
diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h
index be6bd13d2cd497b6bd4ed2a7426c64ba4a6c288e..fe574b152fe0293274d7f8882f38a1236fa02c95 100644
--- a/src/or/rendcommon.h
+++ b/src/or/rendcommon.h
@@ -9,8 +9,8 @@
  * \brief Header file for rendcommon.c.
  **/
 
-#ifndef _TOR_RENDCOMMON_H
-#define _TOR_RENDCOMMON_H
+#ifndef TOR_RENDCOMMON_H
+#define TOR_RENDCOMMON_H
 
 /** Free all storage associated with <b>data</b> */
 static INLINE void
diff --git a/src/or/rendmid.h b/src/or/rendmid.h
index 0af6436deab0edbcd183ed2c101960576026bb4a..74ba16b3169853ca16317c282c3306fdee8bc84b 100644
--- a/src/or/rendmid.h
+++ b/src/or/rendmid.h
@@ -9,8 +9,8 @@
  * \brief Header file for rendmid.c.
  **/
 
-#ifndef _TOR_RENDMID_H
-#define _TOR_RENDMID_H
+#ifndef TOR_RENDMID_H
+#define TOR_RENDMID_H
 
 int rend_mid_establish_intro(or_circuit_t *circ, const uint8_t *request,
                              size_t request_len);
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index 0d6eddaee6117295cc8b5138652770a35e00a0d7..16716023482e5136885de110a99a7e5317cb5cb2 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -9,8 +9,8 @@
  * \brief Header file for rendservice.c.
  **/
 
-#ifndef _TOR_RENDSERVICE_H
-#define _TOR_RENDSERVICE_H
+#ifndef TOR_RENDSERVICE_H
+#define TOR_RENDSERVICE_H
 
 #include "or.h"
 
diff --git a/src/or/rephist.h b/src/or/rephist.h
index d47724edb55968140d632562776eec071e747d01..28dec8f902a3f5e311a979342437c359bba14b5e 100644
--- a/src/or/rephist.h
+++ b/src/or/rephist.h
@@ -9,8 +9,8 @@
  * \brief Header file for rephist.c.
  **/
 
-#ifndef _TOR_REPHIST_H
-#define _TOR_REPHIST_H
+#ifndef TOR_REPHIST_H
+#define TOR_REPHIST_H
 
 void rep_hist_init(void);
 void rep_hist_note_connect_failed(const char* nickname, time_t when);
diff --git a/src/or/replaycache.h b/src/or/replaycache.h
index 9f3107c51376be6545a8c6eca52f0aee3fd2a065..757102b9600103c295f6788efdd78d8539d3fcbf 100644
--- a/src/or/replaycache.h
+++ b/src/or/replaycache.h
@@ -6,8 +6,8 @@
  * \brief Header file for replaycache.c.
  **/
 
-#ifndef _TOR_REPLAYCACHE_H
-#define _TOR_REPLAYCACHE_H
+#ifndef TOR_REPLAYCACHE_H
+#define TOR_REPLAYCACHE_H
 
 typedef struct replaycache_s replaycache_t;
 
diff --git a/src/or/router.h b/src/or/router.h
index 39640855e0d1f09548afe8db005437d1d4094f92..7ab057706d9ef4daa6b77ce70d08e320956eaf94 100644
--- a/src/or/router.h
+++ b/src/or/router.h
@@ -9,8 +9,8 @@
  * \brief Header file for router.c.
  **/
 
-#ifndef _TOR_ROUTER_H
-#define _TOR_ROUTER_H
+#ifndef TOR_ROUTER_H
+#define TOR_ROUTER_H
 
 crypto_pk_t *get_onion_key(void);
 time_t get_onion_key_set_at(void);
diff --git a/src/or/routerlist.h b/src/or/routerlist.h
index 58143010b318c2356d031099976cf790f28140cc..c8381996d201f705fc6dea3cf2f5109464f7ba55 100644
--- a/src/or/routerlist.h
+++ b/src/or/routerlist.h
@@ -8,8 +8,8 @@
  * \brief Header file for routerlist.c.
  **/
 
-#ifndef _TOR_ROUTERLIST_H
-#define _TOR_ROUTERLIST_H
+#ifndef TOR_ROUTERLIST_H
+#define TOR_ROUTERLIST_H
 
 int get_n_authorities(dirinfo_type_t type);
 int trusted_dirs_reload_certs(void);
diff --git a/src/or/routerparse.h b/src/or/routerparse.h
index c6382a7f6be033b359371e7a1adfac63aee95ba7..6cf94c1c2f70be063230e4ff291bcbb53c8b67dc 100644
--- a/src/or/routerparse.h
+++ b/src/or/routerparse.h
@@ -9,8 +9,8 @@
  * \brief Header file for routerparse.c.
  **/
 
-#ifndef _TOR_ROUTERPARSE_H
-#define _TOR_ROUTERPARSE_H
+#ifndef TOR_ROUTERPARSE_H
+#define TOR_ROUTERPARSE_H
 
 int router_get_router_hash(const char *s, size_t s_len, char *digest);
 int router_get_dir_hash(const char *s, char *digest);
diff --git a/src/or/status.h b/src/or/status.h
index 189ac789e19be8664042e37b447441ca28bf006d..de49d751c3bda6175ae5731e840cc8474bf9fa88 100644
--- a/src/or/status.h
+++ b/src/or/status.h
@@ -1,8 +1,8 @@
 /* Copyright (c) 2010-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_STATUS_H
-#define _TOR_STATUS_H
+#ifndef TOR_STATUS_H
+#define TOR_STATUS_H
 
 int log_heartbeat(time_t now);
 
diff --git a/src/test/test.h b/src/test/test.h
index 6dcb9490bd776bbe149cfce993ec903240903e90..08fad6b313d0377e132e040df90b7a402882bea2 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -3,8 +3,8 @@
  * Copyright (c) 2007-2012, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
-#ifndef _TOR_TEST_H
-#define _TOR_TEST_H
+#ifndef TOR_TEST_H
+#define TOR_TEST_H
 
 /**
  * \file test.h
diff --git a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.h b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.h
index 0f97236afb644f93481d8511389a213a0e938a4e..037d409ac7fcc03653a89587a6c22c046f068899 100644
--- a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.h
+++ b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.h
@@ -7,8 +7,8 @@
   **/
 
 #ifdef NAT_PMP
-#ifndef _TOR_FW_HELPER_NATPMP_H
-#define _TOR_FW_HELPER_NATPMP_H
+#ifndef TOR_TOR_FW_HELPER_NATPMP_H
+#define TOR_TOR_FW_HELPER_NATPMP_H
 
 #include <natpmp.h>
 
diff --git a/src/tools/tor-fw-helper/tor-fw-helper-upnp.h b/src/tools/tor-fw-helper/tor-fw-helper-upnp.h
index 3a061981d1079be7d3c8e8b1cb5605340f74dce1..add350d2f6aa4e304fff185db44ac4dbf14aaf5a 100644
--- a/src/tools/tor-fw-helper/tor-fw-helper-upnp.h
+++ b/src/tools/tor-fw-helper/tor-fw-helper-upnp.h
@@ -8,8 +8,8 @@
   **/
 
 #ifdef MINIUPNPC
-#ifndef _TOR_FW_HELPER_UPNP_H
-#define _TOR_FW_HELPER_UPNP_H
+#ifndef TOR_TOR_FW_HELPER_UPNP_H
+#define TOR_TOR_FW_HELPER_UPNP_H
 
 #include <miniupnpc/miniwget.h>
 #include <miniupnpc/miniupnpc.h>
diff --git a/src/tools/tor-fw-helper/tor-fw-helper.h b/src/tools/tor-fw-helper/tor-fw-helper.h
index 08f94d083027ae31fae97974b1287b47c02bdc4b..1f6c1ff26bfe991197d80162acdc1524656bacf2 100644
--- a/src/tools/tor-fw-helper/tor-fw-helper.h
+++ b/src/tools/tor-fw-helper/tor-fw-helper.h
@@ -7,8 +7,8 @@
   * \brief The main header for our firewall helper.
   **/
 
-#ifndef _TOR_FW_HELPER_H
-#define _TOR_FW_HELPER_H
+#ifndef TOR_TOR_FW_HELPER_H
+#define TOR_TOR_FW_HELPER_H
 
 #include <stdint.h>
 #include <stdio.h>