mirror of
https://github.com/libAthena/athena.git
synced 2025-12-09 13:38:03 +00:00
Windows build fixes
This commit is contained in:
11
src/aes.cpp
11
src/aes.cpp
@@ -7,6 +7,10 @@
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
#if __AES__ || (!defined(__clang__) && _MSC_VER >= 1800)
|
||||
#define _AES_NI 1
|
||||
#endif
|
||||
|
||||
namespace athena
|
||||
{
|
||||
|
||||
@@ -467,7 +471,7 @@ void SoftwareAES::encrypt(const uint8_t* iv, const uint8_t* inbuf, uint8_t* outb
|
||||
}
|
||||
}
|
||||
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
|
||||
#include <wmmintrin.h>
|
||||
|
||||
@@ -582,12 +586,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
|
||||
#endif
|
||||
|
||||
static int HAS_AES_NI = -1;
|
||||
std::unique_ptr<IAES> NewAES()
|
||||
{
|
||||
#if __AES__ || _MSC_VER >= 1800
|
||||
#if _AES_NI
|
||||
if (HAS_AES_NI == -1)
|
||||
{
|
||||
#if _MSC_VER
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace athena::io
|
||||
{
|
||||
FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr)
|
||||
: m_fileHandle(0),
|
||||
m_bytePosition(0),
|
||||
m_globalErr(globalErr)
|
||||
{
|
||||
m_filename = utility::utf8ToWide(filename);
|
||||
@@ -14,7 +13,6 @@ FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr
|
||||
|
||||
FileWriter::FileWriter(std::wstring_view filename, bool overwrite, bool globalErr)
|
||||
: m_fileHandle(0),
|
||||
m_bytePosition(0),
|
||||
m_globalErr(globalErr)
|
||||
{
|
||||
m_filename = filename;
|
||||
|
||||
Reference in New Issue
Block a user