diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-02-22 08:11:02 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-02-22 08:15:53 -0800 |
commit | 2ec3579f296fdea783a806179424b28b2f3c0100 (patch) | |
tree | 7c95de848e0926aa2dad3bc1d49bebe766b25b12 /docs/images/vs2010_link1.png | |
parent | 9bb468b3a960421b2ae3a3f232fbda477f42d2f4 (diff) |
Work around gcc issues with limits.h not defining LLONG_MIN
It looks like there are several cases where this might happen:
- In some MinGW distributions, the LLONG_MIN/etc defines are guarded
with:
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
Which means that you don't get them in strict ANSI mode. The previous
workaround was specifically targeted towards this.
- In some GCC distributions (notably GCC 6.3.0 in some configurations),
LLONG_MIN/etc. defines are guarded with:
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
But __STDC_VERSION__ isn't defined as C99 even if you use -std=c++14 -
which is probably technically valid, but not useful.
To work around this, redefine the symbols whenever we are building with
GCC and we need them and they aren't defined - doing this is better than
not building. Instead of hard-coding the constants, use GCC-specific
__LONG_LONG_MAX__ to compute them.
Fixes #181.
Diffstat (limited to 'docs/images/vs2010_link1.png')
0 files changed, 0 insertions, 0 deletions