Does in glibc, the sizeof(ssize_t) always equals to sizeof(size_t)

Mark Brown m.steven.brown@gmail.com
Fri May 22 00:52:47 GMT 2026


On 5/21/26 2:59 PM, Paul Eggert wrote:
> On 2026-05-21 10:58, Yonggang Luo wrote:
>> So I have this question, to collect it all POSIX implementation have
>> sizeof(ssize_t)==sizeof(size_t)
>
> The only POSIXish platforms I know of that did this (OSF/1, UNICOS, 
> late old AmigaOS/AROS/MorphOS, old TRON) are long dead.
>
> What's the motivation here? Do you want to prohibit implementations 
> where sizeof (size_t) < sizeof (ssize_t), and if so, why? Also, will 
> you prescribe sizeof (ptrdiff_t) too?

There is a long-ish debate on the merits going on here 
(https://www.mail-archive.com/austin-group-l@opengroup.org/msg14324.html) .

-- 
Mark Brown
mstevenbrown@gmail.com



More information about the Libc-alpha mailing list