Merge pull request #309 from dtorelliitrsgroup/master

Libsodium does not compile for Solaris CC compiler #308
This commit is contained in:
Frank Denis
2015-10-22 18:31:03 +02:00
3 changed files with 31 additions and 8 deletions
@@ -57,7 +57,12 @@ extern "C" {
BLAKE2B_PERSONALBYTES = 16
};
#pragma pack(push, 1)
#ifdef __SUNPRO_C
# pragma pack(1)
#else
# pragma pack(push, 1)
#endif
typedef struct blake2s_param_
{
uint8_t digest_length; // 1
@@ -127,7 +132,12 @@ typedef crypto_generichash_blake2b_state blake2b_state;
uint8_t buf[4 * BLAKE2B_BLOCKBYTES];
size_t buflen;
} blake2bp_state;
#pragma pack(pop)
#ifdef __SUNPRO_C
# pragma pack()
#else
# pragma pack(pop)
#endif
// Streaming API
int blake2s_init( blake2s_state *S, const uint8_t outlen );
@@ -174,4 +184,3 @@ typedef crypto_generichash_blake2b_state blake2b_state;
#endif
#endif
@@ -14,7 +14,12 @@
extern "C" {
#endif
#pragma pack(push, 1)
#ifdef __SUNPRO_C
# pragma pack(1)
#else
# pragma pack(push, 1)
#endif
typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state {
uint64_t h[8];
uint64_t t[2];
@@ -23,7 +28,12 @@ typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state {
size_t buflen;
uint8_t last_node;
} crypto_generichash_blake2b_state;
#pragma pack(pop)
#ifdef __SUNPRO_C
# pragma pack()
#else
# pragma pack(pop)
#endif
#define crypto_generichash_blake2b_BYTES_MIN 16U
SODIUM_EXPORT
@@ -98,4 +108,4 @@ int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state,
}
#endif
#endif
#endif
+6 -2
View File
@@ -20,7 +20,11 @@
# endif
# else
# if defined(__SUNPRO_C)
# define SODIUM_EXPORT __attribute__ __global
# ifndef __GNU_C__
# define SODIUM_EXPORT __attribute__(visibility(__global))
# else
# define SODIUM_EXPORT __attribute__ __global
# endif
# elif defined(_MSG_VER)
# define SODIUM_EXPORT extern __declspec(dllexport)
# else
@@ -37,4 +41,4 @@
# endif
#endif
#endif
#endif