Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: handle Haiku specific rlimit



This avoids the test failure for an unknown resource limit on Haiku OS
by adding a test and description for it. Their sys/resource.h includes a
comment so it was possible to identify it and establish that it doesn't
have any associated unit.

Oliver

diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c
index 5f9c84b0f..f25dd2530 100644
--- a/Src/Builtins/rlimits.c
+++ b/Src/Builtins/rlimits.c
@@ -171,6 +171,10 @@ static const resinfo_T known_resources[] = {
     {RLIMIT_TCACHE, "cachedthreads", ZLIMTYPE_NUMBER, 1,
 		'N', "cached threads"},
 # endif
+# ifdef HAVE_RLIMIT_NOVMON  /* Haiku */
+    {RLIMIT_NOVMON, "vnodemonitors", ZLIMTYPE_NUMBER, 1,
+		'N', "open vnode monitors"},
+# endif
 };
 
 /* resinfo[RLIMIT_XXX] points to the corresponding entry
diff --git a/configure.ac b/configure.ac
index a88101f2b..bd54c72af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1908,6 +1908,7 @@ zsh_LIMIT_PRESENT(RLIMIT_NPTS)
 zsh_LIMIT_PRESENT(RLIMIT_SWAP)
 zsh_LIMIT_PRESENT(RLIMIT_KQUEUES)
 zsh_LIMIT_PRESENT(RLIMIT_UMTXP)
+zsh_LIMIT_PRESENT(RLIMIT_NOVMON)
 
 zsh_LIMITS_EQUAL(VMEM, vmem, RSS, rss)
 zsh_LIMITS_EQUAL(VMEM, vmem, AS, as)




Messages sorted by: Reverse Date, Date, Thread, Author