[PATCH] macros: Use conservative default for malloc(0) when cross-compiling #24460
Gaetan Nadon
memsize at videotron.ca
Wed Dec 9 13:17:49 PST 2009
On Wed, 2009-12-09 at 16:02 +0600, Mikhail Gusarov wrote:
> Twas brillig at 21:36:41 08.12.2009 UTC-05 when
> gaetan.nadon at videotron.ca did gyre and gimble:
>
> GN> libX11 fails to cross-compile unless --enable-malloc0returnsnull is
> GN> given during configuration, since configure can't run test programs
> GN> in this situation.
>
> Why not give it?
>
> GN> This is a sensible conservative default that should be used by
> GN> default when cross-compiling rather than requiring it to be forced
> GN> explicitly.
>
> I'd prefer configure to explicitly fail instead of silently making
> choices behind my back.
I looked at the code using MALLOC_0_RETURNS_NULL and malloc(0) is
replaced with malloc(1) to avoid a NULL being returned. A production or
benchmark build should still pass the correct value for an optimum
build. Would that information influence your preference?
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.x.org/archives/xorg-devel/attachments/20091209/1814572d/attachment.html
More information about the xorg-devel
mailing list