summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/time.h3
-rw-r--r--lib/libc/stdtime/strptime.32
-rw-r--r--lib/libc/stdtime/strptime.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/include/time.h b/include/time.h
index dd57670..e17feb3 100644
--- a/include/time.h
+++ b/include/time.h
@@ -143,7 +143,8 @@ struct tm *localtime_r(const time_t *, struct tm *);
#endif
#if __XSI_VISIBLE
-char *strptime(const char *, const char *, struct tm *);
+char *strptime(const char *__restrict, const char *__restrict,
+ struct tm *__restrict);
#endif
#if __BSD_VISIBLE
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3
index e04678d..36ca7e0 100644
--- a/lib/libc/stdtime/strptime.3
+++ b/lib/libc/stdtime/strptime.3
@@ -36,7 +36,7 @@
.Sh SYNOPSIS
.In time.h
.Ft char *
-.Fn strptime "const char *buf" "const char *format" "struct tm *timeptr"
+.Fn strptime "const char *restrict buf" "const char *restrict format" "struct tm *restrict timeptr"
.Sh DESCRIPTION
The
.Fn strptime
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index b050f1a..be84482 100644
--- a/lib/libc/stdtime/strptime.c
+++ b/lib/libc/stdtime/strptime.c
@@ -517,7 +517,8 @@ label:
char *
-strptime(const char *buf, const char *fmt, struct tm *tm)
+strptime(const char *__restrict buf, const char *__restrict fmt,
+ struct tm *__restrict tm)
{
char *ret;
OpenPOWER on IntegriCloud