From 0fad4bdb8e54f631e012ec382b6e337e7c897502 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 25 Mar 2005 04:57:08 +0000 Subject: merge from gcc --- include/ChangeLog | 4 ++++ include/libiberty.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 4c8d105093..6f64e063bf 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2005-03-24 Kaveh R. Ghazi + + * libiberty.h (xstrndup): Declare. + 2005-03-22 Kaveh R. Ghazi * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC. diff --git a/include/libiberty.h b/include/libiberty.h index d2a8a0b9ef..49a2fb6fd5 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -255,6 +255,10 @@ extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC; extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC; +/* Copy at most N characters from string into a buffer without fail. */ + +extern char *xstrndup PARAMS ((const char *, size_t)) ATTRIBUTE_MALLOC; + /* Copy an existing memory buffer to a new memory buffer without fail. */ extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC; -- cgit v1.2.1