Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3E304571.BFA087FF@phekda.freeserve.co.uk> Date: Thu, 23 Jan 2003 19:41:37 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: ssize_t: int -> signed long [PATCH] References: <3E2FB5F0 DOT B7FD75FC AT phekda DOT freeserve DOT co DOT uk> <1659-Thu23Jan2003203612+0200-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > > Date: Thu, 23 Jan 2003 09:29:20 +0000 > > From: Richard Dawe > > > > > > Why not make it ssize_t? That way, we avoid any breakage in the future, > > > if ssize_t is changed. > > > > I thought about that and it should work. But then we pollute > > with ssize_t. Is that good, bad or ugly? > > No, we don't pollute stdio.h because it already includes sys/djtypes.h > which defines ssize_t. I don't think does actually pollute. It #defines something which typedefs ssize_t. So unless we use this define in , there is no pollution. From after the patch: #define __DJ_ssize_t typedef long signed int ssize_t; So if doesn't use __DJ_ssize_t, then ssize_t will not pollute . > > > Again, why not change the return value to ssize_t? Will that break > > > anything? > > > > The return type is already ssize_t. The problem is that there are two > > possible return values: one from FSEXT, one from normal operation. The > > normal operation path can work with ssize_t. The FSEXT call returns an > > int: > > > > int function(__FSEXT_Fnumber func_number, int *rv, va_list args); > > Perhaps we should change FSEXT to return an ssize_t. If we're going to change it, I would prefer a long long, since then it will cope with return values from anything (llseek, etc.). But that's not binarily compatible, so what you suggest is better. Unless we're not worried about binary compatibility with FSEXTs? Thanks, bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]