diff options
author | DJ Delorie <dj@redhat.com> | 2014-12-15 09:56:39 +0300 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2014-12-15 09:56:39 +0300 |
commit | b536197a756353da081234a828eaa5c4a4cf4181 (patch) | |
tree | 2accb959edaa6f4c529fcf448ce51e0010788172 /include/libiberty.h | |
parent | f58bc5991f017a0c720d79b4bb3c0c082e835b04 (diff) |
merge from gcc
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index 571e85f1e..b9694f0f0 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -636,6 +636,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; |