From owner-freebsd-questions Wed May 8 12:41:11 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailbox-10.st1.spray.net (mailbox-10.st1.spray.net [212.78.202.110]) by hub.freebsd.org (Postfix) with ESMTP id 71FF337B411 for ; Wed, 8 May 2002 12:40:34 -0700 (PDT) Received: from p7 ([213.33.246.102]) by mailbox-10.st1.spray.net (8.8.8/8.8.8) with SMTP id VAA01537 for ; Wed, 8 May 2002 21:40:30 +0200 (MEST) Posted-Date: Wed, 8 May 2002 21:40:30 +0200 (MEST) Message-ID: <032601c1f6c8$34eca2a0$0100a8c0@p7> From: "AMI" To: References: <200205072152.RAA1412371@shell.TheWorld.com> Subject: Re: Recognizing FreeBSD in conditional compilation Date: Wed, 8 May 2002 22:40:46 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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