DEV-40396 Error building pluginapi code on Linux 64bit standalone gcc 4.3.3.

rewritten the plugin address-splitting to make compilers grumble less and probably more readable.
code by merov, reviewed by moss.
master
Adam Moss 2009-09-28 19:43:16 +00:00
parent 423cba155a
commit efd7e582bd
1 changed files with 2 additions and 2 deletions

View File

@ -319,8 +319,8 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
message.setValueS32("size", (S32)size);
// shm address is split into 2x32bit values because LLSD doesn't serialize 64bit values and we need to support 64-bit addressing.
void * address = region->getMappedAddress();
U32 address_lo = (U32)address;
U32 address_hi = (U32)(U64(address) / (U64(1)<<31));
U32 address_lo = (U32)(U64(address) & 0xFFFFFFFF); // Extract the lower 32 bits
U32 address_hi = (U32)((U64(address)>>32) & 0xFFFFFFFF); // Extract the higher 32 bits
message.setValueU32("address", address_lo);
message.setValueU32("address_1", address_hi);
sendMessageToPlugin(message);