With the attached diff (don't commit this, it's a lot simpler than a final commit would be, which would include some ifdef'ing with USG_COMPAT or another macro) I can get things to compile and get programs to successfully run which use daylight and timezone, when CFLAGS is set to '-DUSG_COMPAT=1 -DHAVE_POSIX_DECLS=0' However, even with this diff, if CFLAGS is set only to -DUSG_COMPAT=1 I get the output as in newusgcompat.txt. On Sat, Nov 23, 2019 at 3:50 AM Andras Farkas <deepbluemistake@gmail.com> wrote:
FreeBSD doesn't support the int daylight or long timezone in time.h itself. tzcode supports them on OSes which already support them, like OpenBSD. I'm trying to figure out if it should be possible to compile tzcode to support daylight and timezone even on OSes which don't support them.
I've saved the output of make (both stdout and stderr) when CFLAGS is set to -DUSG_COMPAT=1 alone into usgcompat.txt I've saved the output of make (both stdout and stderr) when CFLAGS is set to '-DUSG_COMPAT=1 -DHAVE_POSIX_DECLS=0' into both.txt
What I'm seeing is that the OS's time.h is being included, under both configurations.
This topic originated in this thread: http://mm.icann.org/pipermail/tz/2019-November/028596.html http://mm.icann.org/pipermail/tz/2019-November/thread.html