X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=BAYES_20 X-Spam-Check-By: sourceware.org Date: Mon, 24 Aug 2009 10:57:23 -0700 From: Keith Thompson To: cygwin AT cygwin DOT com Cc: Keith Thompson Subject: Error in memset man page Message-ID: <20090824175723.GA1245@nuthaus.mib.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com "man memset" shows the following synopsis for the memset function: #include 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 ' | 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 ". -- Keith Thompson (The_Other_Keith) kst AT mib DOT org 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