[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error while compiling base
From: |
David Chisnall |
Subject: |
Re: error while compiling base |
Date: |
Wed, 17 Feb 2010 23:03:59 +0000 |
On 17 Feb 2010, at 22:44, Richard Frith-Macdonald wrote:
> No, it's a typo made when converting from using the old, reliable,
> LONG_LONG_MAX (basically worked on every platform except perhaps BSD, and
> used to be the default but is now the fallback mechanism) to the newer c99
> standard (which works on most modern platforms and is now the default, but
> used to be the fallback mechanism).
Ah, fair enough.
> I know you are a BSD person, but the reality is that GNUstep is GNU software
> and uses the GNU compiler (GCC) ... so saying something 'will break anywhere
> except GNU platforms' is actually pretty close to saying that it will break
> anywhere that GNUstep doesn't run, and sounds perilously like a religious
> argument.
Not at all. It's from limits.h, which is provided by libc. The C standard
defines LLONG_MAX. GNU libc and HP-UX libc define LONG_LONG_MAX, but most
other libc's that I checked don't. AIX defines LONGLONG_MAX, others define
their own flavour, in addition to the standard LLONG_MAX. Both the long long
type and the LLONG_MAX macro in limits.h were defined at the same time, as part
of C99.
GCC, on the other hand, has a built-in __LONG_LONG_MAX__, which is set by the
compiler based on the target triple and is used on some libc versions to
initialise LLONG_MAX. I'd have no problems with your using __LONG_LONG_MAX__,
since, as far as I know, this works on all existing Objective-C compilers that
support a long long data type.
Unless I'm mistaken, GNUstep runs on a lot of non-GNU platforms. If this isn't
the case, maybe someone should delete some of the 11 listed here (not counting
duplicates for different versions or CPU architectures):
http://gnustep.org/resources/documentation/User/GNUstep/machines_toc.html
This is contrasted with just GNU/Linux listed on the same page, although I did
manage to get GNUstep running on GNU/OpenSolaris a while ago, and I believe
others have run it on GNU HURD. We probably also work on GNU/kFreeBSD, meaning
that we only support about three times as many non-GNU platforms as GNU
platforms.
David
-- Sent from my IBM 1620