[UDFS] Fix 64 bit issues

This commit is contained in:
Timo Kreuzer 2018-08-20 19:02:00 +02:00
parent be97da34ac
commit c334c17d69
23 changed files with 257 additions and 246 deletions

View file

@ -324,12 +324,12 @@ EO_gpl:
#if defined (_X86_) && defined (_MSC_VER)
__declspec (naked)
uint32
SIZE_T
__stdcall
UDFGetBitmapLen(
uint32* Bitmap,
uint32 Offs,
uint32 Lim // NOT included
SIZE_T Offs,
SIZE_T Lim // NOT included
)
{
_asm {
@ -491,12 +491,12 @@ exit_count:
#else // NO X86 optimization , use generic C/C++
uint32
SIZE_T
__stdcall
UDFGetBitmapLen(
uint32* Bitmap,
uint32 Offs,
uint32 Lim // NOT included
SIZE_T Offs,
SIZE_T Lim // NOT included
)
{
ASSERT(Offs <= Lim);
@ -505,8 +505,8 @@ UDFGetBitmapLen(
}
BOOLEAN bit = UDFGetBit(Bitmap, Offs);
uint32 i=Offs>>5;
uint32 len=0;
SIZE_T i=Offs>>5;
SIZE_T len=0;
uint8 j=(uint8)(Offs&31);
uint8 lLim=(uint8)(Lim&31);
@ -552,7 +552,7 @@ While_3:
This routine scans disc free space Bitmap for minimal suitable extent.
It returns maximal available extent if no long enough extents found.
*/
uint32
SIZE_T
UDFFindMinSuitableExtent(
IN PVCB Vcb,
IN uint32 Length, // in blocks
@ -562,14 +562,14 @@ UDFFindMinSuitableExtent(
IN uint8 AllocFlags
)
{
uint32 i, len;
SIZE_T i, len;
uint32* cur;
uint32 best_lba=0;
uint32 best_len=0;
uint32 max_lba=0;
uint32 max_len=0;
SIZE_T best_lba=0;
SIZE_T best_len=0;
SIZE_T max_lba=0;
SIZE_T max_len=0;
BOOLEAN align = FALSE;
uint32 PS = Vcb->WriteBlockSize >> Vcb->BlockSizeBits;
SIZE_T PS = Vcb->WriteBlockSize >> Vcb->BlockSizeBits;
UDF_CHECK_BITMAP_RESOURCE(Vcb);