home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.18 / text0076.txt < prev    next >
Encoding:
Internet Message Format  |  1990-03-18  |  2.1 KB

  1. From: Doug Gwyn <uunet!smoke.brl.mil!gwyn>
  2.  
  3. In article <563@longway.TIC.COM> std-unix@uunet.uu.net writes:
  4. >    Which symbols from the ANSI C header namespace are guaranteed to
  5. >    be available to a Strictly Conforming POSIX Application?
  6.  
  7. There are two 1003.1 conforming C environments, C standard and common-usage C.
  8. In the C standard environment, those portions of the C standard referenced by
  9. 1003.1-1988 Chapter 8 are required for implementation conformance.  While
  10. section 8.1 lists only the specific standard C functions that 1003.1 requires
  11. to be supported, it also stipulates that the requirements in the indiciated
  12. sections of the C standard be obeyed.  Those do include macro definitions and
  13. external object declarations, as well as function declarations.
  14. In fact 1003.1-1988 section 8.2.1.2 refers to the C language stdin, etc. so
  15. clearly 1003.1 intends that these have meaning.
  16.  
  17. 1003.1 cleverly side-stepped the issue of defining what the cited functions
  18. should do for the "common-usage C" binding to 1003.1, which makes that pretty
  19. much a nonstandard flavor of the standard that you should avoid specifying in
  20. procurement contracts etc..
  21.  
  22. 1003.1, even in the C standard binding variant, does not mandate full ANSI/ISO
  23. C standard conformance; however, it does require that the implementor announce
  24. clearly that he does not conform to the C standard if in fact that is the
  25. case.
  26.  
  27. >Specific question:
  28. >    Can a Strictly Conforming POSIX Application use "stdin", for
  29. >    example by calling "getc(stdin)"?
  30.  
  31. Yes.
  32.  
  33. >Arguments about the specific question:
  34. >No, because...
  35. >    ...The POSIX Standard specifically names the symbols and terms
  36. >       adopted from the C Standard, in section 2.8.1, and stdin is
  37. >       not among them.
  38.  
  39. Section 2.8.1 is not an exclusive list; other symbols (e.g. those in section
  40. 8.1) are also required, and by the argument I gave above so are stdin, etc.
  41.  
  42. What I recommend is that when specifying acquisition of a system you always
  43. specify ANSI C conformance in addition to IEEE 1003.1 conformance.  1003.1
  44. was never intended to stand independently of the standard C library.
  45.  
  46. Volume-Number: Volume 18, Number 78
  47.  
  48.