[m-rev.] diff: fix a build problem on Mac OS X
Julien Fischer
jfischer at opturion.com
Tue Mar 26 13:50:07 AEDT 2013
On Tue, Mar 26, 2013 at 1:31 PM, Paul Bone <paul at bone.id.au> wrote:
> On Tue, Mar 26, 2013 at 01:07:19PM +1100, Julien Fischer wrote:
>> Fix a build problem on Mac OS X.
>>
>> library/int.m:
>> LLONG_{MIN,MAX} are the standard (C99) names for the limits
>> of the long long int type; use them in preference to LONG_LONG_{MIN,MAX},
>> which are a GNU C thing.
>>
>> Make the use of the above macros conditional on them actually being
>> defined since we cannot guarantee that they will be defined if the
>> C compiler is not in C99 mode (or something similar to it).
>>
>
> Thanks, I just hit this problem on Linux.
>
> Why not try LLONG_MAX and if it fails fallback to LONG_LONG_MAX.
I can't think of a compiler that supports the latter that won't
support the former.
It's only an issue for architectures that use the LLP64 data model anyway.
For everything else LLONG_MAX is fine, just so long as you don't cause a
syntax error due to an undefined macro.
Cheers,
Julien.
>
>
> --
> Paul Bone
> http://www.bone.id.au
More information about the reviews
mailing list