Explorar el Código

libcompat: Add declarations in compat.h for snprintf functions

Guillem Jover hace 16 años
padre
commit
ab91f03850
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      lib/compat/compat.h

+ 8 - 0
lib/compat/compat.h

@@ -49,6 +49,14 @@ extern "C" {
 
 #include <strnlen.h>
 
+#ifndef HAVE_C99_SNPRINTF
+#include <stddef.h>
+#include <stdarg.h>
+
+int snprintf(char *str, size_t n, char const *fmt, ...);
+int vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
+#endif
+
 #ifndef HAVE_ASPRINTF
 #include <stdarg.h>