14 character file names

Sean Eric Fagan sef at kithrup.COM
Thu Feb 7 19:20:54 AEST 1991


In article <ANDYC.91Feb4134215 at bucky.intel.com>, andyc at bucky.intel.com
(Andy Crump) writes:
>These
>utilities, IMHO, should check the filesystem type before making these
>decisions.

More to the point, they should all use pathconf and/or fpathconf to find out
how large filenames may be.  This way, the same program will work on all
filesystems that support the pathconf call (which should actually be all of
them).

Note, unfortunately, that there are problems with this.  If a system call
returns ENAMETOOLONG, and PATH_MAX is undefined, it is non-trivial to find
out whether the problem was due to the pathname being too long, or if a
certain portion of the pathname contained an entry whose name was too long.
But it's "portable"! 8-)

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef at kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.



More information about the Comp.unix.sysv386 mailing list