Skip to content
Snippets Groups Projects
Commit efd7e582 authored by Adam Moss's avatar Adam Moss
Browse files

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.
parent 423cba15
No related branches found
No related tags found
No related merge requests found
...@@ -319,8 +319,8 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message) ...@@ -319,8 +319,8 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
message.setValueS32("size", (S32)size); 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. // 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(); void * address = region->getMappedAddress();
U32 address_lo = (U32)address; U32 address_lo = (U32)(U64(address) & 0xFFFFFFFF); // Extract the lower 32 bits
U32 address_hi = (U32)(U64(address) / (U64(1)<<31)); U32 address_hi = (U32)((U64(address)>>32) & 0xFFFFFFFF); // Extract the higher 32 bits
message.setValueU32("address", address_lo); message.setValueU32("address", address_lo);
message.setValueU32("address_1", address_hi); message.setValueU32("address_1", address_hi);
sendMessageToPlugin(message); sendMessageToPlugin(message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment