diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2005-03-25 04:41:41 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2005-03-25 04:41:41 +0000 |
commit | 17998b22b59b393fe28c766e3bd72a0419f70041 (patch) | |
tree | 69b832401346b668037c811e96ccd1486e1163a8 /include | |
parent | bb99744fd4346bc283e19ecc2236f320a6901242 (diff) | |
download | gcc-17998b22b59b393fe28c766e3bd72a0419f70041.zip gcc-17998b22b59b393fe28c766e3bd72a0419f70041.tar.gz gcc-17998b22b59b393fe28c766e3bd72a0419f70041.tar.bz2 |
libiberty.h (xstrndup): Declare.
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.
From-SVN: r97034
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/libiberty.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 44725bc..795101e 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * libiberty.h (xstrndup): Declare. + 2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC. diff --git a/include/libiberty.h b/include/libiberty.h index d2a8a0b..49a2fb6 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; |