This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Error in memset man page
- From: Keith Thompson <kst at mib dot org>
- To: cygwin at cygwin dot com
- Cc: Keith Thompson <kst at mib dot org>
- Date: Mon, 24 Aug 2009 10:57:23 -0700
- Subject: Error in memset man page
"man memset" shows the following synopsis for the memset function:
#include <string.h>
void *memset(const void *DST, int C, size_t LENGTH);
The "const" on the first parameter is incorrect. The correct
prototype according to the C standard (both C90 and C99) is:
void *memset(void *s, int c, size_t n);
(The differing parameter names are ok.)
The problem is only in the documentation; the actual declaration
doesn't have the const:
% echo '#include <string.h>' | gcc -E - | grep memset
void * __attribute__((__cdecl__)) memset (void *, int, size_t);
This was found by a poster on comp.lang.c calling himself
"Noob <root@127.0.0.1>".
--
Keith Thompson (The_Other_Keith) kst@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple