Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2002 22:40:46 +0400
From:      "AMI" <ami@lycos.ru>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Recognizing FreeBSD in conditional compilation
Message-ID:  <032601c1f6c8$34eca2a0$0100a8c0@p7>
References:  <200205072152.RAA1412371@shell.TheWorld.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello!

May you can use "negative" logic? For example change your scripts as:

#if defined(__FreeBSD__)
...1..
else
...2..
endif

to

#if defined(__WIN32__)
...2...
else
...1...
endif

WBR,
Andrew

> Hello:
> 
> If I'm writing a C (or C++ ?) program, how can I test for
> building on FreeBSD and/or the FreeBSD version?
> 
> I found "#if defined(__FreeBSD__) ..." in a program, but where
> would I find such manifest constants "officially defined?"
> 
> Thanks,
> 
> -kc



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?032601c1f6c8$34eca2a0$0100a8c0>