msgctl() manual page states that TMyMsgBuf.mtype is longint

The manual page of msgctl() states

Type
  PMyMsgBuf = ^TMyMsgBuf;
  TMyMsgBuf = record
    mtype : Longint;
    mtext : string[255];
  end;

which is incorrect:

struct mymsg {
    long   mtype;       /* Message type. */
    char   mtext[1];    /* Message text. */
}

It should be clong which is 32-bit on 32-bit systems and 64-bit on 64-bit ones.