diff options
Diffstat (limited to 'newlib/libc/string')
-rw-r--r-- | newlib/libc/string/memccpy.c | 6 | ||||
-rw-r--r-- | newlib/libc/string/memcpy.c | 7 | ||||
-rw-r--r-- | newlib/libc/string/stpcpy.c | 6 | ||||
-rw-r--r-- | newlib/libc/string/stpncpy.c | 7 | ||||
-rw-r--r-- | newlib/libc/string/strcat.c | 6 | ||||
-rw-r--r-- | newlib/libc/string/strncat.c | 7 | ||||
-rw-r--r-- | newlib/libc/string/strncpy.c | 7 | ||||
-rw-r--r-- | newlib/libc/string/strtok.c | 12 | ||||
-rw-r--r-- | newlib/libc/string/strtok_r.c | 6 | ||||
-rw-r--r-- | newlib/libc/string/strxfrm.c | 7 |
10 files changed, 39 insertions, 32 deletions
diff --git a/newlib/libc/string/memccpy.c b/newlib/libc/string/memccpy.c index a6f45e8b3..dded85781 100644 --- a/newlib/libc/string/memccpy.c +++ b/newlib/libc/string/memccpy.c @@ -4,7 +4,7 @@ FUNCTION ANSI_SYNOPSIS #include <string.h> - void* memccpy(void *<[out]>, const void *<[in]>, + void* memccpy(void *restrict <[out]>, const void *restrict <[in]>, int <[endchar]>, size_t <[n]>); TRAD_SYNOPSIS @@ -64,8 +64,8 @@ PORTABILITY _PTR _DEFUN (memccpy, (dst0, src0, endchar, len0), - _PTR dst0 _AND - _CONST _PTR src0 _AND + _PTR __restrict dst0 _AND + _CONST _PTR __restrict src0 _AND int endchar0 _AND size_t len0) { diff --git a/newlib/libc/string/memcpy.c b/newlib/libc/string/memcpy.c index c1c726dab..5f27bca72 100644 --- a/newlib/libc/string/memcpy.c +++ b/newlib/libc/string/memcpy.c @@ -4,7 +4,8 @@ FUNCTION ANSI_SYNOPSIS #include <string.h> - void* memcpy(void *<[out]>, const void *<[in]>, size_t <[n]>); + void* memcpy(void *restrict <[out]>, const void *restrict <[in]>, + size_t <[n]>); TRAD_SYNOPSIS #include <string.h> @@ -51,8 +52,8 @@ QUICKREF _PTR _DEFUN (memcpy, (dst0, src0, len0), - _PTR dst0 _AND - _CONST _PTR src0 _AND + _PTR __restrict dst0 _AND + _CONST _PTR __restrict src0 _AND size_t len0) { #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) diff --git a/newlib/libc/string/stpcpy.c b/newlib/libc/string/stpcpy.c index 62fe79997..bc58f4771 100644 --- a/newlib/libc/string/stpcpy.c +++ b/newlib/libc/string/stpcpy.c @@ -7,7 +7,7 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *stpcpy(char *<[dst]>, const char *<[src]>); + char *stpcpy(char *restrict <[dst]>, const char *restrict <[src]>); TRAD_SYNOPSIS #include <string.h> @@ -60,8 +60,8 @@ QUICKREF char* _DEFUN (stpcpy, (dst, src), - char *dst _AND - _CONST char *src) + char *__restrict dst _AND + _CONST char *__restrict src) { #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) long *aligned_dst; diff --git a/newlib/libc/string/stpncpy.c b/newlib/libc/string/stpncpy.c index fca10d398..abd9bbdbf 100644 --- a/newlib/libc/string/stpncpy.c +++ b/newlib/libc/string/stpncpy.c @@ -7,7 +7,8 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *stpncpy(char *<[dst]>, const char *<[src]>, size_t <[length]>); + char *stpncpy(char *restrict <[dst]>, const char *restrict <[src]>, + size_t <[length]>); TRAD_SYNOPSIS #include <string.h> @@ -68,8 +69,8 @@ QUICKREF char * _DEFUN (stpncpy, (dst, src), - char *dst _AND - _CONST char *src _AND + char *__restrict dst _AND + _CONST char *__restrict src _AND size_t count) { char *ret = NULL; diff --git a/newlib/libc/string/strcat.c b/newlib/libc/string/strcat.c index 411eadb85..1e4614991 100644 --- a/newlib/libc/string/strcat.c +++ b/newlib/libc/string/strcat.c @@ -7,7 +7,7 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *strcat(char *<[dst]>, const char *<[src]>); + char *strcat(char *restrict <[dst]>, const char *restrict <[src]>); TRAD_SYNOPSIS #include <string.h> @@ -61,8 +61,8 @@ QUICKREF char * _DEFUN (strcat, (s1, s2), - char *s1 _AND - _CONST char *s2) + char *__restrict s1 _AND + _CONST char *__restrict s2) { #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) char *s = s1; diff --git a/newlib/libc/string/strncat.c b/newlib/libc/string/strncat.c index 0f29247a8..d31a0302c 100644 --- a/newlib/libc/string/strncat.c +++ b/newlib/libc/string/strncat.c @@ -7,7 +7,8 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *strncat(char *<[dst]>, const char *<[src]>, size_t <[length]>); + char *strncat(char *<restrict [dst]>, const char *<restrict [src]>, + size_t <[length]>); TRAD_SYNOPSIS #include <string.h> @@ -65,8 +66,8 @@ QUICKREF char * _DEFUN (strncat, (s1, s2, n), - char *s1 _AND - _CONST char *s2 _AND + char *__restrict s1 _AND + _CONST char *__restrict s2 _AND size_t n) { #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) diff --git a/newlib/libc/string/strncpy.c b/newlib/libc/string/strncpy.c index 7c1973ba6..ff5d0d409 100644 --- a/newlib/libc/string/strncpy.c +++ b/newlib/libc/string/strncpy.c @@ -7,7 +7,8 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *strncpy(char *<[dst]>, const char *<[src]>, size_t <[length]>); + char *strncpy(char *restrict <[dst]>, const char *restrict <[src]>, + size_t <[length]>); TRAD_SYNOPSIS #include <string.h> @@ -66,8 +67,8 @@ QUICKREF char * _DEFUN (strncpy, (dst0, src0), - char *dst0 _AND - _CONST char *src0 _AND + char *__restrict dst0 _AND + _CONST char *__restrict src0 _AND size_t count) { #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) diff --git a/newlib/libc/string/strtok.c b/newlib/libc/string/strtok.c index 01bb09046..35460ba04 100644 --- a/newlib/libc/string/strtok.c +++ b/newlib/libc/string/strtok.c @@ -13,9 +13,11 @@ INDEX ANSI_SYNOPSIS #include <string.h> - char *strtok(char *<[source]>, const char *<[delimiters]>) - char *strtok_r(char *<[source]>, const char *<[delimiters]>, - char **<[lasts]>) + char *strtok(char *restrict <[source]>, + const char *restrict <[delimiters]>) + char *strtok_r(char *restrict <[source]>, + const char *restrict <[delimiters]>, + char **<[lasts]>) char *strsep(char **<[source_ptr]>, const char *<[delimiters]>) TRAD_SYNOPSIS @@ -92,8 +94,8 @@ extern char *__strtok_r (char *, const char *, char **, int); char * _DEFUN (strtok, (s, delim), - register char *s _AND - register const char *delim) + register char *__restrict s _AND + register const char *__restrict delim) { struct _reent *reent = _REENT; diff --git a/newlib/libc/string/strtok_r.c b/newlib/libc/string/strtok_r.c index 02ad80b9b..6ace7008b 100644 --- a/newlib/libc/string/strtok_r.c +++ b/newlib/libc/string/strtok_r.c @@ -91,9 +91,9 @@ cont: char * _DEFUN (strtok_r, (s, delim, lasts), - register char *s _AND - register const char *delim _AND - char **lasts) + register char *__restrict s _AND + register const char *__restrict delim _AND + char **__restrict lasts) { return __strtok_r (s, delim, lasts, 1); } diff --git a/newlib/libc/string/strxfrm.c b/newlib/libc/string/strxfrm.c index 65ed4f1b1..9d0ab882b 100644 --- a/newlib/libc/string/strxfrm.c +++ b/newlib/libc/string/strxfrm.c @@ -7,7 +7,8 @@ INDEX ANSI_SYNOPSIS #include <string.h> - size_t strxfrm(char *<[s1]>, const char *<[s2]>, size_t <[n]>); + size_t strxfrm(char *restrict <[s1]>, const char *restrict <[s2]>, + size_t <[n]>); TRAD_SYNOPSIS #include <string.h> @@ -52,8 +53,8 @@ QUICKREF size_t _DEFUN (strxfrm, (s1, s2, n), - char *s1 _AND - _CONST char *s2 _AND + char *__restrict s1 _AND + _CONST char *__restrict s2 _AND size_t n) { size_t res; |