diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2019-06-06 14:10:08 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2019-06-07 13:46:39 +0100 |
commit | 942d35f72bea5a0d19a5d0e0a5ca533e37a88b2c (patch) | |
tree | 816501c6463655665d89a4263e9241d0f4578af4 /libctf/ChangeLog | |
parent | 595a4d439bc5976d5bdf61da6d44337b3995d967 (diff) | |
download | gdb-942d35f72bea5a0d19a5d0e0a5ca533e37a88b2c.zip gdb-942d35f72bea5a0d19a5d0e0a5ca533e37a88b2c.tar.gz gdb-942d35f72bea5a0d19a5d0e0a5ca533e37a88b2c.tar.bz2 |
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().
Diffstat (limited to 'libctf/ChangeLog')
-rw-r--r-- | libctf/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 20f9816..f48ad5b 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,10 @@ 2019-06-06 Nick Alcock <nick.alcock@oracle.com> + * ctf-decls.h: Include <libiberty.h>. + * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup(). + +2019-06-06 Nick Alcock <nick.alcock@oracle.com> + * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s. (ctf_dump_objts): Likewise. (ctf_dump_funcs): Likewise. |