This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 3/3] libctf: look for a qsort_r that functions properly
On 5 Jun 2019, Pedro Alves told this:
> On 6/3/19 9:47 PM, Nick Alcock wrote:
>
>> We cannot just look for any declaration of qsort_r, because some
>> operating systems
>
> OOC, could you give some examples?
This is a BSD-heritage thing, so MacOS X and FreeBSD are examples.
>> So, instead, use AC_RUN_IFELSE to check for the function of qsort_r(),
>> passing function pointers in to both args and making sure that we never
>> actually dereference the arg pointer.
>
> AC_RUN_IFELSE is really best avoided; obviously you can't run when
> cross compiling.
>
> How does gnulib handle this?
This is an old patch: v2, posted later, uses gnulib's method (and mostly
gnulib's code too).
--
NULL && (void)