strptime.3: SYNOPSIS: Use 'restrict' in prototypes

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>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-03-10 19:31:43 +01:00 committed by Michael Kerrisk
parent b0ef498bd8
commit 746d60af80
1 changed files with 2 additions and 1 deletions

View File

@ -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