From b50e6fb5e72bea0f4b8502720fb1238fd5f47812 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 22 Apr 2013 12:47:32 -0700 Subject: [PATCH] Don't protect api.h against double inclusion, it's useless. Plus, we need to use dedicated macros for that. --- src/libsodium/crypto_auth/hmacsha256/ref/api.h | 4 ---- src/libsodium/crypto_auth/hmacsha512256/ref/api.h | 4 ---- src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h | 4 ---- src/libsodium/crypto_core/hsalsa20/ref2/api.h | 4 ---- src/libsodium/crypto_core/salsa20/ref/api.h | 4 ---- src/libsodium/crypto_core/salsa2012/ref/api.h | 4 ---- src/libsodium/crypto_core/salsa208/ref/api.h | 4 ---- src/libsodium/crypto_generichash/blake2/ref/api.h | 4 ---- src/libsodium/crypto_hash/sha256/ref/api.h | 4 ---- src/libsodium/crypto_hash/sha512/ref/api.h | 4 ---- src/libsodium/crypto_hashblocks/sha256/ref/api.h | 4 ---- src/libsodium/crypto_hashblocks/sha512/ref/api.h | 4 ---- src/libsodium/crypto_onetimeauth/poly1305/53/api.h | 4 ---- src/libsodium/crypto_onetimeauth/poly1305/ref/api.h | 4 ---- src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h | 3 --- src/libsodium/crypto_scalarmult/curve25519/ref/api.h | 4 ---- src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h | 4 ---- src/libsodium/crypto_shorthash/siphash24/ref/api.h | 4 ---- src/libsodium/crypto_sign/ed25519/ref10/api.h | 4 ---- src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h | 3 --- src/libsodium/crypto_stream/aes128ctr/portable/api.h | 4 ---- src/libsodium/crypto_stream/salsa20/ref/api.h | 4 ---- src/libsodium/crypto_stream/salsa2012/ref/api.h | 3 --- src/libsodium/crypto_stream/salsa208/ref/api.h | 4 ---- src/libsodium/crypto_stream/xsalsa20/ref/api.h | 3 --- src/libsodium/crypto_verify/16/ref/api.h | 4 ---- src/libsodium/crypto_verify/32/ref/api.h | 4 ---- 27 files changed, 104 deletions(-) diff --git a/src/libsodium/crypto_auth/hmacsha256/ref/api.h b/src/libsodium/crypto_auth/hmacsha256/ref/api.h index 5ca6a52d..46fcdb60 100644 --- a/src/libsodium/crypto_auth/hmacsha256/ref/api.h +++ b/src/libsodium/crypto_auth/hmacsha256/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_auth_H -#define crypto_auth_H #include "crypto_auth_hmacsha256.h" @@ -10,5 +8,3 @@ #define crypto_auth_PRIMITIVE "hmacsha256" #define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha256_IMPLEMENTATION #define crypto_auth_VERSION crypto_auth_hmacsha256_VERSION - -#endif diff --git a/src/libsodium/crypto_auth/hmacsha512256/ref/api.h b/src/libsodium/crypto_auth/hmacsha512256/ref/api.h index 32775575..f0331271 100644 --- a/src/libsodium/crypto_auth/hmacsha512256/ref/api.h +++ b/src/libsodium/crypto_auth/hmacsha512256/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_auth_H -#define crypto_auth_H #include "crypto_auth_hmacsha512256.h" @@ -10,5 +8,3 @@ #define crypto_auth_PRIMITIVE "hmacsha512256" #define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha512256_IMPLEMENTATION #define crypto_auth_VERSION crypto_auth_hmacsha512256_VERSION - -#endif diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h index 40273020..394a75ec 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_box_H -#define crypto_box_H #include "crypto_box_curve25519xsalsa20poly1305.h" @@ -19,5 +17,3 @@ #define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305" #define crypto_box_IMPLEMENTATION crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION #define crypto_box_VERSION crypto_box_curve25519xsalsa20poly1305_VERSION - -#endif diff --git a/src/libsodium/crypto_core/hsalsa20/ref2/api.h b/src/libsodium/crypto_core/hsalsa20/ref2/api.h index f7daf16f..e7866bac 100644 --- a/src/libsodium/crypto_core/hsalsa20/ref2/api.h +++ b/src/libsodium/crypto_core/hsalsa20/ref2/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_core_H -#define crypto_core_H #include "crypto_core_hsalsa20.h" @@ -11,5 +9,3 @@ #define crypto_core_PRIMITIVE "hsalsa20" #define crypto_core_IMPLEMENTATION crypto_core_hsalsa20_IMPLEMENTATION #define crypto_core_VERSION crypto_core_hsalsa20_VERSION - -#endif diff --git a/src/libsodium/crypto_core/salsa20/ref/api.h b/src/libsodium/crypto_core/salsa20/ref/api.h index 88374aa0..d800a1ed 100644 --- a/src/libsodium/crypto_core/salsa20/ref/api.h +++ b/src/libsodium/crypto_core/salsa20/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_core_H -#define crypto_core_H #include "crypto_core_salsa20.h" @@ -11,5 +9,3 @@ #define crypto_core_PRIMITIVE "salsa20" #define crypto_core_IMPLEMENTATION crypto_core_salsa20_IMPLEMENTATION #define crypto_core_VERSION crypto_core_salsa20_VERSION - -#endif diff --git a/src/libsodium/crypto_core/salsa2012/ref/api.h b/src/libsodium/crypto_core/salsa2012/ref/api.h index 320ad91b..3e27241d 100644 --- a/src/libsodium/crypto_core/salsa2012/ref/api.h +++ b/src/libsodium/crypto_core/salsa2012/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_core_H -#define crypto_core_H #include "crypto_core_salsa2012.h" @@ -11,5 +9,3 @@ #define crypto_core_PRIMITIVE "salsa2012" #define crypto_core_IMPLEMENTATION crypto_core_salsa2012_IMPLEMENTATION #define crypto_core_VERSION crypto_core_salsa2012_VERSION - -#endif diff --git a/src/libsodium/crypto_core/salsa208/ref/api.h b/src/libsodium/crypto_core/salsa208/ref/api.h index 0f65f53a..1172a352 100644 --- a/src/libsodium/crypto_core/salsa208/ref/api.h +++ b/src/libsodium/crypto_core/salsa208/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_core_H -#define crypto_core_H #include "crypto_core_salsa208.h" @@ -11,5 +9,3 @@ #define crypto_core_PRIMITIVE "salsa208" #define crypto_core_IMPLEMENTATION crypto_core_salsa208_IMPLEMENTATION #define crypto_core_VERSION crypto_core_salsa208_VERSION - -#endif diff --git a/src/libsodium/crypto_generichash/blake2/ref/api.h b/src/libsodium/crypto_generichash/blake2/ref/api.h index ae3ecf76..6dab81cb 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/api.h +++ b/src/libsodium/crypto_generichash/blake2/ref/api.h @@ -1,8 +1,4 @@ -#ifndef crypto_generichash_H -#define crypto_generichash_H #include "crypto_generichash_blake2b.h" #define crypto_generichash_blake2b crypto_generichash_blake2b_ref - -#endif diff --git a/src/libsodium/crypto_hash/sha256/ref/api.h b/src/libsodium/crypto_hash/sha256/ref/api.h index e89f6e60..9878f8e8 100644 --- a/src/libsodium/crypto_hash/sha256/ref/api.h +++ b/src/libsodium/crypto_hash/sha256/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_hash_H -#define crypto_hash_H #include "crypto_hash_sha256.h" @@ -8,5 +6,3 @@ #define crypto_hash_PRIMITIVE "sha256" #define crypto_hash_IMPLEMENTATION crypto_hash_sha256_IMPLEMENTATION #define crypto_hash_VERSION crypto_hash_sha256_VERSION - -#endif diff --git a/src/libsodium/crypto_hash/sha512/ref/api.h b/src/libsodium/crypto_hash/sha512/ref/api.h index c24f367e..afea983f 100644 --- a/src/libsodium/crypto_hash/sha512/ref/api.h +++ b/src/libsodium/crypto_hash/sha512/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_hash_H -#define crypto_hash_H #include "crypto_hash_sha512.h" @@ -8,5 +6,3 @@ #define crypto_hash_PRIMITIVE "sha512" #define crypto_hash_IMPLEMENTATION crypto_hash_sha512_IMPLEMENTATION #define crypto_hash_VERSION crypto_hash_sha512_VERSION - -#endif diff --git a/src/libsodium/crypto_hashblocks/sha256/ref/api.h b/src/libsodium/crypto_hashblocks/sha256/ref/api.h index f0108797..4e1701ff 100644 --- a/src/libsodium/crypto_hashblocks/sha256/ref/api.h +++ b/src/libsodium/crypto_hashblocks/sha256/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_hashblocks_H -#define crypto_hashblocks_H #include "crypto_hashblocks_sha256.h" @@ -9,5 +7,3 @@ #define crypto_hashblocks_PRIMITIVE "sha256" #define crypto_hashblocks_IMPLEMENTATION crypto_hashblocks_sha256_IMPLEMENTATION #define crypto_hashblocks_VERSION crypto_hashblocks_sha256_VERSION - -#endif diff --git a/src/libsodium/crypto_hashblocks/sha512/ref/api.h b/src/libsodium/crypto_hashblocks/sha512/ref/api.h index ce389b63..1662652d 100644 --- a/src/libsodium/crypto_hashblocks/sha512/ref/api.h +++ b/src/libsodium/crypto_hashblocks/sha512/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_hashblocks_H -#define crypto_hashblocks_H #include "crypto_hashblocks_sha512.h" @@ -9,5 +7,3 @@ #define crypto_hashblocks_PRIMITIVE "sha512" #define crypto_hashblocks_IMPLEMENTATION crypto_hashblocks_sha512_IMPLEMENTATION #define crypto_hashblocks_VERSION crypto_hashblocks_sha512_VERSION - -#endif diff --git a/src/libsodium/crypto_onetimeauth/poly1305/53/api.h b/src/libsodium/crypto_onetimeauth/poly1305/53/api.h index 55166386..e45d7a63 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/53/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_onetimeauth_H -#define crypto_onetimeauth_H #include "crypto_onetimeauth_poly1305.h" @@ -8,5 +6,3 @@ #define crypto_onetimeauth crypto_onetimeauth_poly1305_53 #define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_53_verify - -#endif diff --git a/src/libsodium/crypto_onetimeauth/poly1305/ref/api.h b/src/libsodium/crypto_onetimeauth/poly1305/ref/api.h index b1c12927..81b73db7 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/ref/api.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_onetimeauth_H -#define crypto_onetimeauth_H #include "crypto_onetimeauth_poly1305.h" @@ -8,5 +6,3 @@ #define crypto_onetimeauth crypto_onetimeauth_poly1305_ref #define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_ref_verify - -#endif diff --git a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h index 4dc4a83a..373c6aa8 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +++ b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_scalarmult_H -#define crypto_scalarmult_H #include "crypto_scalarmult_curve25519.h" @@ -9,4 +7,3 @@ #define crypto_scalarmult crypto_scalarmult_curve25519_donna_c64 #define crypto_scalarmult_base crypto_scalarmult_curve25519_donna_c64_base -#endif diff --git a/src/libsodium/crypto_scalarmult/curve25519/ref/api.h b/src/libsodium/crypto_scalarmult/curve25519/ref/api.h index bff5993f..7c664421 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +++ b/src/libsodium/crypto_scalarmult/curve25519/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_scalarmult_H -#define crypto_scalarmult_H #include "crypto_scalarmult_curve25519.h" @@ -8,5 +6,3 @@ #define crypto_scalarmult crypto_scalarmult_curve25519_ref #define crypto_scalarmult_base crypto_scalarmult_curve25519_ref_base - -#endif diff --git a/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h b/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h index 7409dd04..a4920ddd 100644 --- a/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +++ b/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_secretbox_H -#define crypto_secretbox_H #include "crypto_secretbox_xsalsa20poly1305.h" @@ -12,5 +10,3 @@ #define crypto_secretbox_PRIMITIVE "xsalsa20poly1305" #define crypto_secretbox_IMPLEMENTATION crypto_secretbox_xsalsa20poly1305_IMPLEMENTATION #define crypto_secretbox_VERSION crypto_secretbox_xsalsa20poly1305_VERSION - -#endif diff --git a/src/libsodium/crypto_shorthash/siphash24/ref/api.h b/src/libsodium/crypto_shorthash/siphash24/ref/api.h index 5604c4de..55cc26fe 100644 --- a/src/libsodium/crypto_shorthash/siphash24/ref/api.h +++ b/src/libsodium/crypto_shorthash/siphash24/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_shorthash_H -#define crypto_shorthash_H #include "crypto_shorthash_siphash24.h" @@ -8,5 +6,3 @@ #define crypto_shorthash_PRIMITIVE "siphash24" #define crypto_shorthash_IMPLEMENTATION crypto_shorthash_siphash24_IMPLEMENTATION #define crypto_shorthash_VERSION crypto_shorthash_siphash24_VERSION - -#endif diff --git a/src/libsodium/crypto_sign/ed25519/ref10/api.h b/src/libsodium/crypto_sign/ed25519/ref10/api.h index c5f19e7f..87cd56e9 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/api.h +++ b/src/libsodium/crypto_sign/ed25519/ref10/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_sign_H -#define crypto_sign_H #include "crypto_sign_ed25519.h" @@ -13,5 +11,3 @@ #define crypto_sign_PRIMITIVE "ed25519" #define crypto_sign_IMPLEMENTATION crypto_sign_ed25519_IMPLEMENTATION #define crypto_sign_VERSION crypto_sign_ed25519_VERSION - -#endif diff --git a/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h b/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h index 8472603e..1217a582 100644 --- a/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +++ b/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_sign_H -#define crypto_sign_H #include "crypto_sign_edwards25519sha512batch.h" @@ -13,4 +11,3 @@ #define crypto_sign_IMPLEMENTATION crypto_sign_edwards25519sha512batch_IMPLEMENTATION #define crypto_sign_VERSION crypto_sign_edwards25519sha512batch_VERSION -#endif diff --git a/src/libsodium/crypto_stream/aes128ctr/portable/api.h b/src/libsodium/crypto_stream/aes128ctr/portable/api.h index 01b476a7..bc951d13 100644 --- a/src/libsodium/crypto_stream/aes128ctr/portable/api.h +++ b/src/libsodium/crypto_stream/aes128ctr/portable/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_stream_H -#define crypto_stream_H #include "crypto_stream_aes128ctr.h" @@ -14,5 +12,3 @@ #define crypto_stream_PRIMITIVE "aes128ctr" #define crypto_stream_IMPLEMENTATION crypto_stream_aes128ctr_IMPLEMENTATION #define crypto_stream_VERSION crypto_stream_aes128ctr_VERSION - -#endif diff --git a/src/libsodium/crypto_stream/salsa20/ref/api.h b/src/libsodium/crypto_stream/salsa20/ref/api.h index d1a43e78..8bbb0a2f 100644 --- a/src/libsodium/crypto_stream/salsa20/ref/api.h +++ b/src/libsodium/crypto_stream/salsa20/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_stream_H -#define crypto_stream_H #include "crypto_stream_salsa20.h" @@ -14,5 +12,3 @@ #define crypto_stream_PRIMITIVE "salsa20" #define crypto_stream_IMPLEMENTATION crypto_stream_salsa20_IMPLEMENTATION #define crypto_stream_VERSION crypto_stream_salsa20_VERSION - -#endif diff --git a/src/libsodium/crypto_stream/salsa2012/ref/api.h b/src/libsodium/crypto_stream/salsa2012/ref/api.h index 62c6281c..051bf1c9 100644 --- a/src/libsodium/crypto_stream/salsa2012/ref/api.h +++ b/src/libsodium/crypto_stream/salsa2012/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_stream_H -#define crypto_stream_H #include "crypto_stream_salsa2012.h" @@ -15,4 +13,3 @@ #define crypto_stream_IMPLEMENTATION crypto_stream_salsa2012_IMPLEMENTATION #define crypto_stream_VERSION crypto_stream_salsa2012_VERSION -#endif diff --git a/src/libsodium/crypto_stream/salsa208/ref/api.h b/src/libsodium/crypto_stream/salsa208/ref/api.h index 0e0421ee..9ef0a025 100644 --- a/src/libsodium/crypto_stream/salsa208/ref/api.h +++ b/src/libsodium/crypto_stream/salsa208/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_stream_H -#define crypto_stream_H #include "crypto_stream_salsa208.h" @@ -14,5 +12,3 @@ #define crypto_stream_PRIMITIVE "salsa208" #define crypto_stream_IMPLEMENTATION crypto_stream_salsa208_IMPLEMENTATION #define crypto_stream_VERSION crypto_stream_salsa208_VERSION - -#endif diff --git a/src/libsodium/crypto_stream/xsalsa20/ref/api.h b/src/libsodium/crypto_stream/xsalsa20/ref/api.h index 02d2409c..2f241ef1 100644 --- a/src/libsodium/crypto_stream/xsalsa20/ref/api.h +++ b/src/libsodium/crypto_stream/xsalsa20/ref/api.h @@ -1,5 +1,3 @@ -#ifndef crypto_stream_H -#define crypto_stream_H #include "crypto_stream_xsalsa20.h" @@ -15,4 +13,3 @@ #define crypto_stream_IMPLEMENTATION crypto_stream_xsalsa20_IMPLEMENTATION #define crypto_stream_VERSION crypto_stream_xsalsa20_VERSION -#endif diff --git a/src/libsodium/crypto_verify/16/ref/api.h b/src/libsodium/crypto_verify/16/ref/api.h index b3169c4b..8dcaf872 100644 --- a/src/libsodium/crypto_verify/16/ref/api.h +++ b/src/libsodium/crypto_verify/16/ref/api.h @@ -1,6 +1,2 @@ -#ifndef crypto_verify_16_H -#define crypto_verify_16_H #include "crypto_verify_16.h" - -#endif diff --git a/src/libsodium/crypto_verify/32/ref/api.h b/src/libsodium/crypto_verify/32/ref/api.h index eb173001..e2e3a1c7 100644 --- a/src/libsodium/crypto_verify/32/ref/api.h +++ b/src/libsodium/crypto_verify/32/ref/api.h @@ -1,6 +1,2 @@ -#ifndef crypto_verify_32_H -#define crypto_verify_32_H #include "crypto_verify_32.h" - -#endif