[patch v3] aligned_alloc: conform to C17
Florian Weimer
fw@deneb.enyo.de
Tue Mar 21 20:43:23 GMT 2023
* DJ Delorie:
> Florian Weimer <fw@deneb.enyo.de> writes:
>> Perhaps you could use this?
>
> One other difference that isn't obvious in the patch...
>
> the weak alias for aligned_alloc is inside a conditional:
>
> #if IS_IN (libc)
> . . .
> weak_alias (__libc_aligned_alloc, aligned_alloc)
> . . .
> #endif
>
> I don't know what, if anything uses malloc.c without being in glibc, but
> if such a thing existed, it would break if aligned_alloc weren't inside
> this conditional.
>
> Or the conditional could be removed?
Siddhesh added it for libc_malloc_debug, it has !IS_IN (libc).
Surely we want libc_malloc_debug to keep defining aligned_alloc,
so this shouldn't be conditional on IS_IN (libc).
More information about the Libc-alpha
mailing list