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

  1. From: karish@forel.stanford.edu (Chuck Karish)
  2.  
  3. In article <479@longway.TIC.COM> uunet!cbnewsd.ATT.COM!jrstu
  4. (james.stuhlmacher,ih,) wrote:
  5. >From: jrstu@cbnewsd.ATT.COM (james.stuhlmacher)
  6. >
  7. >I was told by someone that the POSIX standard does not allow
  8. >including <sys/type.h> in any of the other include files such as
  9. ><grp.h>.  Is this true?  I could not find this anywhere in the book. 
  10. >If it is true, why is this the case? 
  11.  
  12. Is this necessary?  A portable application that uses <grp.h> had better
  13. #include <sys/types.h> itself anyway, so it will have type gid_t
  14. available on an implementation that does not use the nested
  15. #includes.
  16.  
  17. There's no specific prohibition in the standard.  However, it's a
  18. non-trivial task to implement the headers in such a way that this is
  19. safe.  The implementation must not surprise the programmer by
  20. providing an unexpected typedef or function prototype that could
  21. legally be coded directly into a program.
  22.  
  23.     Chuck Karish        karish@mindcraft.com
  24.     (415) 323-9000        karish@forel.stanford.edu
  25.  
  26. Volume-Number: Volume 17, Number 107
  27.  
  28.  
  29.