Ticket #51470: patch-too-long-long.diff

File patch-too-long-long.diff, 1.2 KB (added by ballapete (Peter "Pete" Dyballa), 8 years ago)

Patch for too long longs on Tiger

  • IlmImf/ImfFastHuf.cpp

    old new  
    107107    for (int i = 0; i <= MAX_CODE_LEN; ++i)
    108108    {
    109109        codeCount[i] = 0;
    110         base[i]      = 0xffffffffffffffffL;
     110        base[i]      = 0xffffffffffffffffULL;
    111111        offset[i]    = 0;
    112112    }
    113113
     
    352352
    353353    for (int i = 0; i <= MAX_CODE_LEN; ++i)
    354354    {
    355         if (base[i] != 0xffffffffffffffffL)
     355        if (base[i] != 0xffffffffffffffffULL)
    356356        {
    357357            _ljBase[i] = base[i] << (64 - i);
    358358        }
     
    362362            // Unused code length - insert dummy values
    363363            //
    364364
    365             _ljBase[i] = 0xffffffffffffffffL;
     365            _ljBase[i] = 0xffffffffffffffffULL;
    366366        }
    367367    }
    368368
     
    417417
    418418    int minIdx = TABLE_LOOKUP_BITS;
    419419
    420     while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL)
     420    while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffULL)
    421421        minIdx--;
    422422
    423423    if (minIdx < 0)
     
    427427        // Set the min value such that the table is never tested.
    428428        //
    429429
    430         _tableMin = 0xffffffffffffffffL;
     430        _tableMin = 0xffffffffffffffffULL;
    431431    }
    432432    else
    433433    {