Commit Graph

2 Commits

Author SHA1 Message Date
Nick Clifton 87fce92c5c This patch removes the use of the "register" keyword from the bsearch() and bsearch_r() functions supplied by libiberty. The register keyword is deprecated in C++17.
2020-06-25  Nick Clifton  <nickc@redhat.com>

include/
	* libiberty.h (bsearch_r): Remove use of the register keyword from
	the prototype.

libiberty/
	* bsearch.c (bsearch): Remove use of register keyword.
	* bsearch_r.c (bsearch_r): Likewise.
2020-06-26 10:06:48 +01:00
Nick Alcock aec24341d0 libiberty, include: add bsearch_r
libctf wants a bsearch that takes a void * arg pointer to avoid a
nonportable use of __thread.

bsearch_r is required, not optional, at this point because as far as I
can see this obvious-sounding function is not implemented by anyone's
libc.  We can easily move it to AC_LIBOBJ later if it proves necessary
to do so.

include/
	* libiberty.h (bsearch_r): New.
libiberty/
	* bsearch_r.c: New file.
	* Makefile.in (CFILES): Add bsearch_r.c.
	(REQUIRED_OFILES): Add bsearch_r.o.
	* functions.texi: Regenerate.
2020-06-23 18:39:38 +02:00