diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-11-29 02:08:36 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-11-29 02:08:36 +0000 |
commit | 146e60a0704290a2dcac78ffb1a2efbd7b852f7e (patch) | |
tree | a49996678681914efc255b0a75a9b54d333125ad | |
parent | 9fdbc878c2b648cea316b96b502833693222a035 (diff) | |
download | gcc-146e60a0704290a2dcac78ffb1a2efbd7b852f7e.zip gcc-146e60a0704290a2dcac78ffb1a2efbd7b852f7e.tar.gz gcc-146e60a0704290a2dcac78ffb1a2efbd7b852f7e.tar.bz2 |
libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
* libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
(asprintf, vasprintf): Provide declarations.
From-SVN: r30691
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/libiberty.h | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 5bdc290..3684776 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined. + (asprintf, vasprintf): Provide declarations. + Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be> Kaveh R. Ghazi <ghazi@caip.rutgers.edu> diff --git a/include/libiberty.h b/include/libiberty.h index 9a32840..edc0066 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 |