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
This commit is contained in:
Nick Mathewson 2008-12-29 02:21:02 +00:00
parent b0a8ecd193
commit e8a3fa91a6
17 changed files with 37 additions and 32 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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$"
/**

View File

@ -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"

View File

@ -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$"

View File

@ -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>

View File

@ -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) \

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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$"
/**

View File

@ -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

View File

@ -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"

View File

@ -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$"
/**

View File

@ -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"

View File

@ -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

View File

@ -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"