Re: dirent

Snow Cat (snowcat@gd.cs.csufresno.edu)
Sun, 25 Jun 1995 12:05:48 -0700 (PDT)


H.J. Lu once wrote:
> >
> > Hi,
> >
> > Is there any plan to support correct and separate d_reclen and d_namlen in
> > struct dirent in future? It appears that currently readdir() returns d_reclen
> > that is useless to a user - a size of structure aligned to a 4-byte boundary
> > (?). I think on most other system it's EXACT structure size. d_namlen is
> > probably used by a lot of GNU and BSD programs. Other systems I have seen have
> > both reclen and namlen.
> >
> > It was my impression that under linux 1.2 and libc 5.0.x d_reclen was actually
> > set to strlen(dir -> d_name). If so, shouldn't it be just renamed to d_namlen
> > instead of having to recompile and patch make and other existing binaries?
> >
>
> That is a system call, readdir, old/getdents, new. I only takes
> whatever returned from the kernel. The current dirent is the

Meaning that now libc returns different d_reclen when running under v1.2 and
v1.3? And if I compile make under v1.3 users running v1.2 won't be able to
run it. How about compatibility between libc 5.0.x and libc 5.1.x?

> same as SVR4/Solaris. I don't want to change that.
>

Well, but how about POSIX, Hurd or BSD 4.4?

-- 
     Snow ^oo^ Cat <snowcat@gd.cs.CSUFresno.EDU>
      _  ->  <-    aka Oleg Kibirev <oleg@gd.cs.CSUFresno.EDU>
  ___(_)  _ _)_
 /            _)
 \_.-._
       |___/	Purr!