From owner-freebsd-questions@freebsd.org Sat Sep 5 14:18:36 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 ADC8E9C9095 for ; Sat, 5 Sep 2015 14:18:36 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64DF5A7C for ; Sat, 5 Sep 2015 14:18:36 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-222-143.knology.net [216.186.222.143] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t85EIY4E025421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 5 Sep 2015 09:18:35 -0500 Subject: Re: GCC question References: <55EAEE19.2060807@hiwaay.net> <20150905140658.GA790@ozzmosis.com> Cc: FreeBSD Questions !!!! From: "William A. Mahaffey III" Message-ID: <55EAF9BA.3080700@hiwaay.net> Date: Sat, 5 Sep 2015 09:24:04 -0453.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150905140658.GA790@ozzmosis.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Sat, 05 Sep 2015 14:18:36 -0000 On 09/05/15 09:13, andrew clarke wrote: > 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 > *Booooyah* !!!! Both worked AOK. I haven't used gcc in a while, so there may be a few more noob-ish questions to follow :-/ .... Thanks again & have a nice weekend. -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.