zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: handle Haiku specific rlimit
@ 2024-09-13  1:21 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2024-09-13  1:21 UTC (permalink / raw)
  To: Zsh workers

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-13  1:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-13  1:21 PATCH: handle Haiku specific rlimit Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).