regarding using env variable

From: invincible (mohan.bhakri_at_in.bosch.com)
Date: 03/24/05


Date: Thu, 24 Mar 2005 15:44:01 +0530

Hi

I have program

void main()
{
    #ifdef env_var
        printf(" I am in Linux");
    #endif
}

I am using solaris and Linux platform to compile this code. When
i run it on solaris I sould not get any message. But when i run it on
linux i should get "I am in Linux".

This one I can achieve using -dLinux while compiling it on linux

But I dont want to use any variables , is there any inbuilt environment var
which i can use for my required task.

Thanks

Mohan



Relevant Pages

  • Re: Oracle, Solaris, Sparc and Linux
    ... buyout of Sun, that Oracle would destroy Solaris and the hardware ... To which Linux are they migrating? ... that Oracle would destroy Solaris and the hardware aspects ...
    (comp.unix.solaris)
  • Re: Is anything else then Solaris used on UltraSparc Machines.
    ... > familiar with Solaris. ... The same thing cannot be said for Linux. ... Solaris x86 seems better with more expensive hardware whereas Linux ... it for Solaris (SPARC). ...
    (comp.unix.solaris)
  • Re: Is anything else then Solaris used on UltraSparc Machines.
    ... They are just not there right now, just like Linux isn't there ... scalability, real-time support, standards compliance, volume ... > Sure there is a lot of pre-packaged software of Solaris, ... but it is often more hassle on Solaris (even SPARC). ...
    (comp.unix.solaris)
  • Re: Is anything else then Solaris used on UltraSparc Machines.
    ... > I think there are good reasons for using Linux in place of Solaris ... The same thing cannot be said for Linux. ... Solaris x86 seems better with more expensive hardware whereas Linux ... it for Solaris (SPARC). ...
    (comp.unix.solaris)
  • Re: UNIX chess interfaces
    ... If there is a bug it will be noticed much quicker on Linux. ... the developer rarely has access to a Solaris system - although now there is Solaris x86 and Solaris x64, both of which are free downloads, this might change a bit. ... I really wonder whether gcc 4.1.1 would compile eboard on linux either. ...
    (rec.games.chess.computer)