summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2007-07-27 04:38:32 +0000
committerKen Raeburn <raeburn@mit.edu>2007-07-27 04:38:32 +0000
commitcf95517f1466d41c5cc283f8fa01bc60bbe37054 (patch)
treecbc1c95c16e91d5321b36d82258fd09fc896e9fb /src
parent93d6bb32966d3395a1f180f8c25cd1c500a50294 (diff)
downloadkrb5-cf95517f1466d41c5cc283f8fa01bc60bbe37054.tar.gz
krb5-cf95517f1466d41c5cc283f8fa01bc60bbe37054.tar.xz
krb5-cf95517f1466d41c5cc283f8fa01bc60bbe37054.zip
Provide {,v}asprintf prototypes if needed
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19735 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/include/k5-platform.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h
index 2339e6354b..ebcb211d36 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 *);