From: Ken Raeburn Date: Fri, 27 Jul 2007 04:38:32 +0000 (+0000) Subject: Provide {,v}asprintf prototypes if needed X-Git-Tag: krb5-1.7-alpha1~990 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf95517f1466d41c5cc283f8fa01bc60bbe37054;p=krb5.git Provide {,v}asprintf prototypes if needed git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19735 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h index 2339e6354..ebcb211d3 100644 --- a/src/include/k5-platform.h +++ b/src/include/k5-platform.h @@ -792,6 +792,7 @@ vsnprintf(char *str, size_t size, const char *format, va_list args) #error We need an implementation of vsnprintf. #endif /* win32? */ #endif /* no vsnprintf */ + #ifndef HAVE_VASPRINTF #if !defined(__cplusplus) && (__GNUC__ > 2) @@ -859,7 +860,21 @@ k5_asprintf(char **ret, const char *format, ...) va_end(ap); return n; } + +#elif defined(NEED_VASPRINTF_PROTO) + +extern int vasprintf(char **, const char *, va_list) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 2, 0))) #endif + ; +extern int asprintf(char **, const char *, ...) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 2, 3))) +#endif + ; + +#endif /* have vasprintf and prototype? */ #ifndef HAVE_MKSTEMP extern int krb5int_mkstemp(char *);