shithub: scc

Download patch

ref: 0663aab4168efce2a70f907b7d723c1c85122c27
parent: 8445aa34b12fc07d8bb64247dd8a6ebada174dfe
author: Michael Forney <mforney@mforney.org>
date: Sat Apr 20 05:51:18 EDT 2019

Adjust some definitions to match declaration in usage of `restrict`

--- a/src/libc/stdio/fgets.c
+++ b/src/libc/stdio/fgets.c
@@ -2,7 +2,7 @@
 #undef fgets
 
 char *
-fgets(char *s, int n, FILE *fp)
+fgets(char * restrict s, int n, FILE * restrict fp)
 {
 	int ch = 0;
 	char *t = s;
--- a/src/libc/stdio/vfprintf.c
+++ b/src/libc/stdio/vfprintf.c
@@ -187,7 +187,7 @@
 }
 
 int
-vfprintf(FILE * restrict fp, const char *fmt, va_list va)
+vfprintf(FILE * restrict fp, const char * restrict fmt, va_list va)
 {
 	int ch, n, flags, width, left, fill, cnt = 0;
 	size_t inc, len;
--- a/src/libc/stdio/vprintf.c
+++ b/src/libc/stdio/vprintf.c
@@ -3,7 +3,7 @@
 #undef vprintf
 
 int
-vprintf(const char *fmt, va_list ap)
+vprintf(const char * restrict fmt, va_list ap)
 {
 	va_list ap2;
 
--- a/src/libc/stdlib/strtol.c
+++ b/src/libc/stdlib/strtol.c
@@ -9,7 +9,7 @@
 #undef strtol
 
 long
-strtol(const char *s, char **end, int base)
+strtol(const char * restrict s, char ** restrict end, int base)
 {
 	int d, sign = -1;
 	long n;
--- a/src/libc/stdlib/strtoll.c
+++ b/src/libc/stdlib/strtoll.c
@@ -9,7 +9,7 @@
 #undef strtoll
 
 long long
-strtoll(const char *s, char **end, int base)
+strtoll(const char * restrict s, char ** restrict end, int base)
 {
 	int d, sign = -1;
 	long long n;
--- a/src/libc/stdlib/strtoul.c
+++ b/src/libc/stdlib/strtoul.c
@@ -9,7 +9,7 @@
 #undef strtoul
 
 unsigned long
-strtoul(const char *s, char **end, int base)
+strtoul(const char * restrict s, char ** restrict end, int base)
 {
 	int d, sign = 1;
 	unsigned long n;
--- a/src/libc/stdlib/strtoull.c
+++ b/src/libc/stdlib/strtoull.c
@@ -9,7 +9,7 @@
 #undef strtoull
 
 unsigned long long
-strtoull(const char *s, char **end, int base)
+strtoull(const char * restrict s, char ** restrict end, int base)
 {
 	int d, sign = 1;
 	unsigned long long n;