ssize_t [patch]

Zack Weinberg zack@wolery.cumb.org
Tue Apr 25 16:50:00 GMT 2000


On Tue, Apr 25, 2000 at 05:35:47PM -0400, Kaveh R. Ghazi wrote:
>  > From: Zack Weinberg <zack@wolery.cumb.org>
>  > Here is a patch which provides (a) a default definition of ssize_t;
>  > (b) SSIZE_MAX and UCHAR_MAX definitions in system.h; (c) the
>  > infrastructure to define more _MAX/_MIN macros should we need them.
>  > cpplib is already using UCHAR_MAX, and will need ssize_t/SSIZE_MAX
>  > shortly (as in this week).  Ok to commit?
>  > zw
> 
> Looks good...

Are you allowed to approve stuff?

> Curious, what was this for?

cpplib is about to start mmap-ing input files into memory.  It needs
this info - particularly SSIZE_MAX - in order to do it safely.

>  > 	* acconfig.h: Remove @TOP@, put
>  > 	@BOTTOM@ before all the NEED_DECLARATION_* macros.
> 
> I think I know what TOP/BOTTOM do, but not why we care to use them
> here.

We had @TOP@ at the very end of acconfig.h, which meant autoheader was
just pasting the entire contents of the file into config.in verbatim.
You're supposed to let it pick the things it needs.  If I took it out
entirely, then all the NEED_DECLARATION_* macros got lost.  Putting
@BOTTOM@ before the NEED_DECLARATIONs is a compromise.

> BTW, I'm about to nuke all the NEED_DECLARATION_* entries from
> acconfig.h, but I wanted to make sure I didn't clash with whatever
> your aim was.

How'd you manage that?  I tried a couple of approaches and couldn't
get them to work.

If you can get rid of all the NEED_DECLARATION entries, you could take
out the @BOTTOM@ too.

zw


More information about the Gcc-patches mailing list