Date: Mon, 9 Sep 2002 20:52:38 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Christopher Vance <vance@aurema.com> Cc: "David O'Brien" <obrien@FreeBSD.ORG>, Garrett Wollman <wollman@lcs.mit.edu>, <current@FreeBSD.ORG>, <kan@FreeBSD.ORG> Subject: Re: No way to tell when `long long' is or is not supported? Message-ID: <20020909204406.P6401-100000@gamplex.bde.org> In-Reply-To: <20020909194232.A25660@aurema.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <limits.h> > #ifdef LLONG_MAX > > Surely we get to determine the contents of our own limits.h files? 1) Namespace pollution. Standard headers other than <limits.h> are not permitted to define LLONG_MAX. 2) A non-broken <limits.h> would need much the same ifdefs as <sys/cdefs.h> for determining whether the compiler and/or standard supports long long. <limits.h> 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 <limits.h> #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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020909204406.P6401-100000>