summaryrefslogtreecommitdiff
path: root/libctf/ctf-qsort_r.c
Commit message (Collapse)AuthorAgeFilesLines
* Update year range in copyright notice of binutils filesAlan Modra2022-01-021-1/+1
| | | | | | | | | | The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
* Update year range in copyright notice of binutils filesAlan Modra2021-01-011-1/+1
|
* Update year range in copyright notice of binutils filesAlan Modra2020-01-011-1/+1
|
* libctf: look for BSD versus GNU qsort_r signaturesNick Alcock2019-06-041-0/+259
We cannot just look for any declaration of qsort_r, because some operating systems 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 use AC_LINK_IFELSE to check for both known variants of qsort_r(), and swap their args into a consistent order in a suitable inline function. (The code for this is taken almost unchanged from gnulib.) (Now we are not using AC_LIBOBJ any more, we can use a better name for the qsort_r replacement as well.) libctf/ * qsort_r.c: Rename to... * ctf-qsort_r.c: ... this. (_quicksort): Define to ctf_qsort_r. * ctf-decls.h (qsort_r): Remove. (ctf_qsort_r): Add. (struct ctf_qsort_arg): New, transport the real ARG and COMPAR. (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR. * Makefile.am (libctf_a_LIBADD): Remove. (libctf_a_SOURCES): New, add ctf-qsort_r.c. * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r. * ctf-create.c (ctf_update): Likewise. * configure.ac: Check for BSD versus GNU qsort_r signature. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise.