commit 1604bfd6b0da8e6757d423f5cf3dc528348cd4cb
Author:     Quentin Rameau <[email protected]>
AuthorDate: Wed Feb 22 21:48:55 2017 +0100
Commit:     Quentin Rameau <[email protected]>
CommitDate: Wed Feb 22 22:09:09 2017 +0100

    [libc] Sync src definitions to headers declarations

diff --git a/libc/src/memcpy.c b/libc/src/memcpy.c
index d566fc3..6889ccf 100644
--- a/libc/src/memcpy.c
+++ b/libc/src/memcpy.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 void *
-memcpy(void *dst, const void *src, size_t n)
+memcpy(void * restrict dst, const void * restrict src, size_t n)
 {
        char *s1 = dst;
        const char *s2 = src;
diff --git a/libc/src/strcat.c b/libc/src/strcat.c
index ce8b257..a3522a0 100644
--- a/libc/src/strcat.c
+++ b/libc/src/strcat.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strcat(char *dst, const char *src)
+strcat(char * restrict dst, const char * restrict src)
 {
        char *ret = dst;
 
diff --git a/libc/src/strcpy.c b/libc/src/strcpy.c
index 9e38335..9c4ba86 100644
--- a/libc/src/strcpy.c
+++ b/libc/src/strcpy.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strcpy(char *dst, const char *src)
+strcpy(char * restrict dst, const char * restrict src)
 {
        char *ret = dst;
 
diff --git a/libc/src/strncat.c b/libc/src/strncat.c
index 38e6e74..2a6b0bf 100644
--- a/libc/src/strncat.c
+++ b/libc/src/strncat.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strncat(char *dst, const char *src, size_t n)
+strncat(char * restrict dst, const char * restrict src, size_t n)
 {
        char *ret = dst;
 
diff --git a/libc/src/strncpy.c b/libc/src/strncpy.c
index a1a1456..d2c9121 100644
--- a/libc/src/strncpy.c
+++ b/libc/src/strncpy.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 char *
-strncpy(char *dst, const char *src, size_t n)
+strncpy(char * restrict dst, const char * restrict src, size_t n)
 {
        char *ret = dst;
 
diff --git a/libc/src/strtok.c b/libc/src/strtok.c
index 33c99d1..ca6897e 100644
--- a/libc/src/strtok.c
+++ b/libc/src/strtok.c
@@ -3,11 +3,11 @@
 #include <string.h>
 
 char *
-strtok(const char *s, const char *delim)
+strtok(char * restrict s, const char * restrict delim)
 {
        static char *line;
 
-       if (s) 
+       if (s)
                line = s;
        if (!s && !line)
                return NULL;
diff --git a/libc/src/strxfrm.c b/libc/src/strxfrm.c
index 8ea0140..b38e09c 100644
--- a/libc/src/strxfrm.c
+++ b/libc/src/strxfrm.c
@@ -3,7 +3,7 @@
 #include <string.h>
 
 size_t
-strxfrm(char *dst, const char *src, size_t n)
+strxfrm(char * restrict dst, const char * restrict src, size_t n)
 {
        size_t len = strlen(src);
 

Reply via email to