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

Re: limit on CVS does not work - please help



Helmut Jarausch wrote:
> Hi,
> 
> having used ZSH for years now, I've encountered a problem
> when building ZSH (CVS 2005/01/29  - currently CVS is broken)
> on a new system with glibc-2.3.4 .

I've now got a new resource header too...

> Although the build looked perfectly normal,
> the 'limit' command doesn't work anymore.

...yep, they've really messed it about this time.  There are more
underscores and the entries are out of order.  Try this.

This will be required to build any version of zsh with this system.   It
ought to go on zsh-4_2-patches, too.

I've diffed it against the old local version owing to the unavailability
of CVS; I would think it's the same as Helmut's.

--- Src/Builtins/rlimits.awk.old	2005-02-16 17:27:41.000000000 +0000
+++ Src/Builtins/rlimits.awk	2005-02-16 17:29:57.272157640 +0000
@@ -6,7 +6,7 @@
 #
 BEGIN {limidx = 0}
 
-/^[\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 ]*)/ {
+/^[\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)
@@ -19,7 +19,11 @@
 	limnam = substr(limnam, 1, limindex-1)
     }
     if (limnum == "=") {
-	limnum = limidx++
+	if (tmp[3] ~ /^[0-9]/) {
+	    limnum = tmp[3] + 0
+	} else {
+	    limnum = limidx++
+	}
 	limindex = index($0, ",")
 	limnam = substr(limnam, 1, limindex-1)
     }
@@ -60,7 +64,7 @@
 /^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*RLIMIT_NLIMITS/ {
     if(!nlimits) { nlimits = limidx }
 }
-/^[\t ]*RLIM(IT)?_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ {
+/^[\t _]*RLIM(IT)?_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ {
     limindex = index($0, "=")
     limtail = substr($0, limindex, 80)
     split(limtail, tmp)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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