Use <time.h> for Borland/Embarcadero (GH #512)

pull/484/merge
Jeffrey Walton 2017-09-20 18:10:07 -04:00
parent c5a427d690
commit 35c0fa82fd
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@
#include "mdc.h" #include "mdc.h"
#include "modes.h" #include "modes.h"
#include <ctime> #include <time.h>
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)

View File

@ -788,7 +788,7 @@ static inline uint8x16_p8 Reverse8x16(const uint8x16_p8& src)
return vec_perm(src, zero, mask); return vec_perm(src, zero, mask);
} }
static inline uint32x4_p8 Reverse8x16(const uint32x4_p8& src) static inline uint32x4_p8 Reverse32x4(const uint32x4_p8& src)
{ {
const uint8x16_p8 mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0}; const uint8x16_p8 mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0};
const uint8x16_p8 zero = {0}; const uint8x16_p8 zero = {0};
@ -834,7 +834,7 @@ static inline uint32x4_p8 Load32x4(const uint32_t src[4])
return vec_xl_be(0, (uint32_t*)src); return vec_xl_be(0, (uint32_t*)src);
#else #else
# if defined(IS_LITTLE_ENDIAN) # if defined(IS_LITTLE_ENDIAN)
return Reverse8x16(vec_vsx_ld(0, src)); return Reverse32x4(vec_vsx_ld(0, src));
# else # else
return vec_vsx_ld(0, src); return vec_vsx_ld(0, src);
# endif # endif

View File

@ -5,8 +5,8 @@
#include "rng.h" #include "rng.h"
#include "fips140.h" #include "fips140.h"
#include <ctime> #include <time.h>
#include <cmath> #include <math.h>
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)