From 71a6f8b85b9f748dc7f33c1212c4474e8beb901a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 7 Oct 2006 19:25:29 +0000 Subject: On platforms that have getrlimit(RLIMIT_STACK), use it to ensure that max_stack_depth is not set to an unsafe value. This commit also provides configure-time checking for , and cleans up some perhaps-unportable code associated with use of that include file and getrlimit(). --- src/include/utils/pg_rusage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/utils') diff --git a/src/include/utils/pg_rusage.h b/src/include/utils/pg_rusage.h index 32e409076e..bb11812da8 100644 --- a/src/include/utils/pg_rusage.h +++ b/src/include/utils/pg_rusage.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/pg_rusage.h,v 1.2 2006/03/05 15:59:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/pg_rusage.h,v 1.3 2006/10/07 19:25:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ #include -#ifdef HAVE_GETRUSAGE +#ifdef HAVE_SYS_RESOURCE_H #include #else #include "rusagestub.h" -- cgit v1.2.1