[*] Address a number of NT/x86_32 build regressions
This commit is contained in:
parent
6bb5dd39f2
commit
c8f3305669
@ -771,11 +771,11 @@ namespace Aurora
|
|||||||
DWORD dwAttributes = 0
|
DWORD dwAttributes = 0
|
||||||
);
|
);
|
||||||
|
|
||||||
inline HMODULE (*pLoadLibraryW)(
|
inline HMODULE(__stdcall *pLoadLibraryW)(
|
||||||
LPCWSTR lpLibFileName
|
LPCWSTR lpLibFileName
|
||||||
);
|
);
|
||||||
|
|
||||||
inline FARPROC (*pGetProcAddress)(
|
inline FARPROC(__stdcall*pGetProcAddress)(
|
||||||
HMODULE hModule,
|
HMODULE hModule,
|
||||||
LPCSTR lpProcName
|
LPCSTR lpProcName
|
||||||
);
|
);
|
||||||
|
@ -846,7 +846,7 @@ namespace Aurora::Compression
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
auto view = buffer.GetNextLinearRead();
|
auto view = buffer.GetNextLinearRead();
|
||||||
view.length = AuMin(view.length, kChunkSize / 2);
|
view.length = AuMin<AuUInt>(view.length, kChunkSize / 2);
|
||||||
auto pair = pCompressor->ReadEx(AuMemory::MemoryViewWrite(buffer), true);
|
auto pair = pCompressor->ReadEx(AuMemory::MemoryViewWrite(buffer), true);
|
||||||
|
|
||||||
while (pair.first || pair.second)
|
while (pair.first || pair.second)
|
||||||
@ -968,7 +968,7 @@ namespace Aurora::Compression
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto view = buffer.GetNextLinearRead();
|
auto view = buffer.GetNextLinearRead();
|
||||||
view.length = AuMin(view.length, kChunkSize / 2);
|
view.length = AuMin<AuUInt>(view.length, kChunkSize / 2);
|
||||||
auto pair = pCompressor->ReadEx(AuMemory::MemoryViewWrite(buffer), false);
|
auto pair = pCompressor->ReadEx(AuMemory::MemoryViewWrite(buffer), false);
|
||||||
|
|
||||||
while (pair.first || pair.second)
|
while (pair.first || pair.second)
|
||||||
|
@ -179,7 +179,7 @@ namespace Aurora::IO::FS
|
|||||||
{
|
{
|
||||||
DWORD read {};
|
DWORD read {};
|
||||||
|
|
||||||
auto blockSize = AuMin(AuUInt(kFileCopyBlock), uLength);
|
auto blockSize = AuMin<AuUInt64>(AuUInt(kFileCopyBlock), uLength);
|
||||||
|
|
||||||
if (this->pHandle_->IsAsync())
|
if (this->pHandle_->IsAsync())
|
||||||
{
|
{
|
||||||
@ -187,7 +187,7 @@ namespace Aurora::IO::FS
|
|||||||
|
|
||||||
if (!::ReadFile(hHandle,
|
if (!::ReadFile(hHandle,
|
||||||
reinterpret_cast<char *>(parameters.ptr) + uOffset,
|
reinterpret_cast<char *>(parameters.ptr) + uOffset,
|
||||||
blockSize,
|
AuUInt32(blockSize),
|
||||||
NULL,
|
NULL,
|
||||||
&overlapped))
|
&overlapped))
|
||||||
{
|
{
|
||||||
@ -282,7 +282,7 @@ namespace Aurora::IO::FS
|
|||||||
{
|
{
|
||||||
DWORD written {};
|
DWORD written {};
|
||||||
|
|
||||||
auto uBlockSize = AuMin(AuUInt(kFileCopyBlock), uLength);
|
auto uBlockSize = AuMin<AuUInt64>(AuUInt(kFileCopyBlock), uLength);
|
||||||
|
|
||||||
if (bIsAsync)
|
if (bIsAsync)
|
||||||
{
|
{
|
||||||
@ -290,7 +290,7 @@ namespace Aurora::IO::FS
|
|||||||
|
|
||||||
if (!::WriteFile(hHandle,
|
if (!::WriteFile(hHandle,
|
||||||
reinterpret_cast<const char *>(parameters.ptr) + uOffset,
|
reinterpret_cast<const char *>(parameters.ptr) + uOffset,
|
||||||
uBlockSize,
|
AuUInt32(uBlockSize),
|
||||||
NULL,
|
NULL,
|
||||||
&overlapped))
|
&overlapped))
|
||||||
{
|
{
|
||||||
|
@ -28,10 +28,10 @@ namespace Aurora::IO::Net
|
|||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WsaOverlappedCompletionRoutine(DWORD dwErrorCode,
|
static void __stdcall WsaOverlappedCompletionRoutine(DWORD dwErrorCode,
|
||||||
DWORD cbTransferred,
|
DWORD cbTransferred,
|
||||||
LPWSAOVERLAPPED lpOverlapped,
|
LPWSAOVERLAPPED lpOverlapped,
|
||||||
DWORD dwFlags
|
DWORD dwFlags
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto transaction = reinterpret_cast<NtAsyncNetworkTransaction *>(reinterpret_cast<AuUInt8 *>(lpOverlapped) - offsetof(NtAsyncNetworkTransaction, overlap));
|
auto transaction = reinterpret_cast<NtAsyncNetworkTransaction *>(reinterpret_cast<AuUInt8 *>(lpOverlapped) - offsetof(NtAsyncNetworkTransaction, overlap));
|
||||||
|
@ -689,7 +689,7 @@ namespace Aurora::IO::Protocol
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto target = AuMin(AuPageRound<AuUInt>(bytesRem + ((bytesRem / 4) * 3), 128), maxVal);
|
auto target = AuMin(AuPageRound<AuUInt>(bytesRem + ((bytesRem / 4) * 3), 128), maxVal);
|
||||||
target = AuMax(target, pCurrent->uStartingSize);
|
target = AuMax<AuUInt>(target, pCurrent->uStartingSize);
|
||||||
|
|
||||||
if (target >= pCurrent->outputBuffer.allocSize ||
|
if (target >= pCurrent->outputBuffer.allocSize ||
|
||||||
((pCurrent->outputBuffer.length > target) && (bytesRem < pCurrent->uStartingSize)))
|
((pCurrent->outputBuffer.length > target) && (bytesRem < pCurrent->uStartingSize)))
|
||||||
|
Loading…
Reference in New Issue
Block a user