tooltalk: Fix bad assumptions about sizeof(uid_t)
authorFrederic Koehler <f.koehler427@gmail.com>
Sun, 12 Aug 2012 06:12:28 +0000 (02:12 -0400)
committerJon Trulson <jon@radscan.com>
Sun, 12 Aug 2012 19:50:34 +0000 (13:50 -0600)
commitb33cf9fb60f4c93359075a2abcc2a707345ec2a5
treef0ddc2e9e4ac5da0f98c179c1eb11756b209f10d
parent19c7c80aa32addb0478a521370193adc8204d716
tooltalk: Fix bad assumptions about sizeof(uid_t)

In part of the tooltalk rpc code (mp_message.c), it was assumed that on
the majority of platforms, sizeof(uid_t)=sizeof(gid_t)=sizeof(long).  On
Linux-x64, uid_t is an unsigned int, which makes the code fail: all
tooltalk messages fail to send with an RPC_CANTENCODEARGS at the
rpc-level, and TT_INTERNAL_ERR for the actual program.  We instead
change the code to explicitly examine sizeof(uid_t) to see whether it is
int or long sized. This allows tooltalk-dependent functinoality
like logout and multiple calls to dtfile to work.
cde/lib/tt/lib/mp/mp_message.C