diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-12-19 08:08:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-12-19 08:08:59 +0000 |
commit | e9e9b245b98b8aeb8b8e898dce2b8c0f771602d6 (patch) | |
tree | 8cedb8e3ff9898a02990d88802319f68e99ac268 /string | |
parent | 778c59c850879b2ffc7a396cecfa5a5ad68a40e6 (diff) | |
download | glibc-e9e9b245b98b8aeb8b8e898dce2b8c0f771602d6.tar glibc-e9e9b245b98b8aeb8b8e898dce2b8c0f771602d6.tar.gz glibc-e9e9b245b98b8aeb8b8e898dce2b8c0f771602d6.tar.bz2 glibc-e9e9b245b98b8aeb8b8e898dce2b8c0f771602d6.zip |
Update.
* misc/sys/cdefs.h: Define __attribute_malloc__ according to
available gcc version.
* string/string.h: Mark strdup, __strdup, and strndup with
__attribute_malloc__.
* stdlib/stdlib.h: Make malloc, calloc, realloc, and valloc with
__attribute_malloc__.
* malloc/malloc.h: Make malloc, calloc, realloc, valloc, pvallc,
__morecore, and __default_morecore with __attribute_malloc__.
Provide default definition for __attribute_malloc__.
* libio/stdio.h: Make tempnam with __attribute_malloc__.
Diffstat (limited to 'string')
-rw-r--r-- | string/string.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/string/string.h b/string/string.h index 4a8ba402f8..58d0e7162e 100644 --- a/string/string.h +++ b/string/string.h @@ -112,15 +112,16 @@ extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n, #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Duplicate S, returning an identical malloc'd string. */ -extern char *__strdup (__const char *__s) __THROW; -extern char *strdup (__const char *__s) __THROW; +extern char *__strdup (__const char *__s) __THROW __attribute_malloc__; +extern char *strdup (__const char *__s) __THROW __attribute_malloc__; #endif /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #if defined __USE_GNU -extern char *strndup (__const char *__string, size_t __n) __THROW; +extern char *strndup (__const char *__string, size_t __n) + __THROW __attribute_malloc__; #endif #if defined __USE_GNU && defined __GNUC__ |