binutils-gdb/libctf
Nick Alcock 942d35f72b libctf: avoid strndup
Not all platforms have it.  Use libiberty xstrndup() instead.

(The include of libiberty.h happens in an unusual place due to the
requirements of synchronization of most source files between this
project and another that does not use libiberty.  It serves to pull
libiberty.h in for all source files in libctf/, which does the trick.)

Tested on x86_64-pc-linux-gnu, x86_64-unknown-freebsd12.0,
sparc-sun-solaris2.11, i686-pc-cygwin, i686-w64-mingw32.

libctf/
	* ctf-decls.h: Include <libiberty.h>.
	* ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
2019-06-07 13:46:39 +01:00
..
ChangeLog libctf: avoid strndup 2019-06-07 13:46:39 +01:00
Makefile.am libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
Makefile.in libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
aclocal.m4 libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
config.h.in libctf: work on platforms without O_CLOEXEC. 2019-06-04 17:05:08 +01:00
configure libctf: work on platforms without O_CLOEXEC. 2019-06-04 17:05:08 +01:00
configure.ac libctf: work on platforms without O_CLOEXEC. 2019-06-04 17:05:08 +01:00
ctf-archive.c libctf: mark various args as unused in the !HAVE_MMAP case 2019-06-07 13:46:38 +01:00
ctf-create.c libctf: eschew %zi format specifier 2019-06-05 13:34:36 +01:00
ctf-decl.c libctf: core type lookup 2019-05-28 17:08:14 +01:00
ctf-decls.h libctf: avoid strndup 2019-06-07 13:46:39 +01:00
ctf-dump.c libctf: explicitly cast more size_t types used in printf()s 2019-06-07 13:46:38 +01:00
ctf-endian.h libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-error.c libctf: error handling 2019-05-28 17:07:24 +01:00
ctf-hash.c libctf: hashing 2019-05-28 17:07:29 +01:00
ctf-impl.h libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-labels.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-lookup.c libctf: avoid strndup 2019-06-07 13:46:39 +01:00
ctf-open-bfd.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-open.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-qsort_r.c libctf: look for BSD versus GNU qsort_r signatures 2019-06-04 17:05:08 +01:00
ctf-subr.c libctf: mark various args as unused in the !HAVE_MMAP case 2019-06-07 13:46:38 +01:00
ctf-types.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
ctf-util.c libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00
elf.h libctf: low-level list manipulation and helper utilities 2019-05-28 17:07:19 +01:00
swap.h libctf: fix a number of build problems found on Solaris and NetBSD 2019-05-31 11:10:51 +02:00