From owner-freebsd-current Mon Sep 9 1:10:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5138637B400; Mon, 9 Sep 2002 01:10:47 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDC8543E65; Mon, 9 Sep 2002 01:10:46 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.6/8.12.2) with ESMTP id g898AkfO054921; Mon, 9 Sep 2002 01:10:46 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.6/8.12.5/Submit) id g898AkRf054920; Mon, 9 Sep 2002 01:10:46 -0700 (PDT) Date: Mon, 9 Sep 2002 01:10:46 -0700 From: "David O'Brien" To: Garrett Wollman Cc: current@FreeBSD.org, kan@FreeBSD.org Subject: Re: No way to tell when `long long' is or is not supported? Message-ID: <20020909081046.GB26978@dragon.nuxi.com> Reply-To: obrien@FreeBSD.org Mail-Followup-To: David O'Brien , Garrett Wollman , current@FreeBSD.org, kan@FreeBSD.org References: <200209090350.g893oHMs062192@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209090350.g893oHMs062192@khavrinen.lcs.mit.edu> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 08, 2002 at 11:50:17PM -0400, Garrett Wollman wrote: > Rather than trying to deduce whether `long long' is supported from > other macros, I simply modified the compiler driver to tell us. Looking at GCC on other platforms, "_LONGLONG" seems to be the most preferred symbol. How does this patch look? We can't get this 100% correct as there is no way to match "iso9899:1990" and "iso9899:199409" as ':' is a token already. The only way to do this correctly is to add it to c-common.c and c-opt.c looking at the value of the various "flag_iso*" variables. Index: freebsd-spec.h =================================================================== RCS file: /home/ncvs/src/contrib/gcc/config/freebsd-spec.h,v retrieving revision 1.3 diff -u -r1.3 freebsd-spec.h --- freebsd-spec.h 9 Sep 2002 06:56:29 -0000 1.3 +++ freebsd-spec.h 9 Sep 2002 07:23:58 -0000 @@ -98,6 +105,7 @@ %{munderscores: -D__UNDERSCORES__} \ %{maout: %{!mno-underscores: -D__UNDERSCORES__}} \ %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ + %{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}}\ %{posix:-D_POSIX_SOURCE}" /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message