diff options
Diffstat (limited to 'ACE/ace/Message_Queue_Vx.inl')
-rw-r--r-- | ACE/ace/Message_Queue_Vx.inl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ACE/ace/Message_Queue_Vx.inl b/ACE/ace/Message_Queue_Vx.inl index 741b4b8fdda..0712eb99fa4 100644 --- a/ACE/ace/Message_Queue_Vx.inl +++ b/ACE/ace/Message_Queue_Vx.inl @@ -11,7 +11,17 @@ ACE_INLINE MSG_Q_ID ACE_Message_Queue_Vx::msgq (void) { // Hijack the tail_ field to store the MSG_Q_ID. - return static_cast<MSG_Q_ID> (reinterpret_cast<long> (tail_)); + return static_cast<MSG_Q_ID> ( +#if defined __LP64__ && defined __RTP__ + // In RTP-mode only MSG_Q_ID is an int; in a 64-bit build the size of MSG_Q_ID + // doesn't match the size of a pointer, tail_, so first treat it as 64-bit. + reinterpret_cast<long> (tail_) +#elif defined __RTP__ + reinterpret_cast<int> (tail_) +#else + tail_ +#endif + ); } #endif /* ACE_VXWORKS */ |