diff options
author | lloyd <[email protected]> | 2008-11-09 17:24:06 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-09 17:24:06 +0000 |
commit | 2dada64d07767d7794d0f325b2df99b090ecc758 (patch) | |
tree | d16396c84f62372784988562a14be1d98662b96d | |
parent | db172f9347a15d14ea016bab2f1419eba9a9eac9 (diff) |
Macro cleanup
-rw-r--r-- | src/block/block_cipher.h | 4 | ||||
-rw-r--r-- | src/modes/ctr/ctr.h | 4 | ||||
-rw-r--r-- | src/pubkey/ecdsa/ecdsa_op.cpp | 2 | ||||
-rw-r--r-- | src/pubkey/pk_lookup/pk_algs.cpp | 14 | ||||
-rw-r--r-- | src/utils/asm_amd64/asm_macr.h | 8 | ||||
-rw-r--r-- | src/utils/asm_ia32/asm_macr.h | 9 |
6 files changed, 18 insertions, 23 deletions
diff --git a/src/block/block_cipher.h b/src/block/block_cipher.h index 1a4302581..7bc7729c8 100644 --- a/src/block/block_cipher.h +++ b/src/block/block_cipher.h @@ -3,8 +3,8 @@ * (C) 1999-2007 Jack Lloyd */ -#ifndef BOTAN_BLOCK_CIPHER__ -#define BOTAN_BLOCK_CIPHER__ +#ifndef BOTAN_BLOCK_CIPHER_H__ +#define BOTAN_BLOCK_CIPHER_H__ #include <botan/exceptn.h> #include <botan/symkey.h> diff --git a/src/modes/ctr/ctr.h b/src/modes/ctr/ctr.h index 86fe3b661..9fececddd 100644 --- a/src/modes/ctr/ctr.h +++ b/src/modes/ctr/ctr.h @@ -3,8 +3,8 @@ * (C) 1999-2007 Jack Lloyd * *************************************************/ -#ifndef BOTAN_COUNTER_MODE_H_ -#define BOTAN_COUNTER_MODE_H_ +#ifndef BOTAN_COUNTER_MODE_H__ +#define BOTAN_COUNTER_MODE_H__ #include <botan/modebase.h> #include <botan/modebase.h> diff --git a/src/pubkey/ecdsa/ecdsa_op.cpp b/src/pubkey/ecdsa/ecdsa_op.cpp index 2dc946d4d..a7db3f237 100644 --- a/src/pubkey/ecdsa/ecdsa_op.cpp +++ b/src/pubkey/ecdsa/ecdsa_op.cpp @@ -79,7 +79,7 @@ SecureVector<byte> Default_ECDSA_Op::sign(const byte message[], // s = a - b mod n // where x is a random integer -#ifdef CMS_RAND +#if defined(CMS_RAND) BigInt x = BigInt::random_integer(0, n); BigInt s = m_priv_key + x; // obscure the secret from the beginning // all following operations thus are randomized diff --git a/src/pubkey/pk_lookup/pk_algs.cpp b/src/pubkey/pk_lookup/pk_algs.cpp index 44a750c83..3d33d8f35 100644 --- a/src/pubkey/pk_lookup/pk_algs.cpp +++ b/src/pubkey/pk_lookup/pk_algs.cpp @@ -5,31 +5,31 @@ #include <botan/pk_algs.h> -#ifdef BOTAN_HAS_RSA +#if defined(BOTAN_HAS_RSA) #include <botan/rsa.h> #endif -#ifdef BOTAN_HAS_DSA +#if defined(BOTAN_HAS_DSA) #include <botan/dsa.h> #endif -#ifdef BOTAN_HAS_DIFFIE_HELLMAN +#if defined(BOTAN_HAS_DIFFIE_HELLMAN) #include <botan/dh.h> #endif -#ifdef BOTAN_HAS_ECDSA +#if defined(BOTAN_HAS_ECDSA) #include <botan/ecdsa.h> #endif -#ifdef BOTAN_HAS_NYBERG_RUEPPEL +#if defined(BOTAN_HAS_NYBERG_RUEPPEL) #include <botan/nr.h> #endif -#ifdef BOTAN_HAS_RW +#if defined(BOTAN_HAS_RW) #include <botan/rw.h> #endif -#ifdef BOTAN_HAS_ELGAMAL +#if defined(BOTAN_HAS_ELGAMAL) #include <botan/elgamal.h> #endif diff --git a/src/utils/asm_amd64/asm_macr.h b/src/utils/asm_amd64/asm_macr.h index 3cdd42dc6..6f819591f 100644 --- a/src/utils/asm_amd64/asm_macr.h +++ b/src/utils/asm_amd64/asm_macr.h @@ -6,10 +6,6 @@ #ifndef BOTAN_AMD64_ASM_MACROS_H__ #define BOTAN_AMD64_ASM_MACROS_H__ -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - /************************************************* * General/Global Macros * *************************************************/ @@ -20,6 +16,10 @@ .text; \ ALIGN; +#if defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif + /************************************************* * Function Definitions * *************************************************/ diff --git a/src/utils/asm_ia32/asm_macr.h b/src/utils/asm_ia32/asm_macr.h index 6d5dbb59d..58f9be19a 100644 --- a/src/utils/asm_ia32/asm_macr.h +++ b/src/utils/asm_ia32/asm_macr.h @@ -6,10 +6,6 @@ #ifndef BOTAN_IA32_ASM_MACROS_H__ #define BOTAN_IA32_ASM_MACROS_H__ -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - /************************************************* * General/Global Macros * *************************************************/ @@ -18,9 +14,9 @@ #define START_LISTING(FILENAME) \ .file #FILENAME; \ .text; \ - .p2align 4,,15; + ALIGN; -#ifdef __ELF__ +#if defined(__ELF__) .section .note.GNU-stack,"",%progbits #endif @@ -28,7 +24,6 @@ * Function Definitions * *************************************************/ #define START_FUNCTION(func_name) \ - .align 8; \ ALIGN; \ .global func_name; \ .type func_name,@function; \ |