zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] find RLIM_NLIMITS correctly on Cygwin
@ 2020-01-08 10:39 Jun T
  2020-01-08 21:33 ` Daniel Shahaf
  0 siblings, 1 reply; 38+ messages in thread
From: Jun T @ 2020-01-08 10:39 UTC (permalink / raw)
  To: zsh-workers

On Cygwin, <sys/resource.h> has lines like:

#define RLIMIT_NLIMITS  7       /* upper bound of RLIMIT_* defines */
#define RLIM_NLIMITS    RLIMIT_NLIMITS

but rlimits.awk fails to find the value of RLIM_NLIMITS
(and sets ZSH_NLIMITS to zero).



diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk
index e9c576c66..4cf960314 100644
--- a/Src/Builtins/rlimits.awk
+++ b/Src/Builtins/rlimits.awk
@@ -79,6 +79,12 @@ BEGIN {limidx = 0}
     split(limtail, tmp)
     nlimits = tmp[2]
 }
+# for Cygwin
+/^[\t ]*#[\t ]*define[\t ]*RLIM_NLIMITS[\t ]*RLIMIT_NLIMITS/ {
+    if (!nlimits && limrev["NLIMITS"]) {
+      nlimits = limrev["NLIMITS"]
+    }
+}
 
 END {
     if (limrev["MEMLOCK"] != "") {



^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2020-03-25 23:43 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 10:39 [PATCH] find RLIM_NLIMITS correctly on Cygwin Jun T
2020-01-08 21:33 ` Daniel Shahaf
2020-01-09 10:32   ` Jun T
2020-01-09 13:15     ` Daniel Shahaf
2020-01-10 10:24       ` Jun T
2020-01-11 20:15         ` Daniel Shahaf
2020-01-13 11:00           ` Jun T
2020-01-13 16:42             ` Daniel Shahaf
2020-01-14  4:44               ` Jun T
2020-01-14 16:25                 ` Daniel Shahaf
2020-02-25  9:38                   ` Jun T
2020-02-27 13:22                     ` Daniel Shahaf
2020-02-27 18:46                       ` Mikael Magnusson
2020-02-28  8:42                       ` Jun T
2020-02-28 14:19                         ` Daniel Shahaf
2020-02-28 14:31                           ` Daniel Shahaf
2020-03-03  9:23                           ` Jun T
2020-03-04 19:29                             ` Daniel Shahaf
2020-03-05 10:26                               ` Jun T
2020-03-05 14:58                                 ` Daniel Shahaf
2020-03-20 17:02                             ` Daniel Shahaf
2020-03-20 17:20                               ` Bart Schaefer
2020-03-20 17:39                                 ` Daniel Shahaf
2020-03-20 18:28                                   ` Daniel Shahaf
2020-03-20 18:36                                     ` Bart Schaefer
2020-03-20 19:38                                       ` Daniel Shahaf
2020-03-20 18:39                                     ` Bart Schaefer
2020-03-20 19:32                                       ` Daniel Shahaf
2020-03-20 19:18                     ` Daniel Shahaf
2020-03-23  5:31                       ` Jun T
2020-03-24  2:08                         ` Daniel Shahaf
2020-03-23  5:41                       ` Jun T
2020-03-24  1:33                         ` Jun T
2020-03-24  2:43                           ` Daniel Shahaf
2020-03-25  0:16                             ` Jun T
2020-03-25 22:04                               ` Daniel Shahaf
2020-03-25 23:42                                 ` [PATCH] find RLIM_NLIMITS correctly on CygwinjL Daniel Shahaf
2020-03-24  2:34                         ` [PATCH] find RLIM_NLIMITS correctly on Cygwin Daniel Shahaf

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).