diff options
author | Richard Earnshaw <Richard.Earnshaw@arm.com> | 2015-01-07 17:32:24 +0000 |
---|---|---|
committer | Richard Earnshaw <Richard.Earnshaw@arm.com> | 2015-01-07 17:34:29 +0000 |
commit | 7c89917ffa6813f40fbb9f345411d59716e90714 (patch) | |
tree | 6457a90f308cea40a799e74f72c9b3a122f0b17c /include | |
parent | d7b24d2941fd7c99ba5843331989e6023075f0d0 (diff) | |
download | gdb-7c89917ffa6813f40fbb9f345411d59716e90714.zip gdb-7c89917ffa6813f40fbb9f345411d59716e90714.tar.gz gdb-7c89917ffa6813f40fbb9f345411d59716e90714.tar.bz2 |
Sync with gcc/libiberty.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 12 | ||||
-rw-r--r-- | include/libiberty.h | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 011c4ef..e0185fa 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -2,6 +2,12 @@ Update year range in copyright notice of all files. +2014-12-24 Uros Bizjak <ubizjak@gmail.com> + Ben Elliston <bje@au.ibm.com> + Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + * libiberty.h (xasprintf): Declare. + 2014-12-23 Alan Modra <amodra@gmail.com> * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add @@ -15,6 +21,12 @@ * gcc-c-interface.h: New file. * gcc-interface.h: New file. +2014-12-11 Uros Bizjak <ubizjak@gmail.com> + Ben Elliston <bje@au.ibm.com> + Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + * libiberty.h (xvasprintf): Declare. + 2014-12-06 Eric Botcazou <ebotcazou@adacore.com> * dis-asm.h (print_insn_visium): Declare. diff --git a/include/libiberty.h b/include/libiberty.h index 9ef1b11..eec8009 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -623,6 +623,11 @@ extern int pwait (int, int *, int); extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; #endif +/* Like asprintf but allocates memory without fail. This works like + xmalloc. */ + +extern char *xasprintf (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF_1; + #if !HAVE_DECL_VASPRINTF /* Like vsprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ @@ -630,6 +635,11 @@ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0); #endif +/* Like vasprintf but allocates memory without fail. This works like + xmalloc. */ + +extern char *xvasprintf (const char *, va_list) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF(1,0); + #if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF /* Like sprintf but prints at most N characters. */ extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3; |