From owner-cvs-all Fri Jan 10 12:24:23 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 547D037B401; Fri, 10 Jan 2003 12:24:22 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F6A543F1E; Fri, 10 Jan 2003 12:24:21 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id h0AKOFoT029703; Fri, 10 Jan 2003 15:24:15 -0500 (EST) Date: Fri, 10 Jan 2003 15:24:15 -0500 (EST) From: Daniel Eischen To: Garrett Wollman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio Makefile.inc unlocked.c In-Reply-To: <200301101832.h0AIWjBS026224@khavrinen.lcs.mit.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 10 Jan 2003, Garrett Wollman wrote: > < said: > > > For functions that aren't defined by POSIX or other specs, we should > > use "__" versions of those functions with the non-"__" versions being > > weak definitions to them. > > Not necessarily. That is only true if: > > (1) The calling function is either Standard or in the same source file > as a Standard function, and > > (2) the function called is not already in a namespace reserved by the > Standard. They are all in unlocked.c, so are clearerr* and filno* reserved by POSIX? Plus it would eliminate a function call/return to implement clearerr_unlocked and fileno_unlocked as just: __weak_reference(clearerr_unlocked, __sclearerr); __weak_reference(fileno_unlocked, __sfileno); Actually, you could do the same with the others too, no? -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message