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

  1. From: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn)
  2.  
  3. In article <437@longway.TIC.COM> Andy Tanenbaum <uunet!cs.vu.nl!ast> writes:
  4. >From: Andy Tanenbaum <uunet!cs.vu.nl!ast>
  5. >
  6. >The <dirent.h> header is required by P1003.1 to have a field
  7. >    d_name []
  8. >
  9. >Now the question arises about what size to use there.  One possibility is
  10. >    d_name[NAME_MAX+1]
  11. >
  12.  
  13. At least three implementations that I know of define dname as follows:
  14.  
  15.     d_name[1];
  16.  
  17. And, they put it at the end of the strucutre.  In this way, when the
  18. structure is allocated, the implementation may allocate enough space for
  19. the directory name, no matter what it is.  For a good, publicly available
  20. example, you might want to check out Doug Gwyn's dirent library.
  21.  
  22. -- 
  23. Mark H. Colburn                       mark@Minnetech.MN.ORG
  24. Open Systems Architects, Inc.
  25.  
  26. Volume-Number: Volume 17, Number 71
  27.  
  28.  
  29.