Date: Thu, 16 Jan 2003 10:58:50 -0700 (MST) From: "M. Warner Losh" <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 Message-ID: <20030116.105850.128048106.imp@bsdimp.com> In-Reply-To: <20030117033631.F3152-100000@gamplex.bde.org> References: <20030116051916.E58850@espresso.q9media.com> <20030117033631.F3152-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030117033631.F3152-100000@gamplex.bde.org> Bruce Evans <bde@zeta.org.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030116.105850.128048106.imp>