summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2005-05-28 13:40:59 +0200
committerAndreas Jaeger <aj@gcc.gnu.org>2005-05-28 13:40:59 +0200
commitddcf783b5977764f654fb6e9f754265478acf2f6 (patch)
tree33877dbe0dcb3d58776129b09f97bba8395313c1 /include
parent81ae598bbd9f3faa1f0d7e16acfba9e6c914f94c (diff)
downloadgcc-ddcf783b5977764f654fb6e9f754265478acf2f6.tar.gz
libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if needed.
include: 2005-05-28 Eli Zaretskii <eliz@gnu.org> * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if needed. (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed. libiberty: 2005-05-28 Eli Zaretskii <eliz@gnu.org> * configure.ac: Add snprintf and vsnprintf to AC_CHEK_DECLS. * config.in, configure: Regenerate. From-SVN: r100292
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog14
-rw-r--r--include/libiberty.h10
2 files changed, 20 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index e7eb8e016c9..0eb2b090d15 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-28 Eli Zaretskii <eliz@gnu.org>
+
+ * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
+ needed.
+ (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
+
2005-05-25 Richard Henderson <rth@redhat.com>
* demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
@@ -7,7 +13,7 @@
* libiberty.h (ACONCAT): Properly cast value of alloca().
* ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
- __cplusplus.
+ __cplusplus.
2005-05-12 Steve Ellcey <sje@cup.hp.com>
@@ -67,7 +73,7 @@
2005-03-28 Mark Mitchell <mark@codesourcery.com>
* libiberty.h (ffs): Declare, if necessary.
-
+
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* xregex2.h (_RE_ARGS): Remove definition and uses.
@@ -177,9 +183,9 @@
* hashtab.h (struct htab): Add size_prime_index.
2004-04-13 Jeff Law <law@redhat.com>
-
+
* hashtab.h (htab_remove_elt_with_hash): Prototype new function.
-
+
2004-03-30 Zack Weinberg <zack@codesourcery.com>
* hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
diff --git a/include/libiberty.h b/include/libiberty.h
index 9af981cd74e..75cbedc23dd 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -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,