home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!ehfrank
- From: ehfrank@athena.mit.edu (Eliot Frank)
- Newsgroups: comp.unix.xenix.sco
- Subject: Re: dirent and strerror problems in SCO XENIX 2.3?
- Message-ID: <1992Jul24.142347.14388@athena.mit.edu>
- Date: 24 Jul 92 14:23:47 GMT
- References: <466@ahmcs.mq.com>
- Sender: news@athena.mit.edu (News system)
- Organization: Massachusetts Institute of Technology
- Lines: 20
- Nntp-Posting-Host: martha.mit.edu
-
- In article <466@ahmcs.mq.com>, alan@ahmcs.mq.com (Alan Mintz) writes:
- |>
- |> For some reason, in the routines that scan directories for work, the
- |> d_name field in dirent structures seems to start 2 bytes too far into
- |> the structure, chopping off the first two chars of the filename. I
- |> have a hunch that it has to do with the d_off field being of the
- |> wrong type (off_t, which is a long, instead of short).
-
- There are two different and incompatible directory scanning libraries
- in Xenix. If you use the dirent header, you must link with the -ldir
- library. If you use the sys/ndir header, link with -lx. If you mix
- up the libraries you get the off by 2 letters problem.
-
- Unfortunately the dirent routines (/lib/386/Slibdir.a) are buggy.
- In a large directory readdir stops reading after only the first
- block's worth of files. Try to replace Slibdir with a public domain
- version if you can. Otherwise you will have to convert to using the
- sys/ndir version (-lx).
-
- Eliot Frank (ehfrank@athena.mit.edu)
-