Remove configure probe for sys/resource.h and refactor.
authorThomas Munro <tmunro@postgresql.org>
Sat, 13 Aug 2022 11:35:24 +0000 (23:35 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sat, 13 Aug 2022 12:09:47 +0000 (00:09 +1200)
commit36b3d52459aecd4f8bc39a4604e42186c48aa9d2
tree15a7b1211cac9a9fcb193e3eb4984cbe73cb1b8a
parent37a65d1db14658bc75faa3aea7bd5a064118d135
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 <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com
16 files changed:
configure
configure.ac
src/backend/storage/file/fd.c
src/backend/tcop/postgres.c
src/bin/pg_ctl/pg_ctl.c
src/bin/pgbench/pgbench.c
src/include/pg_config.h.in
src/include/port/win32/sys/resource.h [new file with mode: 0644]
src/include/rusagestub.h [deleted file]
src/include/utils/pg_rusage.h
src/port/win32getrusage.c [moved from src/port/getrusage.c with 88% similarity]
src/test/regress/pg_regress.c
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm
src/tools/pginclude/cpluspluscheck
src/tools/pginclude/headerscheck