pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Problems with 2006Q3
On Fri, Nov 03, 2006 at 08:54:42AM +0100, Roland Illig wrote:
[skip long explaination]
> This is rather interesting. It looks good, I only fear that the name
> "-no-std-libs" is a little too generic. It also reminds me of the gcc
> -nostdlib option, which _might_ be confused with yours. Since yours is a
> hack especially for Tru64, maybe the option could have "osf1" or "tru64"
> in its name?
One question remains for me -- why should it not be the default
behaviour? E.g. why should the wrapper not *force* it transparently?
That would make the need for the option go away.
> Wouldn't it be better to provide the function rpl_malloc yourself? I've
> looked at the code, and there are many possibilities for passing a zero
> as the argument of malloc(). On the other hand, if your system's free()
> happily takes a null pointer, your patch is correct (for your system).
A free(3) which doesn't support being called with a NULL pointer is just
broken. What malloc does for size 0 is implementation defined.
Consistent with the spirit of the standard could be a wrapper which
turns allocations for 0 into allocations of 1, if a program depends on
that.
Joerg
Home |
Main Index |
Thread Index |
Old Index