[csw-maintainers] #ifdef's for solaris versions

Maciej (Matchek) Bliziński maciej at opencsw.org
Mon Sep 9 00:14:16 CEST 2013


2013/9/8 Juraj Lutter <wilbury at opencsw.org>:
> To make long story short:
>
> On Solaris, gcc and sunstudio(?) #defines "sun" and gcc defines also
> "__sun" so
>
> #if defined(sun) || defined(__sun)
> ...
> #endif
>
> will compile block on Solaris plarform.

It has been described in our porting FAQ:
http://wiki.opencsw.org/porting-faq#toc22

But this isn't what Riccardo asked. He wanted to detect whether we're
on e.g. Solaris 9 or Solaris 10.

Maciej


More information about the maintainers mailing list