summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/com32/lib/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/com32/lib/sprintf.c')
-rw-r--r--contrib/syslinux-4.02/com32/lib/sprintf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/com32/lib/sprintf.c b/contrib/syslinux-4.02/com32/lib/sprintf.c
new file mode 100644
index 0000000..3c32841
--- /dev/null
+++ b/contrib/syslinux-4.02/com32/lib/sprintf.c
@@ -0,0 +1,18 @@
+/*
+ * sprintf.c
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int sprintf(char *buffer, const char *format, ...)
+{
+ va_list ap;
+ int rv;
+
+ va_start(ap, format);
+ rv = vsnprintf(buffer, ~(size_t) 0, format, ap);
+ va_end(ap);
+
+ return rv;
+}