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:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-06-05 09:15:51 +0000
commit88e49082fb30bfbb54e4c3b7ef2b37a8ae1270f5 (patch)
tree9c40c9856ea0f914b9b37a070964e851dfc4333d /Src/Builtins/rlimits.c
parentd5ffe38c3c3557e5408fdc4514094430f56ca554 (diff)
downloadzsh-88e49082fb30bfbb54e4c3b7ef2b37a8ae1270f5.tar.gz
zsh-88e49082fb30bfbb54e4c3b7ef2b37a8ae1270f5.tar.xz
zsh-88e49082fb30bfbb54e4c3b7ef2b37a8ae1270f5.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 0df671786..f19cdfab9 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -565,7 +565,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