]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - include/libiberty.h
libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if needed.
[thirdparty/gcc.git] / include / libiberty.h
index 9af981cd74ea95e73f11d28322d348aca2ef5bc1..75cbedc23dd468ed4b47e3e8d2429b200fe1c7a7 100644 (file)
@@ -531,6 +531,16 @@ extern int vasprintf (char **, const char *, va_list)
   ATTRIBUTE_PRINTF(2,0);
 #endif
 
+#if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF
+/* Like sprintf but prints at most N characters.  */
+extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
+#endif
+
+#if defined(HAVE_DECL_VSNPRINTF) && !HAVE_DECL_VSNPRINTF
+/* Like vsprintf but prints at most N characters.  */
+extern int vsnprintf (char *, size_t, const char *, va_list);
+#endif
+
 #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
 
 /* Drastically simplified alloca configurator.  If we're using GCC,