Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 2002 01:10:46 -0700
From:      "David O'Brien" <obrien@FreeBSD.org>
To:        Garrett Wollman <wollman@lcs.mit.edu>
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>
In-Reply-To: <200209090350.g893oHMs062192@khavrinen.lcs.mit.edu>
References:  <200209090350.g893oHMs062192@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020909081046.GB26978>