Skip to content
Snippets Groups Projects
  • Nick Alcock's avatar
    aec24341
    libiberty, include: add bsearch_r · aec24341
    Nick Alcock authored
    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.
    aec24341
    History
    libiberty, include: add bsearch_r
    Nick Alcock authored
    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.