[PATCH 3/3] libctf: look for a qsort_r that functions properly

Nick Alcock nick.alcock@oracle.com
Wed Jun 5 10:46:00 GMT 2019


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)



More information about the Binutils mailing list