delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/23/01:23:21

Date: Thu, 23 Jan 2003 08:17:25 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: ssize_t: int -> signed long [PATCH]
In-Reply-To: <E18bRab-0000c0-00@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1030123081522.15630C@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019