[so] SIZE_MAX vs SSIZE_MAX

Pascu Corneliu Florin pascucorneliuflorin at gmail.com
Wed Mar 12 00:47:00 EET 2014


Salut,

Din ce vad read are urmatoarea declaratie  *ssize_t* read(int fd , void *
buff, *size_t* len);
Totul este ok , dar ce se intampla cand fac ceva de genul: *read(fd, buff,
SIZE_MAX)*;
SIZE_MAX vad ca este 0xffffffff , iar SSIZE_MAX este 0x7fffffff.  Orice
read cu len>SSIZE_MAX
este undefined , right? Atunci de ce este len size_t definit in POSIX si nu
ssize_t ?

Mersi!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20140312/cd6beec4/attachment.html>


More information about the so mailing list