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

  1. From: gwyn@BRL.MIL (Doug Gwyn)
  2.  
  3. In article <437@longway.TIC.COM> Andy Tanenbaum <uunet!cs.vu.nl!ast> writes:
  4. >Now the question arises about what size to use there.  One possibility is
  5. >    d_name[NAME_MAX+1]
  6. >However, doing this means that <limits.h> must be included.
  7.  
  8. You, the implementer, could manually replace that NAME_MAX with the
  9. appropriate value (perhaps found by inspecting <limits.h>).  This is
  10. the same issue as occurs when declaring v*printf() in <stdio.h>; the
  11. related header need not (nay, MUST not) be included, but a compatible
  12. type (or value in the NAME_MAX case) must be used.
  13.  
  14. >What's an implementer to do?
  15.  
  16. What I did in my implementation was to cheat:
  17.     char    d_name[1];
  18. We were careful to word the IEEE Std 1003.1 specification so that
  19. this is explicitly allowed.
  20.  
  21. Volume-Number: Volume 17, Number 66
  22.  
  23.  
  24.