projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96436e9
)
Define snprintf along with vsnprintf for Windows
author
Ken Raeburn
<raeburn@mit.edu>
Wed, 1 Aug 2007 00:01:31 +0000
(
00:01
+0000)
committer
Ken Raeburn
<raeburn@mit.edu>
Wed, 1 Aug 2007 00:01:31 +0000
(
00:01
+0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19742
dc483132
-0cff-0310-8789-
dd5450dbe970
src/include/k5-platform.h
patch
|
blob
|
history
diff --git
a/src/include/k5-platform.h
b/src/include/k5-platform.h
index ebcb211d360a2cf650628c70d77a9c0217566700..141ea94f788bfad4dd0dbc7ddc5b6f644ffdba74 100644
(file)
--- 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? */