diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-25 04:41:41 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-25 04:41:41 +0000 |
commit | a2ef32b006a6f88ffde6c5c06e52d91c176f258d (patch) | |
tree | 69b832401346b668037c811e96ccd1486e1163a8 /include/libiberty.h | |
parent | 1cf8f41f58e597554a1f73d904c49bf12d71419e (diff) | |
download | gcc-a2ef32b006a6f88ffde6c5c06e52d91c176f258d.tar.gz |
include:
* libiberty.h (xstrndup): Declare.
libiberty:
* Makefile.in (CFILES): Add strndup.c and xstrndup.c.
(REQUIRED_OFILES): Add xstrndup.o.
(CONFIGURED_OFILES): Add strndup.o.
Regenerate dependencies.
* configure.ac (funcs, AC_CHECK_FUNCS): Add strndup.
* strndup.c, xstrndup.c: New.
* config.in, configure, functions.texi: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index d2a8a0b9ef7..49a2fb6fd52 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; |