home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / xenix / sco / 2566 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  1.5 KB

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