about summary refs log tree commit diff
path: root/Src/Builtins/rlimits.awk
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-05-21 17:02:59 +0000
committerClint Adams <clint@users.sourceforge.net>2001-05-21 17:02:59 +0000
commitf670ec692ff2b10708d1d5b6f4f87d2ba9f65bdd (patch)
tree67b696761d31bd6ddbbb5a65c336d07650336675 /Src/Builtins/rlimits.awk
parent0a159d0f73eaea35c91dfc1377316b6a0f374a8d (diff)
downloadzsh-f670ec692ff2b10708d1d5b6f4f87d2ba9f65bdd.tar.gz
zsh-f670ec692ff2b10708d1d5b6f4f87d2ba9f65bdd.tar.xz
zsh-f670ec692ff2b10708d1d5b6f4f87d2ba9f65bdd.zip
14419: glibc 2.2.3 rlimits enum
Diffstat (limited to 'Src/Builtins/rlimits.awk')
-rw-r--r--Src/Builtins/rlimits.awk13
1 files changed, 12 insertions, 1 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk
index f90fc3d7b..5542c6cef 100644
--- a/Src/Builtins/rlimits.awk
+++ b/Src/Builtins/rlimits.awk
@@ -6,7 +6,7 @@
 #
 BEGIN {limidx = 0}
 
-/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z_]*,[\t ]*)/ {
+/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z_]*,[\t ]*|RLIMIT_[A-Z_]*[\t ]*=[\t ]*[0-9][0-9]*,[\t ]*)/ {
     limindex = index($0, "RLIMIT_")
     limtail = substr($0, limindex, 80)
     split(limtail, tmp)
@@ -18,6 +18,11 @@ BEGIN {limidx = 0}
 	limindex = index($0, ",")
 	limnam = substr(limnam, 1, limindex-1)
     }
+    if (limnum == "=") {
+	limnum = limidx++
+	limindex = index($0, ",")
+	limnam = substr(limnam, 1, limindex-1)
+    }
     limrev[limnam] = limnum
     if (lim[limnum] == "") {
 	lim[limnum] = limnam
@@ -53,6 +58,12 @@ BEGIN {limidx = 0}
 /^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*RLIMIT_NLIMITS/ {
     nlimits = limidx
 }
+/^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ {
+    limindex = index($0, "=")
+    limtail = substr($0, limindex, 80)
+    split(limtail, tmp)
+    nlimits = tmp[2]
+}
 
 END {
     if (limrev["MEMLOCK"] != "") {