Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <42E62B36.4000506@byu.net> Date: Tue, 26 Jul 2005 06:23:18 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: James McLaughlin CC: cygwin AT cygwin DOT com Subject: Re: gcc-core and g++ source References: <20050726114441 DOT 60159 DOT qmail AT web31702 DOT mail DOT mud DOT yahoo DOT com> In-Reply-To: <20050726114441.60159.qmail@web31702.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to James McLaughlin on 7/26/2005 5:44 AM: > I've been wondering about why functions such as strcpy > return char*, instead of being void, so I thought I'd > look at the source for this function and see if there > were any informative comments. However, while I've got > the g++ and gcc-core source, I can't find the source > for the standard functions - can anyone > tell me which file to look in? gcc does not provide it; look at newlib/libc/string/strcpy.c instead (I look at newlib CVS, so I'm not sure which package in setup.exe provides the newlib source snapshot used for the current build). And as to why it returns char* and not void, it is because the C language and POSIX require it to do so. And as a result, you can do things like: strcat (strcpy (dest, source), ".exe"); > > In fact, is there any sort of document detailing where > to find the source for the functions defined in , say, > header ? (organised by header)? If not, are there > any plans to include such a document in the Cygwin > docs? Only if someone (how about you?) volunteers to write them. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC5is284KuGfSFAYARAnApAKCkfevcoHEJR2/E5hqneXWcdDNr6ACbBrf0 HWoBg6W24ljgyOn/azVRmj0= =18kh -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/