From owner-freebsd-questions@FreeBSD.ORG Sat Apr 5 12:36:56 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D97F937B401 for ; Sat, 5 Apr 2003 12:36:56 -0800 (PST) Received: from out004.verizon.net (out004pub.verizon.net [206.46.170.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id E851F43FCB for ; Sat, 5 Apr 2003 12:36:55 -0800 (PST) (envelope-from cswiger@mac.com) Received: from mac.com ([129.44.43.88]) by out004.verizon.net (InterMail vM.5.01.05.27 201-253-122-126-127-20021220) with ESMTP id <20030405203655.EYDH11006.out004.verizon.net@mac.com>; Sat, 5 Apr 2003 14:36:55 -0600 Message-ID: <3E8F3E5C.304@mac.com> Date: Sat, 05 Apr 2003 15:36:44 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out004.verizon.net from [129.44.43.88] at Sat, 5 Apr 2003 14:36:55 -0600 Subject: Compiler defines for FreeBSD, was: Re: [Directoryadmin-list]compile trouble X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 20:36:57 -0000 Andy Harrison wrote: > I was wondering if any of you guys could help this guy out. I tried to > download and compile his app and it didn't go so smoothly. He ask me a > question about detecting freebsd that I couldn't answer. Anyone know a way he > could accomplish this? Thanx! "gcc -v" suggests __FreeBSD__: [ ... ] gcc version 2.95.4 20020320 [FreeBSD] /usr/libexec/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -D__FreeBSD__=4 -D__FreeBSD_cc_version=460001 -Dunix -D__i386__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=460001 -D__unix__ -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ /tmp/a.c /tmp/ccDlMXAX.i ...although using OS-specific defines is not particularly graceful. -Chuck