home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16605 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.8 KB  |  49 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!sgi!quasar.mti.sgi.com!davea
  3. From: davea@quasar.mti.sgi.com (David B.Anderson)
  4. Subject: Re: Bug in SGI ansi compliance (or are the others wrong ?)
  5. Message-ID: <shbha4k@sgi.sgi.com>
  6. Sender: davea@quasar.mti.sgi.com
  7. Organization: Silicon Graphics, Inc.  Mountain View, CA
  8. Date: Wed, 18 Nov 1992 19:13:23 GMT
  9. Lines: 38
  10.  
  11. In article <SUHONEN.92Nov18084151@jalka.jyu.fi> suhonen@jalka.jyu.fi (Timo Suhonen) writes:
  12. >kevin@tamri.com (Kevin Dalley) writes:
  13. >
  14. >   Look at SGI's header files sometime.  A lot of things are slightly or
  15. >   badly broken when using "-ansi" because "sgi" is not defined.  Of
  16. >   course "__sgi__" is defined, but the header files usually say "#ifdef
  17. >   sgi".  A few functions are left undefined; a few macros are defined
  18. >   incorrectly; some structures are defined incorrectly.  Because of this
  19. >   problem, you may want to stay away from "-ansi" completely.
  20. >
  21. >Would you please list undefined functions, incorrect macro definitions
  22. >and incorrect struct definitions. The list could help programmers to
  23. >avoid broken definitions.
  24.  
  25. The use of "sgi" in headers is traditional.  But times have changed
  26. and now only "__sgi" is really correct in headers we provide.
  27. We goofed.
  28.  
  29. In a future release, -xansi will imply __STDC__=1  by popular demand.
  30. In the meantime, I suggest you use
  31.     -xansi -D__STDC__=1
  32. routinely.  
  33. This defines "sgi" so the header problems "vanish".
  34. This avoids the problems with compiling lex(1) created C files which 
  35. were noted recently in this newsgroup.
  36.  
  37. Useful things in the basic headers (as basic as math.h) are
  38. not visible with -ansi.
  39. Try
  40.     -Dsgi
  41. on the command line if you use -ansi and want to avoid problems with
  42. the headers Mr. Dalley refers to.
  43.  
  44. Hope this helps a little.
  45. [ David B. Anderson             (415)390-4263             davea@sgi.com ]
  46.  
  47.  
  48.  
  49.