home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.17 / text0063.txt < prev    next >
Encoding:
Internet Message Format  |  1990-01-06  |  794 b 

  1. From: Andy Tanenbaum <uunet!cs.vu.nl!ast>
  2.  
  3. In article <442@longway.TIC.COM> gwyn@brl.arpa (Doug Gwyn) writes:
  4. >That's what happens when programmers assume things that are not promised
  5. >by the standards.
  6. I don't follow.  What is it that that the standards don't promise.  Surely
  7. a programmer may declare a struct dirent, since readdir() returns a pointer
  8. to one of them.  Furthermore, a programmer may assume that d_name is an
  9. array of characters that can hold a file name.  I don't see how you can
  10. put a file name in 1 character.  I don't see any alternative than to
  11. allocate NAME_MAX+1 characters there.  Why doesn't the standard require
  12. <dirent.h> to have <limits.h> as a prerequisite, so that NAME_MAX
  13. is at least known.
  14.  
  15. Andy Tanenbaum (ast@cs.vu.nl)
  16.  
  17. Volume-Number: Volume 17, Number 72
  18.  
  19.  
  20.