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

Src/rlimits.awk does not work on old NeXTs



The awk that came with NeXTs was pretty dumb. It didn't even have a
useful manpage, so all I can do is to show you the error produced...

  awk -f ./rlimits.awk /usr/include/bsd/sys/resource.h > rlimits.h
  awk: syntax error near line 21
  awk: illegal statement near line 21

and a workaround that in fact does produce a fine rlimits.h on the
NeXT. This all happens on a NeXT 3.3.

*** /tmp/rlimits.awk.~1.1~	Fri Dec 26 13:41:36 1997
--- /tmp/rlimits.awk	Fri Dec 26 13:41:36 1997
***************
*** 18,24 ****
      # in this case I assume GNU libc resourcebits.h
      if (limnum == "") {
  	limnum = limidx++
! 	sub (",", "", limnam)
      }
      limrev[limnam] = limnum
      if (lim[limnum] == "") {
--- 18,26 ----
      # in this case I assume GNU libc resourcebits.h
      if (limnum == "") {
  	limnum = limidx++
! 	# sub (",", "", limnam)   # sub not known on NeXT
! 	split(limnam,limnamarr,",")
! 	limnam = limnamarr[1] limnamarr[2]
      }
      limrev[limnam] = limnum
      if (lim[limnum] == "") {


Hope this helps some, enjoy,
-- 
andreas



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