[comp.unix.questions] How to get a file's info from C

gwyn@smoke.BRL.MIL (Doug Gwyn) (05/25/90)

In article <1990May24.172957.7421@dg-rtp.dg.com> goudreau@larrybud.rtp.dg.com (Bob Goudreau) writes:
>If portability between Sys V and BSD is your goal, then the readdir()
>& stat() approach will put you up the same kind of creek as ls will;
>the two systems use a different interface to readdir().  (In fact,
>my V.2 manual doesn't even show a readdir() entry at all; it appears
>the function didn't appear in System V until V.3 was released.)

However, you can obtain a portable implementation of an SVR3-compatible
dirent library from me for use on UNIX systems like pre-4.4BSD flavors
that don't have a POSIX-compliant dirent library.  You can edit your
Makefiles to use this add-on library (and headers) until such time as
your native system is brought up to date.