summaryrefslogtreecommitdiff
path: root/include/libiberty.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-29 02:08:36 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-29 02:08:36 +0000
commit7d28999bcdf0dd4f9034954837fa6867e6c4abbe (patch)
treea49996678681914efc255b0a75a9b54d333125ad /include/libiberty.h
parentf59776ad98e33c9529e8f17ef807ab7a7fd846e2 (diff)
downloadgcc-7d28999bcdf0dd4f9034954837fa6867e6c4abbe.tar.gz
* libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
(asprintf, vasprintf): Provide declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r--include/libiberty.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h
index 9a32840f667..edc0066ecf1 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -134,6 +134,8 @@ extern void xmalloc_set_program_name PARAMS ((const char *));
#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
+/* Get a definition for va_list. */
+#include <stdarg.h>
#endif
extern PTR xmalloc PARAMS ((size_t));
@@ -182,6 +184,17 @@ extern int pexecute PARAMS ((const char *, char * const *, const char *,
extern int pwait PARAMS ((int, int *, int));
+/* Like sprintf but provides a pointer to malloc'd storage, which must
+ be freed by the caller. */
+
+extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
+
+/* Like vsprintf but provides a pointer to malloc'd storage, which
+ must be freed by the caller. */
+
+extern int vasprintf PARAMS ((char **, const char *, va_list))
+ ATTRIBUTE_PRINTF(2,0);
+
#ifdef __cplusplus
}
#endif