kaffe-1.0.b1: fix for calloc macro breaks prototypes

Godmar Back gback at cs.utah.edu
Wed Jul 15 09:50:58 PDT 1998


 Kaffe's malloc zeroes the memory it returns.

	- Godmar

> 
> Ben Laurie writes:
> > Simon J. Gerraty wrote:
> > > In a quick attempt to compile kaffe on Solaris 2.6 using gcc-2.7.2
> > > The following macro:
> > > 
> > > kaffe-1.0.b1/include/jmalloc.h:25:#define    calloc(A, B)    __malloc((A)*(B))
> > 
> > Isn't the right way to fix this to reorder the includes so that calloc
> > isn't defined before the standard headers are included?
> > 
> > Better yet, of course, is to not call it calloc!
> 
> I don't know if this matters in the way kaffe uses calloc(),
> but the semantics of calloc() are to return zeroed memory, so
> this macro is incorrect.
> 
> -Archie
> 
> ___________________________________________________________________________
> Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com
> 



More information about the kaffe mailing list