mouring at etoh.eviladmin.org
2001-Feb-12 16:23 UTC
openssh bugs in snapshot for nextstep (fwd)
I was sent this from Mark Miller. Should we be using MAXPATHLEN instead of PATH_MAX in the upstream tree? Not all systems define PATH_MAX. - Ben --- sftp-int.c.orig Sat Feb 10 13:56:08 2001 +++ sftp-int.c Sun Feb 11 23:33:26 2001 @@ -435,5 +435,5 @@ unsigned long n_arg; Attrib a, *aa; - char path_buf[PATH_MAX]; + char path_buf[MAXPATHLEN]; path1 = path2 = NULL; -- _/ mark miller _/ markm at swoon.net _/ _/ NeXTmail OK
Circa 2001-Feb-12 10:23:38 -0600 dixit mouring at etoh.eviladmin.org: : I was sent this from Mark Miller. Should we be using MAXPATHLEN : instead of PATH_MAX in the upstream tree? Not all systems define : PATH_MAX. Isn't MAXPATHLEN the BSD name for PATH_MAX? I would suggest rather something like: #ifndef PATH_MAX # ifndef MAXPATHLEN # define MAXPATHLEN <some-arbitrary-value> # endif # define PATH_MAX MAXPATHLEN #endif where <some-arbitrary-value> is, if possible, guessed from the operating system, or at the very least chosen intelligently. -- jim knoble | jmknoble at jmknoble.cx | http://www.jmknoble.cx/