Re: [meta-gplv2][PATCH 2/2 v2] diffutils: musl has working malloc() and realloc()

Adrian Bunk

On Wed, Jan 08, 2020 at 04:52:36PM +0000, Andr? Draszik wrote:
On Wed, 2020-01-08 at 16:18 +0000, Ross Burton wrote:
On 08/01/2020 16:15, Andr? Draszik wrote:
+ jm_cv_func_working_malloc=yes \
+ jm_cv_func_working_realloc=yes \
Why is this musl-specific? Does the configure explicitly detect glibc
and know it's good, or should we do this for glibc too?
That's musl specific, because it's a property of the C-library in use.

E.g. somebody could be using this with an outdated vendor(?) toolchain
using an old glibc which could behave incorrectly...
The jm_cv_func_working_malloc test is:
main ()
exit (malloc (0) ? 0 : 1);

The C standard says that this is implementation defined,
both results are permitted.

glibc has the same behaviour forever,
musl switched to the glibc behaviour a few years ago.


Join to automatically receive all group messages.