From owner-freebsd-questions Tue May 7 18:29:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-43.dsl.lsan03.pacbell.net [63.207.60.43]) by hub.freebsd.org (Postfix) with ESMTP id E797137B41F for ; Tue, 7 May 2002 18:28:55 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 3706C66DCB; Tue, 7 May 2002 18:28:55 -0700 (PDT) Date: Tue, 7 May 2002 18:28:55 -0700 From: Kris Kennaway To: Kenneth W Cochran Cc: freebsd-questions@freebsd.org Subject: Re: Recognizing FreeBSD in conditional compilation Message-ID: <20020507182855.B61098@xor.obsecurity.org> References: <200205072152.RAA1412371@shell.TheWorld.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200205072152.RAA1412371@shell.TheWorld.com>; from kwc@TheWorld.com on Tue, May 07, 2002 at 05:52:50PM -0400 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 --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 07, 2002 at 05:52:50PM -0400, Kenneth W Cochran wrote: > Hello: >=20 > If I'm writing a C (or C++ ?) program, how can I test for > building on FreeBSD and/or the FreeBSD version? >=20 > I found "#if defined(__FreeBSD__) ..." in a program, but where > would I find such manifest constants "officially defined?" See the Porter's Handbook. Kris --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE82H9WWry0BWjoQKURAkmqAJ4+wyaa0dMrmZK8aZgkoFPAtL7u1QCg00ig tMe+oEuYTTZzkW83uZ3gw+o= =3PXz -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message