1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

Don't use C99isms on Visual C++.

This commit is contained in:
Frank Denis 2013-04-26 21:41:32 -07:00
parent 47bb35cb8b
commit ad44ec5b15
3 changed files with 14 additions and 6 deletions

View File

@ -10,6 +10,7 @@ Public domain.
#include "api.h"
#include "crypto_onetimeauth_poly1305_53.h"
#include "utils.h"
#pragma STDC FENV_ACCESS ON
@ -1641,7 +1642,7 @@ crypto_onetimeauth_poly1305_implementation_name(void)
struct crypto_onetimeauth_poly1305_implementation
crypto_onetimeauth_poly1305_53_implementation = {
.implementation_name = crypto_onetimeauth_poly1305_implementation_name,
.onetimeauth = crypto_onetimeauth,
.onetimeauth_verify = crypto_onetimeauth_verify
_SODIUM_C99(.implementation_name =) crypto_onetimeauth_poly1305_implementation_name,
_SODIUM_C99(.onetimeauth =) crypto_onetimeauth,
_SODIUM_C99(.onetimeauth_verify =) crypto_onetimeauth_verify
};

View File

@ -6,6 +6,7 @@ Public domain.
#include "api.h"
#include "crypto_onetimeauth_poly1305_ref.h"
#include "utils.h"
static void add(unsigned int h[17],const unsigned int c[17])
{
@ -112,7 +113,7 @@ crypto_onetimeauth_poly1305_implementation_name(void)
struct crypto_onetimeauth_poly1305_implementation
crypto_onetimeauth_poly1305_ref_implementation = {
.implementation_name = crypto_onetimeauth_poly1305_implementation_name,
.onetimeauth = crypto_onetimeauth,
.onetimeauth_verify = crypto_onetimeauth_verify
_SODIUM_C99(.implementation_name =) crypto_onetimeauth_poly1305_implementation_name,
_SODIUM_C99(.onetimeauth =) crypto_onetimeauth,
_SODIUM_C99(.onetimeauth_verify =) crypto_onetimeauth_verify
};

View File

@ -10,6 +10,12 @@
extern "C" {
#endif
#ifndef __cplusplus
# define _SODIUM_C99(X) (X)
#else
# define _SODIUM_C99(X)
#endif
unsigned char *_sodium_alignedcalloc(unsigned char ** const unaligned_p,
const size_t len);