openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'

Paul Eggert eggert at
Mon Oct 1 00:59:14 EST 2001

> Date: Sat, 29 Sep 2001 13:06:35 -0700 (PDT)
> From: Wayne Davison <wayned at>
> I submitted a patch for this back on April 4th and it has yet to be
> applied.  At the time I heard an objection that these types are
> required to be "int" by POSIX, but from everything I can see, that is
> not the case.

You are correct.  The current version of POSIX merely requires that
they are no wider than "long".

And the next version of POSIX will even allow them to be wider than
"long": they can be as wide as "intmax_t", which (in theory, anyway)
can be even wider than "long long".  I can cite chapter and verse
from the latest draft, if you like.

I don't think OpenSSH needs to worry about them being wider than
"long", though.  The only system types that I have found wider than
"long" in practice are the file-size-related types (notably off_t).
And I realize that it's a pain to print integers wider than "long" in
code that is portable to older hosts.

More information about the openssh-unix-dev mailing list