emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs & MAXPATHLEN


From: Richard M. Stallman
Subject: Re: emacs & MAXPATHLEN
Date: Sat, 30 Jul 2005 19:44:19 -0400

    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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]