Description:
_INTEGRAL_MAX_BITS shouldn't be redefined in include/config-win.h , because its value is system-specific and should be
According to msdn:
1. _INTEGRAL_MAX_BITS - Reports the maximum size (in bits) for an integral type.
http://msdn.microsoft.com/en-us/library/b0084kay(VS.80).aspx
2. Fundamental types in C++ are divided into three categories: integral, floating, and void. Integral types are capable of handling whole numbers.
http://msdn.microsoft.com/en-us/library/cc953fe1(VS.80).aspx
So, this symbol is predefined (in my understanding it is equal to
sizeof(long long) or sizeof(__int64), if exists.
Redefinition may result in complex problems.
E.g. on some Windows 32 (XP, 2003, 2008) installations I am getting many errors like:
Error 25 error C2466: cannot allocate an array of constant size 0 C:\Program Files\Microsoft Visual Studio 8\VC\include\sys\stat.inl 44
Error 273 error C3861: '_wctime64': identifier not found C:\Program Files\Microsoft Visual Studio 8\VC\include\wtime.inl 50
Workaround: After wrapping line #66 in include/config-win.h
#define _INTEGRAL_MAX_BITS 32
with
#ifndef _INTEGRAL_MAX_BITS
...
compilation goes smoothly.
How to repeat:
See MSDN with links above and include/config-win.h
Suggested fix:
Do not redefine _INTEGRAL_MAX_BITS