Greetings,
The current architecture-specific type definitions
(arch/*/bits/alltypes.h) seem to entail the following inconsistent
signed/unsigned types:
type x86_64 i386
-------------------------------
uid_t unsigned signed
gid_t unsigned signed
dev_t unsigned signed
clock_t signed unsigned
For uid_t and gid_t, the GNU documentation specifies
_unsigned int_:
http://www.gnu.org/software/libc/manual/html_node/Reading-Persona.html#index-uid_005ft-3309
For dev_t, the specification requires _an integer type
no narrower than int_: and given the value it is
expected to hold (file device numbers), making it _unsigned_
seems to be the correct choice.
http://www.gnu.org/software/libc/manual/html_node/Attribute-Meanings.html#index-dev_005ft-1500
clock_t is defined as the value returned by clock(), and the
manual page states that "if the processor time used is not
available or its value cannot be represented, the function returns
the value (clock_t) -1." This in turn suggests that clock_t should
be a _signed_ type.
http://www.gnu.org/software/libc/manual/html_node/CPU-Time.html#index-clock_005ft-2607
As an additional reference, attached is the output generated by
musl-alltypes (posted on April 18) for the above architectures.
Best regards,
Zvi