[PATCH 17/24] strptime.3: SYNOPSIS: Use 'restrict' in prototypes

Alejandro Colomar
2021-03-10T18:33:09Z

Both POSIX and glibc use 'restrict' in strptime().
However, glibc doesn't specify 'restrict' for the last parameter.
Let's use the most restrictive form here
(although I believe both to be equivalent).

.../glibc$ grep_glibc_prototype strptime
time/time.h:95:
extern char *strptime (const char *__restrict __s,
const char *__restrict __fmt, struct tm *__tp)
__THROW;
.../glibc$

Cc: <libc-alpha@sourceware.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man3/strptime.3 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man3/strptime.3 b/man3/strptime.3
index c1a66ffc0..30c6f59df 100644
--- a/man3/strptime.3
+++ b/man3/strptime.3
@@ -36,7 +36,8 @@ strptime \- convert a string representation of time to a time tm structure
.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
.B #include <time.h>
.PP
-.BI "char *strptime(const char *" s ", const char *" format ", struct tm *" tm );
+.BI "char *strptime(const char *restrict " s ", const char *restrict " format ,
+.BI " struct tm *restrict " tm );
.fi
.SH DESCRIPTION
The
--
2.30.1.721.g45526154a5