* memcpy.2: missing restrict keyword
@ 2020-12-27 20:01 Heinrich Schuchardt
2020-12-28 9:25 ` Alejandro Colomar (man-pages)
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-12-27 20:01 UTC (permalink / raw)
To: Michael Kerrisk (man-pages); +Cc: linux-man
Hello Michael,
Since C99 the memcpy is defined as
void *memcpy(void* restrict dst, const void* restrict src, size_t n);
Shouldn't the restrict keyword be shown in the prototype on the man-page?
Other concerned functions include:
memccpy(), strcat(), strncat, strcpy(), strncpy(), strxfrm(), strtok(),
strtok_r(), printf()-family, fcvt_r(), strtoimax()-family,
getmntent_r(), ...
Just grep for restrict in the standard includes.
Best regards
Heinrich
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: memcpy.2: missing restrict keyword
2020-12-27 20:01 memcpy.2: missing restrict keyword Heinrich Schuchardt
@ 2020-12-28 9:25 ` Alejandro Colomar (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2020-12-28 9:25 UTC (permalink / raw)
To: Heinrich Schuchardt, Michael Kerrisk (man-pages); +Cc: linux-man
Hi Heinrich,
I agree. That's on my todo list.
I'm first fixing the prototypes for syscalls, which have significant
deviations, then I'll have a look at glibc wrappers, and then I'll fix
glibc library calls.
Thanks,
Alex
On 12/27/20 9:01 PM, Heinrich Schuchardt wrote:
> Hello Michael,
>
> Since C99 the memcpy is defined as
>
> void *memcpy(void* restrict dst, const void* restrict src, size_t n);
>
> Shouldn't the restrict keyword be shown in the prototype on the man-page?
>
> Other concerned functions include:
>
> memccpy(), strcat(), strncat, strcpy(), strncpy(), strxfrm(), strtok(),
> strtok_r(), printf()-family, fcvt_r(), strtoimax()-family,
> getmntent_r(), ...
>
> Just grep for restrict in the standard includes.
>
> Best regards
>
> Heinrich
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-28 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 20:01 memcpy.2: missing restrict keyword Heinrich Schuchardt
2020-12-28 9:25 ` Alejandro Colomar (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.