I also wonder whether we should keep the "#ifdef MAXPATHLEN"
   branch, or just use the loop below on all platforms that have
   getcwd.

If MAXPATHLEN is defined, it should be respected, if you try to use a
file name that is longer than MAXPATHLEN then the behaviour of the
system is undefined.  Maybe just something like:

#ifdef MAXPATHLEN
  if (buf_size >= MAXPATHLEN)
    break;
#endif

Would be sufficient for platforms with MAXPATHLEN, and then just use
that in the loop.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to