From owner-cvs-all Wed Jan 15 23:57:16 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 778AE37B401; Wed, 15 Jan 2003 23:57:15 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8807A43E4A; Wed, 15 Jan 2003 23:57:14 -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 h0G7vD1e036904; Thu, 16 Jan 2003 00:57:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 16 Jan 2003 00:57:08 -0700 (MST) Message-Id: <20030116.005708.96919189.imp@bsdimp.com> To: mike@FreeBSD.org Cc: 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: <20030115183943.D58850@espresso.q9media.com> References: <200301152122.h0FLMtdE034299@repoman.freebsd.org> <20030115183943.D58850@espresso.q9media.com> 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: <20030115183943.D58850@espresso.q9media.com> Mike Barcroft writes: : Johan Karlsson writes: : > johan 2003/01/15 13:22:55 PST : > : > Modified files: : > lib/libc/stdlib realpath.3 realpath.c : > bin/realpath realpath.c : > Log: : > realpath(3) should use PATH_MAX instead of MAXPATHLEN according to POSIX. : > : > This also reverts the PATH_MAX -> MAXPATHLEN part of : > rev 1.3 of src/bin/realpath/realpath.c : > : > Requested by: imp : > Reviewed by: imp, bde : > : > Revision Changes Path : > 1.5 +1 -1 src/bin/realpath/realpath.c : > 1.12 +2 -2 src/lib/libc/stdlib/realpath.3 : > 1.12 +7 -7 src/lib/libc/stdlib/realpath.c : : Hmm, I thought it was more complicated than this. IIRC, PATH_MAX : isn't necessarily available at compile-time, so it needs more : complications to conform to POSIX in the case where PATH_MAX isn't : defined. Portablility might not be important, in which case it : isn't clear why we would change from MAXPATHLEN to PATH_MAX or vice : versa. I made this change because PATH_MAX is more posixly correct than MAXPATHLEN and has a better definition. It only handles the case where PATH_MAX is a compile time constant, or when you are using gcc extensions that allow one to allocate memory on the fly. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message