This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?

> have a qsort_r that has a different prototype
> but which still has a pair of pointers in the right places (the last two
> args are interchanged), so we cannot rely on compilation errors to flag
> up a problem.

> 
> 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?

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]