From owner-cvs-all Thu Jan 16 11: 2: 6 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 33C8637B401; Thu, 16 Jan 2003 11:02:05 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B5E143E4A; Thu, 16 Jan 2003 11:02:04 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id h0GJ211e040721; Thu, 16 Jan 2003 12:02:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 16 Jan 2003 10:58:50 -0700 (MST) Message-Id: <20030116.105850.128048106.imp@bsdimp.com> To: bde@zeta.org.au Cc: mike@FreeBSD.org, johan@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdlib realpath.3 realpath.c src/bin/realpath realpath.c From: "M. Warner Losh" In-Reply-To: <20030117033631.F3152-100000@gamplex.bde.org> References: <20030116051916.E58850@espresso.q9media.com> <20030117033631.F3152-100000@gamplex.bde.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 In message: <20030117033631.F3152-100000@gamplex.bde.org> Bruce Evans writes: : Only {PATH_MAX} has a better definition, but we use PATH_MAX. gcc : extensions don't handle the case where PATH_MAX is not a compile time : constant. "char wbuf[PATH_MAX];" doesn't compile if PATH_MAX is not : defined. "char wbuf[sysconf(_SC_PATH_MAX)];" would fail to handle the : cases where sysconf() returns an error. Even in the MAXPATHLEN case, there are potential problems. It wouldn't work if, say, the stack was exhausted when the function was called. You have to draw the line at some classes of errors and say they won't happen enough to be worth the effort it is to code them up. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message