Remove configure probe for sys/resource.h and refactor. <sys/resource.h> is in SUSv2 and is on all targeted Unix systems. We have a replacement for getrusage() on Windows, so let's just move its declarations into src/include/port/win32/sys/resource.h so that we can use a standard-looking #include. Also remove an obsolete reference to CLK_TCK. Also rename src/port/getrusage.c to win32getrusage.c, following the convention for Windows-only fallback code.
Reviewed-by: Tom Lane <t...@sss.pgh.pa.us> Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/36b3d52459aecd4f8bc39a4604e42186c48aa9d2 Modified Files -------------- configure | 14 +++++++------- configure.ac | 3 +-- src/backend/storage/file/fd.c | 4 +--- src/backend/tcop/postgres.c | 10 ++-------- src/bin/pg_ctl/pg_ctl.c | 6 ++---- src/bin/pgbench/pgbench.c | 2 -- src/include/pg_config.h.in | 3 --- src/include/port/win32/sys/resource.h | 20 +++++++++++++++++++ src/include/rusagestub.h | 31 ------------------------------ src/include/utils/pg_rusage.h | 7 +------ src/port/{getrusage.c => win32getrusage.c} | 11 +++-------- src/test/regress/pg_regress.c | 7 ++----- src/tools/msvc/Mkvcbuild.pm | 3 ++- src/tools/msvc/Solution.pm | 1 - src/tools/pginclude/cpluspluscheck | 5 +---- src/tools/pginclude/headerscheck | 4 ---- 16 files changed, 42 insertions(+), 89 deletions(-)