diff options
author | lloyd <[email protected]> | 2008-10-12 05:58:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-12 05:58:23 +0000 |
commit | 109cb25ffbb58ab2dcceef7777eee4c6b60a7982 (patch) | |
tree | ca4557bc0a2e77d2b747f04c0c8fb52ef02c4518 | |
parent | 8efcb908cca5d9aac801221a74c8c1e849066207 (diff) |
Rename the TR1 choice macros to BOTAN_USE_STD_TR1 and BOTAN_USE_BOOST_TR1.
If neither is defined when build.h is included, choose Boost.
Reorganize build.h so it is easier to find things, in particular move all
of the interesting toggles to the top of the file and all of the long
lists of modules and feature test macros to the end.
-rw-r--r-- | src/build-data/buildh.in | 67 | ||||
-rw-r--r-- | src/cert/cvc/freestore.h | 8 | ||||
-rw-r--r-- | src/math/gfpmath/gfp_element.h | 6 |
3 files changed, 45 insertions, 36 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index e9ed38e46..da4854e76 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -2,53 +2,60 @@ #ifndef BOTAN_BUILD_CONFIG_H__ #define BOTAN_BUILD_CONFIG_H__ -/* -This file was automatically generated - -@{var:timestamp} UTC - -by @{var:user} on @{var:hostname} - -@{var:command-line} - -Target -------- -Compiler: @{var:cc} @{var:lib_opt} @{var:mach_opt} -Arch: @{var:submodel}/@{var:arch} -OS: @{var:os} - -Modules -------- -@{var:mod-list} -*/ +/* This file was automatically generated @{var:timestamp} UTC */ #define BOTAN_VERSION_MAJOR @{var:version_major} #define BOTAN_VERSION_MINOR @{var:version_minor} #define BOTAN_VERSION_PATCH @{var:version_patch} -#define BOTAN_MP_WORD_BITS @{var:mp_bits} +#ifndef BOTAN_DLL + #define BOTAN_DLL @{var:dll_export_flags} +#endif + +/* Chunk sizes */ #define BOTAN_DEFAULT_BUFFER_SIZE 4096 #define BOTAN_MEM_POOL_CHUNK_SIZE 64*1024 -#define BOTAN_PRIVATE_KEY_OP_BLINDING_BITS 64 +/* BigInt toggles */ +#define BOTAN_MP_WORD_BITS @{var:mp_bits} #define BOTAN_KARAT_MUL_THRESHOLD 32 #define BOTAN_KARAT_SQR_THRESHOLD 32 +#define BOTAN_PRIVATE_KEY_OP_BLINDING_BITS 64 -#ifdef __GNUG__ - #define BOTAN_COMPILER_HAS_GCC_INLINE_ASM 1 +/* Should we use GCC-style inline assembler? */ +#if !defined(BOTAN_USE_GCC_INLINE_ASM) && defined(__GNUG__) + #define BOTAN_USE_GCC_INLINE_ASM 1 #endif -//#define BOTAN_USE_TR1_SHARED_PTR -#define BOTAN_USE_BOOST_TR1_SHARED_PTR - -#ifndef BOTAN_COMPILER_HAS_GCC_INLINE_ASM - #define BOTAN_COMPILER_HAS_GCC_INLINE_ASM 0 +#ifndef BOTAN_USE_GCC_INLINE_ASM + #define BOTAN_USE_GCC_INLINE_ASM 0 #endif -#ifndef BOTAN_DLL - #define BOTAN_DLL @{var:dll_export_flags} +/* Which TR1 shared_ptr implementation to use? */ +//#define BOTAN_USE_STD_TR1 +#define BOTAN_USE_BOOST_TR1 + +#if !defined(BOTAN_USE_BOOST_TR1) and !defined(BOTAN_USE_STD_TR1) + #define BOTAN_USE_BOOST_TR1 #endif +/* Target identification and feature test macros */ + @{var:defines} @{var:local_config} + +/* +@{var:user}@@{var:hostname} ran '@{var:command-line}' + +Target +------- +Compiler: @{var:cc} @{var:lib_opt} @{var:mach_opt} +Arch: @{var:submodel}/@{var:arch} +OS: @{var:os} + +Modules +------- +@{var:mod-list} +*/ + #endif diff --git a/src/cert/cvc/freestore.h b/src/cert/cvc/freestore.h index f83d1e867..abcd1e3ae 100644 --- a/src/cert/cvc/freestore.h +++ b/src/cert/cvc/freestore.h @@ -6,12 +6,14 @@ #ifndef BOTAN_FREESTORE_H__ #define BOTAN_FREESTORE_H__ -#if defined(BOTAN_USE_TR1_SHARED_PTR) +#include <botan/build.h> + +#if defined(BOTAN_USE_STD_TR1) #include <tr1/memory> -#elif defined(BOTAN_USE_BOOST_TR1_SHARED_PTR) +#elif defined(BOTAN_USE_BOOST_TR1) #include <boost/tr1/memory.hpp> #else - #error "Please choose a shared_ptr implementation" + #error "Please choose a TR1 implementation in build.h" #endif namespace Botan { diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h index b168d424a..ab0e0e5ab 100644 --- a/src/math/gfpmath/gfp_element.h +++ b/src/math/gfpmath/gfp_element.h @@ -16,12 +16,12 @@ #include <botan/gfp_modulus.h> #include <iostream> -#if defined(BOTAN_USE_TR1_SHARED_PTR) +#if defined(BOTAN_USE_STD_TR1) #include <tr1/memory> -#elif defined(BOTAN_USE_BOOST_TR1_SHARED_PTR) +#elif defined(BOTAN_USE_BOOST_TR1) #include <boost/tr1/memory.hpp> #else - #error "Please choose a shared_ptr implementation" + #error "Please choose a TR1 implementation in build.h" #endif namespace Botan { |