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