summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/inttypes.h4
-rw-r--r--include/stdlib.h10
-rw-r--r--lib/libc/stdlib/strtod.32
-rw-r--r--lib/libc/stdlib/strtod.c4
-rw-r--r--lib/libc/stdlib/strtoimax.c5
-rw-r--r--lib/libc/stdlib/strtol.36
-rw-r--r--lib/libc/stdlib/strtol.c5
-rw-r--r--lib/libc/stdlib/strtoll.c5
-rw-r--r--lib/libc/stdlib/strtoq.c5
-rw-r--r--lib/libc/stdlib/strtoul.36
-rw-r--r--lib/libc/stdlib/strtoul.c5
-rw-r--r--lib/libc/stdlib/strtoull.c5
-rw-r--r--lib/libc/stdlib/strtoumax.c5
-rw-r--r--lib/libc/stdlib/strtouq.c5
14 files changed, 24 insertions, 48 deletions
diff --git a/include/inttypes.h b/include/inttypes.h
index cd59bed..d2b86dd 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -48,9 +48,9 @@ __BEGIN_DECLS
intmax_t imaxabs(intmax_t) __pure2;
imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2;
+intmax_t strtoimax(const char *__restrict, char **__restrict, int);
+uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
/* XXX: The following functions are missing the restrict type qualifier. */
-intmax_t strtoimax(const char *, char **, int);
-uintmax_t strtoumax(const char *, char **, int);
intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
uintmax_t wcstoumax(const wchar_t *, wchar_t **, int);
__END_DECLS
diff --git a/include/stdlib.h b/include/stdlib.h
index f22f1e1..c3c3cc0 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -114,10 +114,10 @@ void qsort(void *, size_t, size_t,
int rand(void);
void *realloc(void *, size_t);
void srand(unsigned);
-double strtod(const char *, char **);
-long strtol(const char *, char **, int);
+double strtod(const char *__restrict, char **__restrict);
+long strtol(const char *__restrict, char **__restrict, int);
unsigned long
- strtoul(const char *, char **, int);
+ strtoul(const char *__restrict, char **__restrict, int);
int system(const char *);
int mblen(const char *, size_t);
@@ -198,13 +198,13 @@ void srandomdev(void);
#ifdef __LONG_LONG_SUPPORTED
/* LONGLONG */
long long
- strtoll(const char *, char **, int);
+ strtoll(const char *__restrict, char **__restrict, int);
#endif
__int64_t strtoq(const char *, char **, int);
#ifdef __LONG_LONG_SUPPORTED
/* LONGLONG */
unsigned long long
- strtoull(const char *, char **, int);
+ strtoull(const char *__restrict, char **__restrict, int);
#endif
__uint64_t
strtouq(const char *, char **, int);
diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3
index 6922e27..5f3a910 100644
--- a/lib/libc/stdlib/strtod.3
+++ b/lib/libc/stdlib/strtod.3
@@ -49,7 +49,7 @@ string to double
.Sh SYNOPSIS
.In stdlib.h
.Ft double
-.Fn strtod "const char *nptr" "char **endptr"
+.Fn strtod "const char *restrict nptr" "char **restrict endptr"
.Sh DESCRIPTION
The
.Fn strtod
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index 9295583..73765ba 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -1191,9 +1191,9 @@ static double tinytens[] = { 1e-16, 1e-32 };
double
strtod
#ifdef KR_headers
- (s00, se) CONST char *s00; char **se;
+ (s00, se) CONST char *__restrict s00; char **__restrict se;
#else
- (CONST char *s00, char **se)
+ (CONST char *__restrict s00, char **__restrict se)
#endif
{
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
diff --git a/lib/libc/stdlib/strtoimax.c b/lib/libc/stdlib/strtoimax.c
index 5f86e3a..a41c74f 100644
--- a/lib/libc/stdlib/strtoimax.c
+++ b/lib/libc/stdlib/strtoimax.c
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
intmax_t
-strtoimax(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoimax(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
uintmax_t acc;
diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3
index 7c610f7..25acc8a 100644
--- a/lib/libc/stdlib/strtol.3
+++ b/lib/libc/stdlib/strtol.3
@@ -52,12 +52,12 @@ integer
.In stdlib.h
.In limits.h
.Ft long
-.Fn strtol "const char *nptr" "char **endptr" "int base"
+.Fn strtol "const char *restrict nptr" "char **restrict endptr" "int base"
.Ft long long
-.Fn strtoll "const char *nptr" "char **endptr" "int base"
+.Fn strtoll "const char *restrict nptr" "char **restrict endptr" "int base"
.In inttypes.h
.Ft intmax_t
-.Fn strtoimax "const char *nptr" "char **endptr" "int base"
+.Fn strtoimax "const char *restrict nptr" "char **restrict endptr" "int base"
.In sys/types.h
.In stdlib.h
.In limits.h
diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c
index 265b01e..0f9e1ed 100644
--- a/lib/libc/stdlib/strtol.c
+++ b/lib/libc/stdlib/strtol.c
@@ -50,10 +50,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
long
-strtol(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtol(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
unsigned long acc;
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c
index f0c245f..3d0b5c6 100644
--- a/lib/libc/stdlib/strtoll.c
+++ b/lib/libc/stdlib/strtoll.c
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
long long
-strtoll(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoll(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
unsigned long long acc;
diff --git a/lib/libc/stdlib/strtoq.c b/lib/libc/stdlib/strtoq.c
index 78c1b08..a3e37af 100644
--- a/lib/libc/stdlib/strtoq.c
+++ b/lib/libc/stdlib/strtoq.c
@@ -45,10 +45,7 @@ __FBSDID("$FreeBSD$");
* Convert a string to a quad integer.
*/
quad_t
-strtoq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoq(const char *nptr, char **endptr, int base)
{
return strtoll(nptr, endptr, base);
diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3
index 3eb602e..dae6c13 100644
--- a/lib/libc/stdlib/strtoul.3
+++ b/lib/libc/stdlib/strtoul.3
@@ -52,12 +52,12 @@ integer
.In stdlib.h
.In limits.h
.Ft "unsigned long"
-.Fn strtoul "const char *nptr" "char **endptr" "int base"
+.Fn strtoul "const char *restrict nptr" "char **restrict endptr" "int base"
.Ft "unsigned long long"
-.Fn strtoull "const char *nptr" "char **endptr" "int base"
+.Fn strtoull "const char *restrict nptr" "char **restrict endptr" "int base"
.In inttypes.h
.Ft uintmax_t
-.Fn strtoumax "const char *nptr" "char **endptr" "int base"
+.Fn strtoumax "const char *restrict nptr" "char **restrict endptr" "int base"
.In sys/types.h
.In stdlib.h
.In limits.h
diff --git a/lib/libc/stdlib/strtoul.c b/lib/libc/stdlib/strtoul.c
index ba23bd0..ee54a41 100644
--- a/lib/libc/stdlib/strtoul.c
+++ b/lib/libc/stdlib/strtoul.c
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
unsigned long
-strtoul(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoul(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
unsigned long acc;
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c
index bda9e30..08bf118 100644
--- a/lib/libc/stdlib/strtoull.c
+++ b/lib/libc/stdlib/strtoull.c
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
unsigned long long
-strtoull(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoull(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
unsigned long long acc;
diff --git a/lib/libc/stdlib/strtoumax.c b/lib/libc/stdlib/strtoumax.c
index 503fb6b..07206be 100644
--- a/lib/libc/stdlib/strtoumax.c
+++ b/lib/libc/stdlib/strtoumax.c
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
* alphabets and digits are each contiguous.
*/
uintmax_t
-strtoumax(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtoumax(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s;
uintmax_t acc;
diff --git a/lib/libc/stdlib/strtouq.c b/lib/libc/stdlib/strtouq.c
index 8b3e30e..1a14f36 100644
--- a/lib/libc/stdlib/strtouq.c
+++ b/lib/libc/stdlib/strtouq.c
@@ -45,10 +45,7 @@ __FBSDID("$FreeBSD$");
* Convert a string to an unsigned quad integer.
*/
u_quad_t
-strtouq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- int base;
+strtouq(const char *nptr, char **endptr, int base)
{
return strtoull(nptr, endptr, base);
OpenPOWER on IntegriCloud