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.

It's better to try to get the cwd than not try.
It might work.  And if it doesn't, we have lost nothing.

Someone wrote:

    In my opinion it is better to alloc directly MAXPATHLEN+1 bytes
    when that limit exists without entering the loop and use multiple
    reallocations.

It's best to keep the code simple, all else being equal,
and reduce the number of conditionals.

Eliz wrote:

    ??? How can a file name on a system be ever longer than MAXPATHLEN,
    which is a system-dependent limit?

Do mkdir -p /a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z, then
rename each directory one by one from the bottom upward to a long
name, and whoopee!  This was first done on Multics, and resulted
in a file that could not be deleted except by renaming the directories
back to short names, from the top down.

I think it was called a Frankston bush.




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

Reply via email to