]> granicus.if.org Git - graphviz/commit
common: include utils.h and types.h in timing.c also for _WIN32
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 25 Dec 2021 14:50:26 +0000 (15:50 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 25 Dec 2021 21:04:56 +0000 (22:04 +0100)
commit1cf4bc4f90a55298a93d7be76bbaacebc5db9ce4
tree51132f9aa319c6a98c31396d96bd4deb1426b628
parentd8f0129ea8211c3c3918d2440ef174250d760096
common: include utils.h and types.h in timing.c also for _WIN32

This ensures that the timing functions are declared with the
storage-class attributes from utils.h.

An upcoming commit that corrects the storage-class attribute
declarations in utils.h would otherwise cause these errors:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(mincross.o): in function `init_mincross':
/home/magja/graphviz/lib/dotgen/mincross.c:1163: undefined reference to `__imp_start_timer'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(mincross.o): in function `cleanup2':
/home/magja/graphviz/lib/dotgen/mincross.c:996: undefined reference to `__imp_elapsed_sec'

The reason for also including types.h is that utils.h depends on it
without including it itself for unclear reasons.

Note that these functions are also redundantly declared in
timing.h. This file will be removed in an upcoming commit series.

Towards https://gitlab.com/graphviz/graphviz/-/issues/2058.
lib/common/timing.c