From 0814537aea4864e5a1b35d1548d417e266694a5e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Oct 2015 18:13:34 +0200 Subject: [PATCH] Replace __sun and __GNU_C by __SUNPRO_C to simplify logic regarding @jedisct1 comments --- .../crypto_generichash/blake2/ref/blake2.h | 20 ++++++------------- .../sodium/crypto_generichash_blake2b.h | 20 ++++++------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2.h b/src/libsodium/crypto_generichash/blake2/ref/blake2.h index be42f335..d11fa27a 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2.h +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2.h @@ -57,14 +57,10 @@ extern "C" { BLAKE2B_PERSONALBYTES = 16 }; -#ifndef __sun -#pragma pack(push, 1) +#ifdef __SUNPRO_C +# pragma pack(1) #else -# ifndef __GNU_C__ -#pragma pack(1) -# else -#pragma pack(push, 1) -# endif +# pragma pack(push, 1) #endif typedef struct blake2s_param_ @@ -137,14 +133,10 @@ typedef crypto_generichash_blake2b_state blake2b_state; size_t buflen; } blake2bp_state; -#ifndef __sun -#pragma pack(pop) +#ifdef __SUNPRO_C +# pragma pack() #else -# ifndef __GNU_C__ -# pragma pack() -# else -# pragma pack(pop) -# endif +# pragma pack(pop) #endif // Streaming API diff --git a/src/libsodium/include/sodium/crypto_generichash_blake2b.h b/src/libsodium/include/sodium/crypto_generichash_blake2b.h index 75c14cb0..3a6a8efc 100644 --- a/src/libsodium/include/sodium/crypto_generichash_blake2b.h +++ b/src/libsodium/include/sodium/crypto_generichash_blake2b.h @@ -14,14 +14,10 @@ extern "C" { #endif -#ifndef __sun -#pragma pack(push, 1) +#ifdef __SUNPRO_C +# pragma pack(1) #else -# ifndef __GNU_C__ -#pragma pack(1) -# else -#pragma pack(push, 1) -# endif +# pragma pack(push, 1) #endif typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state { @@ -33,14 +29,10 @@ typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state { uint8_t last_node; } crypto_generichash_blake2b_state; -#ifndef __sun -#pragma pack(pop) +#ifdef __SUNPRO_C +# pragma pack() #else -# ifndef __GNU_C__ -#pragma pack() -# else -#pragma pack(pop) -# endif +# pragma pack(pop) #endif #define crypto_generichash_blake2b_BYTES_MIN 16U