Mail Archives: djgpp-workers/2003/01/23/01:23:21
On Wed, 22 Jan 2003, Richard Dawe wrote:
> * The _cnt member of FILE is now a long. In src/libc/ansi/stdio/filbuf.c
> &f->_cnt is passed to __libc_read_termios_hook, which expects a ssize_t
> argument. &f->_cnt being an int * cannot be converted without typecasts
> to ssize_t *. Hence I changed f->_cnt to be a long.
Why not make it ssize_t? That way, we avoid any breakage in the future,
if ssize_t is changed.
> * In write() the return value 'rv' was an int. But it's used to store
> both an int and a ssize_t. Now they are not the same as int,
> two variables are needed - 'i_rv' and 'ss_rv' for int and ssize_t
> respectively.
Again, why not change the return value to ssize_t? Will that break
anything?
- Raw text -