From owner-freebsd-arch Mon Nov 1 12:55:56 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id D5F22152B9 for ; Mon, 1 Nov 1999 12:55:43 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id VAA07828 for ; Mon, 1 Nov 1999 21:55:35 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id VAA75322 for freebsd-arch@freebsd.org; Mon, 1 Nov 1999 21:55:35 +0100 (MET) Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 2E342152B9 for ; Mon, 1 Nov 1999 12:40:15 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40351>; Tue, 2 Nov 1999 07:34:44 +1100 Content-return: prohibited Date: Tue, 2 Nov 1999 07:40:02 +1100 From: Peter Jeremy Subject: Re: stpcpy() In-reply-to: To: freebsd-arch@freebsd.org Reply-To: peter.jeremy@alcatel.com.au Message-Id: <99Nov2.073444est.40351@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0pre3i Content-type: text/plain; charset=us-ascii References: <199910312349.CAA02684@tejblum.pp.ru> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1999-Nov-01 12:24:10 +1100, Randell Jesup wrote: > I'll bet 95% of programmers working on systems where >stpcpy has been part of the libraries for a long time don't even know that >it isn't standard. If programmers expect to write portable code then they need to know what functions are standard. > I don't know about you, but I code for systems where >cutting CPU usage by 1% can actually make a real difference in the field >and to costs. Do you also factor in the extra maintenance costs associated with relying on non-standard functionality? > While non-ANSI standard, this particular function has been >virtually standard in PC compilers for a Long Time. I don't have it in front of me, but I'm fairly certain that my Amiga Lattice C manual lists it as a Lattice extension. Given that (AFAIK) M$ C started as Lattice C, I wouldn't be surprised if it started with Lattice. Matthew Dillon or bde (as long time compiler writers) might be able to offer further insight into its ancestry. > Like I said, near the >start of this, probably for more than a decade it's been in every >DOS/Win/Amiga/OS2/etc compiler I've used I don't recall ever seeing it in a Unix library (ignoring Linux for the time being) - which is probably more relevant here. stpcpy(3) on a local Linux system states: "This function is not part of the ANSI or POSIX standards, and is not customary on Unix systems, but is not a GNU invention either. Perhaps it comes from MS-DOS." Overall, I would not like to see stpcpy() appear in libc, though I have nothing against it being included in some compatibility library. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message