From bdb657edd6db1e471437d62f4642674a801ef32c Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Fri, 5 Aug 2022 09:18:34 +1200 Subject: Remove configure probe and related tests for getrlimit. getrlimit() is in SUSv2 and all targeted systems have it. Windows doesn't have it. We could just use #ifndef WIN32, but for a little more explanation about why we're making things conditional, let's retain the HAVE_GETRLIMIT macro. It's defined in port.h for Unix systems. On systems that have it, it's not necessary to test for RLIMIT_CORE, RLIMIT_STACK or RLIMIT_NOFILE macros, since SUSv2 requires those and all targeted systems have them. Also remove references to a pre-historic alternative spelling of RLIMIT_NOFILE, and coding that seemed to believe that Cygwin didn't have it. Reviewed-by: Tom Lane Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com --- src/test/regress/pg_regress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 982801e029d..04ab513b7cb 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -129,7 +129,7 @@ static void psql_end_command(StringInfo buf, const char *database); /* * allow core files if possible. */ -#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE) +#if defined(HAVE_GETRLIMIT) static void unlimit_core_size(void) { @@ -2229,7 +2229,7 @@ regression_main(int argc, char *argv[], initialize_environment(); -#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE) +#if defined(HAVE_GETRLIMIT) unlimit_core_size(); #endif -- cgit v1.2.3