[*] Address a number of NT/x86_32 build regressions

This commit is contained in:
Reece Wilson 2023-10-17 03:08:29 +01:00
parent 6bb5dd39f2
commit c8f3305669
5 changed files with 13 additions and 13 deletions

View File

@ -771,11 +771,11 @@ namespace Aurora
DWORD dwAttributes = 0
);
inline HMODULE (*pLoadLibraryW)(
inline HMODULE(__stdcall *pLoadLibraryW)(
LPCWSTR lpLibFileName
);
inline FARPROC (*pGetProcAddress)(
inline FARPROC(__stdcall*pGetProcAddress)(
HMODULE hModule,
LPCSTR lpProcName
);

View File

@ -846,7 +846,7 @@ namespace Aurora::Compression
do
{
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);
while (pair.first || pair.second)
@ -968,7 +968,7 @@ namespace Aurora::Compression
}
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);
while (pair.first || pair.second)

View File

@ -179,7 +179,7 @@ namespace Aurora::IO::FS
{
DWORD read {};
auto blockSize = AuMin(AuUInt(kFileCopyBlock), uLength);
auto blockSize = AuMin<AuUInt64>(AuUInt(kFileCopyBlock), uLength);
if (this->pHandle_->IsAsync())
{
@ -187,7 +187,7 @@ namespace Aurora::IO::FS
if (!::ReadFile(hHandle,
reinterpret_cast<char *>(parameters.ptr) + uOffset,
blockSize,
AuUInt32(blockSize),
NULL,
&overlapped))
{
@ -282,7 +282,7 @@ namespace Aurora::IO::FS
{
DWORD written {};
auto uBlockSize = AuMin(AuUInt(kFileCopyBlock), uLength);
auto uBlockSize = AuMin<AuUInt64>(AuUInt(kFileCopyBlock), uLength);
if (bIsAsync)
{
@ -290,7 +290,7 @@ namespace Aurora::IO::FS
if (!::WriteFile(hHandle,
reinterpret_cast<const char *>(parameters.ptr) + uOffset,
uBlockSize,
AuUInt32(uBlockSize),
NULL,
&overlapped))
{

View File

@ -28,10 +28,10 @@ namespace Aurora::IO::Net
Reset();
}
static void WsaOverlappedCompletionRoutine(DWORD dwErrorCode,
DWORD cbTransferred,
LPWSAOVERLAPPED lpOverlapped,
DWORD dwFlags
static void __stdcall WsaOverlappedCompletionRoutine(DWORD dwErrorCode,
DWORD cbTransferred,
LPWSAOVERLAPPED lpOverlapped,
DWORD dwFlags
)
{
auto transaction = reinterpret_cast<NtAsyncNetworkTransaction *>(reinterpret_cast<AuUInt8 *>(lpOverlapped) - offsetof(NtAsyncNetworkTransaction, overlap));

View File

@ -689,7 +689,7 @@ namespace Aurora::IO::Protocol
}
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 ||
((pCurrent->outputBuffer.length > target) && (bytesRem < pCurrent->uStartingSize)))