Build error on Windows 10 of version 9.5.10 using Visual Studio 2015
Steps:
extract source
copy tools\msvc\config_default.pl to tools\msvc\config.pl and put in
custom path to our build of openssl
clean.bat
build.bat
zic.exe fails to compile with an internal fatal error from the
CompilerDriver.
I wound up having to change this function (zic.c:1811)
static void
convert(const int32 val, char *const buf)
{
int i;
int shift;
unsigned char *const b = (unsigned char *) buf;
for (i = 0, shift = 24; i < 4; ++i, shift -= 8)
b[i] = val >> shift;
}
to look like this:
static void
convert(const int32 val, char *const buf)
{
unsigned char *const b = (unsigned char *) buf;
b[0] = val >> 24;
b[1] = val >> 16;
b[2] = val >> 8;
b[3] = val >> 0;
}
I tried moving the next function (convert64) up above that function to see
if it was just griping about the "first" instance of the val >> shift, but
strangely it had no issue compiling convert64 and still failing on
convert. Several devs here were surprised it would compile essentially the
same exact code for one function, but not the other. Whether this was
truly a bug, or perhaps a problem with the system I tried it on I leave to
your investigation. Since there is no real difference in functionality, I
proceeded with the change and my compile.
Kenneth Reister <reister.kenneth@cimcor.com> writes:
zic.exe fails to compile with an internal fatal error from the
CompilerDriver.
Odd --- I can't see what's wrong with that code, either.
However, zic.c is not really our code: we get it from the IANA timezone
group, and are loath to make private changes except when really necessary.
If you want to pursue this, please report the problem to those guys:
https://www.iana.org/time-zones
I imagine the tz@iana.org mailing list is the right place to discuss it.
regards, tom lane