mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-28 12:47:13 +09:00
More Visual C++ compat
This commit is contained in:
@@ -44,9 +44,9 @@ typedef struct Salsa20Random_ {
|
||||
} Salsa20Random;
|
||||
|
||||
static Salsa20Random stream = {
|
||||
.random_data_source_fd = -1,
|
||||
.rnd32_outleft = (size_t) 0U,
|
||||
.initialized = 0
|
||||
_SODIUM_C99(.random_data_source_fd =) -1,
|
||||
_SODIUM_C99(.rnd32_outleft =) (size_t) 0U,
|
||||
_SODIUM_C99(.initialized =) 0
|
||||
};
|
||||
|
||||
static uint64_t
|
||||
@@ -300,10 +300,10 @@ randombytes_salsa20_implementation_name(void)
|
||||
}
|
||||
|
||||
struct randombytes_implementation randombytes_salsa20_implementation = {
|
||||
.implementation_name = randombytes_salsa20_implementation_name,
|
||||
.random = randombytes_salsa20_random,
|
||||
.stir = randombytes_salsa20_random_stir,
|
||||
.uniform = randombytes_salsa20_random_uniform,
|
||||
.buf = randombytes_salsa20_random_buf,
|
||||
.close = randombytes_salsa20_random_close
|
||||
_SODIUM_C99(.implementation_name =) randombytes_salsa20_implementation_name,
|
||||
_SODIUM_C99(.random =) randombytes_salsa20_random,
|
||||
_SODIUM_C99(.stir =) randombytes_salsa20_random_stir,
|
||||
_SODIUM_C99(.uniform =) randombytes_salsa20_random_uniform,
|
||||
_SODIUM_C99(.buf =) randombytes_salsa20_random_buf,
|
||||
_SODIUM_C99(.close =) randombytes_salsa20_random_close
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "randombytes.h"
|
||||
#include "randombytes_sysrandom.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <Windows.h>
|
||||
@@ -32,8 +33,8 @@ typedef struct SysRandom_ {
|
||||
} SysRandom;
|
||||
|
||||
static SysRandom stream = {
|
||||
.random_data_source_fd = -1,
|
||||
.initialized = 0
|
||||
_SODIUM_C99(.random_data_source_fd =) -1,
|
||||
_SODIUM_C99(.initialized =) 0
|
||||
};
|
||||
|
||||
#ifndef _WIN32
|
||||
@@ -202,10 +203,10 @@ randombytes_sysrandom_implementation_name(void)
|
||||
}
|
||||
|
||||
struct randombytes_implementation randombytes_sysrandom_implementation = {
|
||||
.implementation_name = randombytes_sysrandom_implementation_name,
|
||||
.random = randombytes_sysrandom,
|
||||
.stir = randombytes_sysrandom_stir,
|
||||
.uniform = randombytes_sysrandom_uniform,
|
||||
.buf = randombytes_sysrandom_buf,
|
||||
.close = randombytes_sysrandom_close
|
||||
_SODIUM_C99(.implementation_name =) randombytes_sysrandom_implementation_name,
|
||||
_SODIUM_C99(.random =) randombytes_sysrandom,
|
||||
_SODIUM_C99(.stir =) randombytes_sysrandom_stir,
|
||||
_SODIUM_C99(.uniform =) randombytes_sysrandom_uniform,
|
||||
_SODIUM_C99(.buf =) randombytes_sysrandom_buf,
|
||||
_SODIUM_C99(.close =) randombytes_sysrandom_close
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user