Did you check to be sure it isn't in /usr/include/sys/errno.h or something
like that? (sys is often a symlink to somewhere, and if you do a find on
/usr/include, it won't follow symlinks unless you tell it to...)
Please try compiling the attached program just to be sure it really won't
work. I sortof expect that some systems won't have ENAMETOOLONG, but I
would expect Linux to. sigh.
The other option, as suggested, is to remove multiple '/'s in a row,
however I am not convinced that will solve all the problems.
On Sat, 11 Jan 1997, Jason Clary wrote:
>
>
> I don't see any definitions for this anywhere in linux. And the man page
> on stat only says it returns EBADF and ENOENT
>
> EBADF is "filedes is bad", I'm not exactly clear on what that means,
> it could, I suppose, be the same thing as ENAMETOOLONG (or effectively
> the same, anyways).. it means something other than ENOENT obviously which
> means the file doesn't exist.
>
> Just in case, I did a recursive grep on /usr/include and turned
> up no definition of ENAMETOLONG anywhere.
>
> >
> > Randy Terbush wrote:
> > >
> > > > No. The trick is that right now we are saying that a failure to stat
> > > > the path (while looking for the index file) means the file doesn't
> > > > exist, so there is no index file, so make a directory listing.
> > > >
> > > > However, there are other reasons that stat can fail.
> > > >
> > > > How portable would a check something like
> > > >
> > > > if (errno == ENAMETOOLONG) { refuse the request or something }
> > > >
> > > > be?
> > >
> > > This looks OK on FreeBSD, BSDI, and Solaris 2.5.
> > >
> >
> > Also with various SysV systems like A/UX and AIX
> >
> > --
> > ====================================================================
> > Jim Jagielski | jaguNET Access Services
> > jim@jaguNET.com | http://www.jaguNET.com/
> > "Not the Craw... the CRAW!"
> >
>
|