From fb4dfa0c81812d64197d65f8c0c7e57467e09280 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 23 Aug 2000 07:23:46 +0000 Subject: Add some pure attributes. --- include/dirent.h | 6 ++++-- include/wchar.h | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/dirent.h b/include/dirent.h index 4bffb06..d0ca3f2 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -18,6 +18,8 @@ extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes) internal_function; extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes) internal_function; -extern int __alphasort64 (const void *a, const void *b); -extern int __versionsort64 (const void *a, const void *b); +extern int __alphasort64 (const void *a, const void *b) + __attribute_pure__; +extern int __versionsort64 (const void *a, const void *b) + __attribute_pure__; #endif diff --git a/include/wchar.h b/include/wchar.h index 7187d76..ee12563 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -3,10 +3,13 @@ # ifdef _WCHAR_H /* Now define the internal interfaces. */ -extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2); +extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) + __attribute_pure__; extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, - size_t __n); -extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen); + size_t __n) + __attribute_pure__; +extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen) + __attribute_pure__; extern wint_t __btowc (int __c); extern int __mbsinit (__const __mbstate_t *__ps); extern size_t __mbrtowc (wchar_t *__restrict __pwc, @@ -37,7 +40,8 @@ extern wchar_t *__wmempcpy (wchar_t *__restrict __s1, size_t __n); extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n); -extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc); +extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc) + __attribute_pure__; extern int __vfwscanf (FILE *__restrict __s, __const wchar_t *__restrict __format, -- cgit v1.1