Re: [PATCH] git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX
- From
- Tor Arntsen <tor@spacetec.no>
- Date
- Jun 2, 2010, 09:56 UTC
- Message-ID
- <AANLkTinvmNM_nKQnZNgQMWstrevG4RfcjW7RdCILVLYF@mail.gmail.com>
- In-Reply-To
- <4gJWLBIdRVtK7gq22o-LadCixyvOA-9FlEvk-ZrCHyUsGwArvR9oPkV-qlez-T-Nsn0v6UO633Y@cipher.nrlssc.navy.mil>
On Wed, Jun 2, 2010 at 03:55, Brandon Casey <casey@nrlssc.navy.mil> wrote:
Show 6 quoted lines
> From: Gary V. Vaughan <git@mlists.thewrittenword.com> > > IRIX 6.5.26m does not define the 'sgi' macro, but it does define an '__sgi' > macro. Since later IRIX versions (6.5.29m) define both macros, and since > an underscore prefixed macro is preferred anyway, use '__sgi' to detect > compilation on SGI IRIX.
Yes, __sgi is the one to use. It's been there on all the SGI systems I've used, at least back to IRIX 5.3 (I don't recall for sure about 4.0.5 but my guess is yes). 'sgi' is often there too, also on IRIX 6.2 (with the old MIPS compiler), but on both 6.2 and 6.5 it goes away if you use certain other options, e.g. -ansi. __sgi, on the other hand, is always there - it doesn't depend on any other compiler options.
-Tor