summaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-05-12 07:01:25 +0000
committerAndreas Jaeger <aj@suse.de>2000-05-12 07:01:25 +0000
commitca5a4c3c9f8ec775c84aaaea06c494915acd389a (patch)
treefd3419ad39aab13af05e87e6cf7016b2043c9599 /include/string.h
parentb227a3a6adcbf42ef4dfa0517777d2c4f5defa7b (diff)
downloadglibc-ca5a4c3c9f8ec775c84aaaea06c494915acd389a.tar.gz
Update.
2000-05-11 Jan Hubicka <jh@suse.cz> * misc/sys/cdefs.h: Add support for pure attribute. * include/string.h: Add __attribute_pure__ to various functions. * string/string.h: Likewise.
Diffstat (limited to 'include/string.h')
-rw-r--r--include/string.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/string.h b/include/string.h
index 6f00a894fa..7fe76b1f38 100644
--- a/include/string.h
+++ b/include/string.h
@@ -5,23 +5,29 @@
extern void *__memccpy (void *__dest, __const void *__src,
int __c, size_t __n);
-extern size_t __strnlen (__const char *__string, size_t __maxlen);
+extern size_t __strnlen (__const char *__string, size_t __maxlen)
+ __attribute_pure__;
extern char *__strsep (char **__stringp, __const char *__delim);
-extern int __strverscmp (__const char *__s1, __const char *__s2);
+extern int __strverscmp (__const char *__s1, __const char *__s2)
+ __attribute_pure__;
extern int __strncasecmp (__const char *__s1, __const char *__s2,
- size_t __n);
+ size_t __n)
+ __attribute_pure__;
extern char *__strndup (__const char *__string, size_t __n)
__attribute_malloc__;
-extern void *__rawmemchr (__const void *__s, int __c);
+extern void *__rawmemchr (__const void *__s, int __c)
+ __attribute_pure__;
-extern char *__strchrnul (__const char *__s, int __c);
+extern char *__strchrnul (__const char *__s, int __c)
+ __attribute_pure__;
-extern void *__memrchr (__const void *__s, int __c, size_t __n);
+extern void *__memrchr (__const void *__s, int __c, size_t __n)
+ __attribute_pure__;
/* Now the real definitions. We do this here since some of the functions
above are defined as macros in the headers. */