commit 04b2ee4654e77c9ceeae892b6622aa33e6528c28
parent 8d5b29aedc22794698168850c8b53ec9b79602c5
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 19 Jun 2015 09:14:45 +0200
Rename the `_t' suffix of the <aes|threefry> internal typedefs in `_T'
The `_t' suffix is reserved by the POSIX standard
Diffstat:
| M | src/ssp_rng.c | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/ssp_rng.c b/src/ssp_rng.c
@@ -393,14 +393,14 @@ const struct ssp_rng_type ssp_rng_random_device = {
/*******************************************************************************
* Random123 Counter Based RNG
******************************************************************************/
-typedef r123::Engine<r123::Threefry4x64> threefry_t;
+typedef r123::Engine<r123::Threefry4x64> threefry_T;
#ifdef WITH_R123_AES
-typedef r123::Engine<r123::AESNI4x32> aes_t;
+typedef r123::Engine<r123::AESNI4x32> aes_T;
template<>
res_T
-rng_cxx_init<aes_t>(struct mem_allocator* allocator, void* data)
+rng_cxx_init<aes_T>(struct mem_allocator* allocator, void* data)
{
(void) allocator;
if (!haveAESNI()) {
@@ -408,44 +408,44 @@ rng_cxx_init<aes_t>(struct mem_allocator* allocator, void* data)
return RES_BAD_OP;
}
ASSERT(data);
- new (data) aes_t;
+ new (data) aes_T;
return RES_OK;
}
#endif
/* threefry generator */
const struct ssp_rng_type ssp_rng_threefry = {
- rng_cxx_init<threefry_t>,
- rng_cxx_release<threefry_t>,
- rng_cxx_set<threefry_t>,
- rng_cxx_get<threefry_t>,
- rng_cxx_uniform_uint64<threefry_t>,
- rng_cxx_uniform_double<threefry_t>,
- rng_cxx_canonical<threefry_t>,
- rng_cxx_read<threefry_t>,
- rng_cxx_write<threefry_t>,
- rng_cxx_entropy<threefry_t>,
- std::numeric_limits<threefry_t::result_type>::min(),
- std::numeric_limits<threefry_t::result_type>::max(),
- sizeof(threefry_t)
+ rng_cxx_init<threefry_T>,
+ rng_cxx_release<threefry_T>,
+ rng_cxx_set<threefry_T>,
+ rng_cxx_get<threefry_T>,
+ rng_cxx_uniform_uint64<threefry_T>,
+ rng_cxx_uniform_double<threefry_T>,
+ rng_cxx_canonical<threefry_T>,
+ rng_cxx_read<threefry_T>,
+ rng_cxx_write<threefry_T>,
+ rng_cxx_entropy<threefry_T>,
+ std::numeric_limits<threefry_T::result_type>::min(),
+ std::numeric_limits<threefry_T::result_type>::max(),
+ sizeof(threefry_T)
};
#ifdef WITH_R123_AES
/* aes generator */
const struct ssp_rng_type ssp_rng_aes = {
- rng_cxx_init<aes_t>,
- rng_cxx_release<aes_t>,
- rng_cxx_set<aes_t>,
- rng_cxx_get<aes_t>,
- rng_cxx_uniform_uint64<aes_t>,
- rng_cxx_uniform_double<aes_t>,
- rng_cxx_canonical<aes_t>,
- rng_cxx_read<aes_t>,
- rng_cxx_write<aes_t>,
- rng_cxx_entropy<aes_t>,
- std::numeric_limits<aes_t::result_type>::min(),
- std::numeric_limits<aes_t::result_type>::max(),
- sizeof(aes_t)
+ rng_cxx_init<aes_T>,
+ rng_cxx_release<aes_T>,
+ rng_cxx_set<aes_T>,
+ rng_cxx_get<aes_T>,
+ rng_cxx_uniform_uint64<aes_T>,
+ rng_cxx_uniform_double<aes_T>,
+ rng_cxx_canonical<aes_T>,
+ rng_cxx_read<aes_T>,
+ rng_cxx_write<aes_T>,
+ rng_cxx_entropy<aes_T>,
+ std::numeric_limits<aes_T::result_type>::min(),
+ std::numeric_limits<aes_T::result_type>::max(),
+ sizeof(aes_T)
};
#endif