Fix compile under MSVC
parent
672f5c7f3d
commit
7e96a283a3
|
|
@ -154,7 +154,7 @@ LDLIBS =
|
||||||
# Debug build.
|
# Debug build.
|
||||||
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
|
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
|
||||||
# Release build. Add /OPT:REF to linker
|
# Release build. Add /OPT:REF to linker
|
||||||
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
|
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /openmp
|
||||||
# Linker flags.
|
# Linker flags.
|
||||||
LDFLAGS = $(LDFLAGS) /OPT:REF
|
LDFLAGS = $(LDFLAGS) /OPT:REF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
#include "sha.h"
|
#include "sha.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
# include <omp.h>
|
# include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -189,7 +191,7 @@ void Scrypt::ValidateParameters(size_t derivedLen, word64 cost, word64 blockSize
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << " parallelization " << parallelization << " is larger than ";
|
oss << " parallelization " << parallelization << " is larger than ";
|
||||||
oss << numeric_limits<int>::max();
|
oss << std::numeric_limits<int>::max();
|
||||||
throw InvalidArgument("Scrypt: " + oss.str());
|
throw InvalidArgument("Scrypt: " + oss.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue