fix compile with Sun CC
parent
64157fa5e0
commit
d2f4175c59
|
|
@ -234,7 +234,7 @@ void BenchMarkByName(const char *factoryName, size_t keyLength = 0, const char *
|
|||
}
|
||||
|
||||
template <class T>
|
||||
void BenchMarkByNameKeyLess(const char *factoryName, char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs, T *x=NULL)
|
||||
void BenchMarkByNameKeyLess(const char *factoryName, const char *displayName=NULL, const NameValuePairs ¶ms = g_nullNameValuePairs, T *x=NULL)
|
||||
{
|
||||
std::string name = factoryName;
|
||||
if (displayName)
|
||||
|
|
@ -252,7 +252,7 @@ void BenchmarkAll(double t, double hertz)
|
|||
g_allocatedTime = t;
|
||||
g_hertz = hertz;
|
||||
|
||||
char *cpb, *cpk;
|
||||
const char *cpb, *cpk;
|
||||
if (g_hertz)
|
||||
{
|
||||
cpb = "<TH>Cycles Per Byte";
|
||||
|
|
|
|||
2
config.h
2
config.h
|
|
@ -354,7 +354,7 @@ NAMESPACE_END
|
|||
#define CRYPTOPP_WIN32_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__)
|
||||
#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
|
||||
#define CRYPTOPP_UNIX_AVAILABLE
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -86,12 +86,8 @@ TimerWord Timer::TicksPerSecond()
|
|||
return freq.QuadPart;
|
||||
#elif defined(CRYPTOPP_UNIX_AVAILABLE)
|
||||
return 1000000;
|
||||
#elif defined(CLOCKS_PER_SEC)
|
||||
return CLOCKS_PER_SEC;
|
||||
#elif defined(CLK_TCK)
|
||||
return CLK_TCK;
|
||||
#else
|
||||
return 1000000;
|
||||
return CLOCKS_PER_SEC;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#define CRYPTOPP_HRTIMER_H
|
||||
|
||||
#include "config.h"
|
||||
#ifndef HIGHRES_TIMER_AVAILABLE
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
|
|
@ -12,7 +15,6 @@ NAMESPACE_BEGIN(CryptoPP)
|
|||
typedef word32 TimerWord;
|
||||
#endif
|
||||
#else
|
||||
#include <time.h>
|
||||
typedef clock_t TimerWord;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue