[MPlayer-dev-eng] [PATCH] x11_common: XChangeProperty uses long for 32-bits

Nicolas George nicolas.george at normalesup.org
Mon Aug 15 22:36:40 CEST 2011


L'octidi 28 thermidor, an CCXIX, Alexander Strasser a écrit :
>   I just remembered, what I didn't like about the patch. It only checks
> the width of pid_t and aborts if it is not 32 bits. But I would rather
> like to check the value, because a system might have a 64 bit pid_t type
> but only use 32 bits of it.

The following may work for that:

pid_t pid = getpid();
long prop = pid;
if (prop == pid) {
    XChangeProperty(...);
}

Single Unix at least guarantees that pid_t is a signed integer.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110815/256763ca/attachment.asc>


More information about the MPlayer-dev-eng mailing list