From owner-freebsd-current Mon Sep 9 3:45: 7 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 0C3A737B400; Mon, 9 Sep 2002 03:45:05 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA14043E4A; Mon, 9 Sep 2002 03:45:03 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA13728; Mon, 9 Sep 2002 20:44:57 +1000 Date: Mon, 9 Sep 2002 20:52:38 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Christopher Vance Cc: "David O'Brien" , Garrett Wollman , , Subject: Re: No way to tell when `long long' is or is not supported? In-Reply-To: <20020909194232.A25660@aurema.com> Message-ID: <20020909204406.P6401-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Mon, 9 Sep 2002, Christopher Vance wrote: > On Mon, Sep 09, 2002 at 01:10:46AM -0700, David O'Brien wrote: > : > Rather than trying to deduce whether `long long' is supported from > : > other macros, I simply modified the compiler driver to tell us. > > What's wrong with > > #include > #ifdef LLONG_MAX > > Surely we get to determine the contents of our own limits.h files? 1) Namespace pollution. Standard headers other than are not permitted to define LLONG_MAX. 2) A non-broken would need much the same ifdefs as for determining whether the compiler and/or standard supports long long. is not permitted to define LLONG_MA if the standard is C90 but currently defines it unconditionally. The syntax error in the definition of LLONG_MAX doesn't cause many problems for C90 compilers because the macro is not normally used in C90 environment. A test like: #include #if LLONG_MAX > 0 would have syntax errors. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message