On 2024-12-17 07:53, Manuela Friedrich wrote:
> It's worth noticing that I had to add -DHAVE_SYS_STAT_H=0 to the tools.ini
> file we use on Windows.
Thanks for mentioning that, but unfortunately I don't know why
-DHAVE_SYS_STAT_H=0 was needed (I don't use MS-Windows).
Some fumbling with Microsoft documentation eventually led me to
<https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170>
which hints (but does not say) that by default MS-Windows <sys/stat.h>
doesn't define the 'stat' function if you use some compilation options.
I installed the attached patch to try to work around this portability
problem. Does this patch fix things so that -DHAVE_SYS_STAT_H=0 need not
be added to tools.ini? If not, what problems do you observe?
With the patch, do you see warnings when compiling? Does compiling with
-D_CRT_SECURE_NO_WARNINGS cut down on the number of warnings?
What's in your tools.ini file for building tzcode?