tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc problems on FBSD 4.8 and patch


From: Peter \"Firefly\" Lund
Subject: Re: [Tinycc-devel] tcc problems on FBSD 4.8 and patch
Date: Tue, 22 Apr 2003 23:06:30 +0200 (MEST)

On Tue, 22 Apr 2003, Billy wrote:

> Noted.

Thanks :)

> > (Wouldn't OS=`uname` do just as well?)
>
> Yes, but I was following the existing style.  AR does the same sort of
> thing, although it is an application.

I would have followed the same style myself - it was as least as much an
attempt at soliciting comments from other people :)

> >  #ifndef CONFIG_TCC_MALLOC_HOOKS
> > -void *__bound_calloc(size_t nmemb, size_t size)
> > +void *__bound_calloc(size_t nmemb, size_t size, const void *caller)
> >
> > Perhaps __const would be better?  The bounds checking code is very tightly
> > bound to the memory allocator used in glibc (ptmalloc, derived from Doug
> > Lea's malloc) and it uses __const -- defined in malloc.h.
>
> I wasn't really thinking about changing the sematics of the code, only
> changing the syntax to compile on FreeBSD.  This patch really only for
> platform portability.

Using __const instead of const for the hooked functions doesn't seem like
changing the semantics to me.  You must have a glibc like malloc module
anyway for it to work.

(__malloc_hook and friends are defined in malloc.h)

-Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]