diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 14 | ||||
-rw-r--r-- | include/libiberty.h | 10 |
2 files changed, 20 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index e7eb8e0..0eb2b09 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 9af981c..75cbedc 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, |