Commit bb192bb6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Update live Win64 patch to fix uintptr_t vs intptr_t

parent 0ae751d3
...@@ -14,19 +14,19 @@ diff -ruN live/BasicUsageEnvironment/BasicHashTable.cpp live.new/BasicUsageEnvir ...@@ -14,19 +14,19 @@ diff -ruN live/BasicUsageEnvironment/BasicHashTable.cpp live.new/BasicUsageEnvir
unsigned BasicHashTable::hashIndexFromKey(char const* key) const { unsigned BasicHashTable::hashIndexFromKey(char const* key) const {
- unsigned result = 0; - unsigned result = 0;
+ intptr_t result = 0; + uintptr_t result = 0;
if (fKeyType == STRING_HASH_KEYS) { if (fKeyType == STRING_HASH_KEYS) {
while (1) { while (1) {
char c = *key++; char c = *key++;
if (c == 0) break; if (c == 0) break;
- result += (result<<3) + (unsigned)c; - result += (result<<3) + (unsigned)c;
+ result += (result<<3) + (intptr_t)c; + result += (result<<3) + (uintptr_t)c;
} }
result &= fMask; result &= fMask;
} else if (fKeyType == ONE_WORD_HASH_KEYS) { } else if (fKeyType == ONE_WORD_HASH_KEYS) {
- result = randomIndex((unsigned long)key); - result = randomIndex((unsigned long)key);
+ result = randomIndex((intptr_t)key); + result = randomIndex((uintptr_t)key);
} else { } else {
unsigned* k = (unsigned*)key; unsigned* k = (unsigned*)key;
unsigned long sum = 0; unsigned long sum = 0;
...@@ -66,7 +66,7 @@ diff -ruN live/groupsock/Groupsock.cpp live.new/groupsock/Groupsock.cpp ...@@ -66,7 +66,7 @@ diff -ruN live/groupsock/Groupsock.cpp live.new/groupsock/Groupsock.cpp
TunnelEncapsulationTrailer* trailer; TunnelEncapsulationTrailer* trailer;
- Boolean misaligned = ((unsigned long)trailerInPacket & 3) != 0; - Boolean misaligned = ((unsigned long)trailerInPacket & 3) != 0;
+ Boolean misaligned = ((intptr_t)trailerInPacket & 3) != 0; + Boolean misaligned = ((uintptr_t)trailerInPacket & 3) != 0;
unsigned trailerOffset; unsigned trailerOffset;
u_int8_t tunnelCmd; u_int8_t tunnelCmd;
if (isSSM()) { if (isSSM()) {
...@@ -130,17 +130,17 @@ diff -ruN live/liveMedia/RTCP.cpp live.new/liveMedia/RTCP.cpp ...@@ -130,17 +130,17 @@ diff -ruN live/liveMedia/RTCP.cpp live.new/liveMedia/RTCP.cpp
HashTable::Iterator* iter HashTable::Iterator* iter
= HashTable::Iterator::create(*fTable); = HashTable::Iterator::create(*fTable);
- unsigned long timeCount; - unsigned long timeCount;
+ intptr_t timeCount; + uintptr_t timeCount;
char const* key; char const* key;
- while ((timeCount = (unsigned long)(iter->next(key))) != 0) { - while ((timeCount = (unsigned long)(iter->next(key))) != 0) {
+ while ((timeCount = (intptr_t)(iter->next(key))) != 0) { + while ((timeCount = (uintptr_t)(iter->next(key))) != 0) {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "reap: checking SSRC 0x%lx: %ld (threshold %d)\n", (unsigned long)key, timeCount, threshold); fprintf(stderr, "reap: checking SSRC 0x%lx: %ld (threshold %d)\n", (unsigned long)key, timeCount, threshold);
#endif #endif
- if (timeCount < (unsigned long)threshold) { // this SSRC is old - if (timeCount < (unsigned long)threshold) { // this SSRC is old
- unsigned long ssrc = (unsigned long)key; - unsigned long ssrc = (unsigned long)key;
+ if (timeCount < (intptr_t)threshold) { // this SSRC is old + if (timeCount < (uintptr_t)threshold) { // this SSRC is old
+ intptr_t ssrc = (intptr_t)key; + intptr_t ssrc = (uintptr_t)key;
oldSSRC = (unsigned)ssrc; oldSSRC = (unsigned)ssrc;
foundOldMember = True; foundOldMember = True;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment