From owner-freebsd-questions@freebsd.org Sun Sep 6 02:10:45 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E35439CB54B for ; Sun, 6 Sep 2015 02:10:45 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by mx1.freebsd.org (Postfix) with ESMTP id C893B1E32 for ; Sun, 6 Sep 2015 02:10:45 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a42.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) by hapkido.dreamhost.com (Postfix) with ESMTP id AE548C562D for ; Sat, 5 Sep 2015 07:07:08 -0700 (PDT) Received: from homiemail-a42.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTP id A985168C05D; Sat, 5 Sep 2015 07:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ozzmosis.com; h=date:from :to:cc:subject:message-id:references:mime-version:content-type: in-reply-to; s=ozzmosis.com; bh=6nn00QubSCj5usoHdiyLahll4UQ=; b= HJQOJjGS/iG+Q2fOlAb0Cejo3zcAfff0wDlrNGTzrIoE2Bf3F+FE67CbV5N4sDGe D1brNTaeyKVrCyD0UujsaXfUCRohB6WKAIhcPMk3tq5msPNMP7mPxGJENL1oU+Pb 8Gz/dJfDZ8pKLwZ62Q0pf6YVaSJXgPgxLeN6CfqCVE4= Received: from blizzard.ozzmosis.com (203-206-116-141.dyn.iinet.net.au [203.206.116.141]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: relay@ozzmosis.com) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTPSA id 770D468C058; Sat, 5 Sep 2015 07:07:01 -0700 (PDT) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id AF42938B; Sun, 6 Sep 2015 00:06:58 +1000 (AEST) Date: Sun, 6 Sep 2015 00:06:58 +1000 From: andrew clarke To: "William A. Mahaffey III" Cc: FreeBSD Questions !!!! Subject: Re: GCC question Message-ID: <20150905140658.GA790@ozzmosis.com> References: <55EAEE19.2060807@hiwaay.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55EAEE19.2060807@hiwaay.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 02:10:46 -0000 On Sat 2015-09-05 08:34:27 UTC-0453, William A. Mahaffey III (wam@hiwaay.net) wrote: >> I have some code which was originally SGI native, then moved to Linux > (FC14 x86_64 & CentOS 5). I am now interested in getting it going under > FreeBSD 9.3R. Due to differences in system header file includes, I need > to tweek some of my app-specific header files. I have poked around the > (*COPIOUS* !!!!) GCC man page & I couldn't find (or missed) either how > to get it to regurgitate its default compiler-defines or a tabulation of > those defines, so I can use them to conditionally include system headers > in my own header files. Where is this info :-) ? TIA & have a nice > (long) weekend. You probably want: gcc -dM -E - < /dev/null Ordinarily to detect FreeBSD you'd use: #ifdef __FreeBSD__ ... #endif