summaryrefslogtreecommitdiff
path: root/include/libiberty.h
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2014-12-24 17:22:51 +0100
committerUros Bizjak <uros@gcc.gnu.org>2014-12-24 17:22:51 +0100
commite88509188632d76288d391d1407157f1bff22ade (patch)
treee21bcbff0304890e7c01194049ad076d6a2a28eb /include/libiberty.h
parent369695b99d6eb0382c32ad442a55a5d3e656069a (diff)
xasprintf.c: New file.
libiberty/ChangeLog: * xasprintf.c: New file. * Makefile.in (CFILES): Add xasprintf.c. (REQUIRED_OFILES): Add xasprintf.$(objext). (xasprintf.$(objext)): New target. * functions.texi: Regenerate. include/ChangeLog: * libiberty.h (xasprintf): Declare. gcc/ChangeLog: * gengtype.h (xasprintf): Remove declaration. * gengtype.c (xasprintf): Remove. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org> From-SVN: r219060
Diffstat (limited to 'include/libiberty.h')
-rw-r--r--include/libiberty.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h
index b9694f0f093..aa0d92c8c20 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -629,6 +629,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. */