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

Wayne Davison wayned at users.sourceforge.net
Sun Sep 30 06:06:35 EST 2001


On Fri, 28 Sep 2001, Paul Eggert wrote:
> openssh-2.9.9p2 assumes that pid_t, uid_t, gid_t, and mode_t are no
> wider than int.

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.  For instance, check out this page from the SUS2 spec
(a superset of POSIX) that is available online (unlike POSIX):

    http://www.opengroup.org/onlinepubs/007908799/xsh/systypes.h.html

The key spot on that page is this:

    blksize_t, pid_t and ssize_t are signed integral types

This is consistent with what I've heard from people who have the POSIX
spec as a reference.

So, I still believe that this patch needs to be applied.  If the
portable branch wants to keep things close to the BSD version, then we
should get the BSD version to apply this patch -- it may not be needed
for BSD, but it won't hurt the BSD version to cast an int to a long
and use %ld.

..wayne..




More information about the openssh-unix-dev mailing list