about summary refs log tree commit diff
path: root/Src/Builtins/rlimits.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-06-05 09:15:33 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-06-05 09:15:33 +0000
commit5d010ca81a11d65fca5029644a349a2cd12f6c3b (patch)
tree36442d453c731fcd701f0f378f259f063efbac65 /Src/Builtins/rlimits.c
parent5221570c4a7e5670edd96d9b4a871bbe9649bc55 (diff)
downloadzsh-5d010ca81a11d65fca5029644a349a2cd12f6c3b.tar.gz
zsh-5d010ca81a11d65fca5029644a349a2cd12f6c3b.tar.xz
zsh-5d010ca81a11d65fca5029644a349a2cd12f6c3b.zip
17285: David Wolfe <dwolfe@gforcetech.com>: finally fix QNX rlimits problem
Diffstat (limited to 'Src/Builtins/rlimits.c')
-rw-r--r--Src/Builtins/rlimits.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c
index 3db47f866..7d20ab07b 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -571,7 +571,9 @@ bin_ulimit(char *name, char **argv, char *ops, int func)
 # ifdef RLIMIT_MEMLOCK
 	    case RLIMIT_MEMLOCK:
 # endif /* RLIMIT_MEMLOCK */
-# ifdef RLIMIT_VMEM
+/* If RLIMIT_VMEM and RLIMIT_RSS are defined and equal, avoid *
+ * duplicate case statement.  Observed on QNX Neutrino 6.1.0. */
+# if defined(RLIMIT_VMEM) && (!defined(RLIMIT_RSS) || RLIMIT_RSS != RLIMIT_VMEM)
 	    case RLIMIT_VMEM:
 # endif /* RLIMIT_VMEM */
 # ifdef RLIMIT_AIO_MEM