From 101446c6f40a13917fd0ba020bc276e82590058d Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 1 Aug 2007 00:01:31 +0000 Subject: [PATCH] Define snprintf along with vsnprintf for Windows git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19742 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-platform.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h index ebcb211d3..141ea94f7 100644 --- a/src/include/k5-platform.h +++ b/src/include/k5-platform.h @@ -788,6 +788,17 @@ vsnprintf(char *str, size_t size, const char *format, va_list args) _vsnprintf(str, size, format, args); return length; } +static inline int +snprintf(char *str, size_t size, const char *format, ...) +{ + va_list args; + int n; + + va_start(args, format); + n = vsnprintf(str, size, format, args); + va_end(args); + return n; +} #else /* not win32 */ #error We need an implementation of vsnprintf. #endif /* win32? */ -- 2.26.2