summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/include/string.h22
2 files changed, 17 insertions, 11 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index fe2aa456c..ab9a7aae4 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2004-08-07 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/string.h (memchr, memcmp, strchr, strcmp, strcspn)
+ (strlen, strncmp, strpbrk, strrchr, strspn, strstr): Add pure
+ attribute.
+
2004-07-30 Danny Smith <dannysmith@users.sourceforge.net>
* include/dirent.h (struct _wdirent): Remove obsolete comment.
diff --git a/winsup/mingw/include/string.h b/winsup/mingw/include/string.h
index f77ea83cd..44fff31ce 100644
--- a/winsup/mingw/include/string.h
+++ b/winsup/mingw/include/string.h
@@ -33,27 +33,27 @@ extern "C" {
/*
* Prototypes of the ANSI Standard C library string functions.
*/
-_CRTIMP void* __cdecl memchr (const void*, int, size_t);
-_CRTIMP int __cdecl memcmp (const void*, const void*, size_t);
+_CRTIMP void* __cdecl memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP int __cdecl memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
_CRTIMP void* __cdecl memcpy (void*, const void*, size_t);
_CRTIMP void* __cdecl memmove (void*, const void*, size_t);
_CRTIMP void* __cdecl memset (void*, int, size_t);
_CRTIMP char* __cdecl strcat (char*, const char*);
-_CRTIMP char* __cdecl strchr (const char*, int);
-_CRTIMP int __cdecl strcmp (const char*, const char*);
+_CRTIMP char* __cdecl strchr (const char*, int) __MINGW_ATTRIB_PURE;
+_CRTIMP int __cdecl strcmp (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP int __cdecl strcoll (const char*, const char*); /* Compare using locale */
_CRTIMP char* __cdecl strcpy (char*, const char*);
-_CRTIMP size_t __cdecl strcspn (const char*, const char*);
+_CRTIMP size_t __cdecl strcspn (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl strerror (int); /* NOTE: NOT an old name wrapper. */
-_CRTIMP size_t __cdecl strlen (const char*);
+_CRTIMP size_t __cdecl strlen (const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl strncat (char*, const char*, size_t);
-_CRTIMP int __cdecl strncmp (const char*, const char*, size_t);
+_CRTIMP int __cdecl strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl strncpy (char*, const char*, size_t);
-_CRTIMP char* __cdecl strpbrk (const char*, const char*);
-_CRTIMP char* __cdecl strrchr (const char*, int);
-_CRTIMP size_t __cdecl strspn (const char*, const char*);
-_CRTIMP char* __cdecl strstr (const char*, const char*);
+_CRTIMP char* __cdecl strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE;
+_CRTIMP char* __cdecl strrchr (const char*, int) __MINGW_ATTRIB_PURE;
+_CRTIMP size_t __cdecl strspn (const char*, const char*) __MINGW_ATTRIB_PURE;
+_CRTIMP char* __cdecl strstr (const char*, const char*) __MINGW_ATTRIB_PURE;
_CRTIMP char* __cdecl strtok (char*, const char*);
_CRTIMP size_t __cdecl strxfrm (char*, const char*, size_t);