pcb

OSX awk does not support third argument to "match" function

Bug #1542870 reported by Chad Parker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
New
Undecided
Unassigned

Bug Description

The OSX version of the "match" function in awk does not support the third argument. The GNU version puts what was matched into the third argument, but the OSX version stores the match data in RSTART and RLENGTH.

A solution is to install gawk from macports. autotools will then use the gawk instead of the OSX awk.

Another solution would be to use RSTART and RLENGTH instead, which are also supported by gawk.

Tags: osx
Revision history for this message
Chad Parker (parker-charles) wrote :

make fails with:

/bin/sh ./m4lib_to_newlib.sh --contents \
  pcblib.contents --output pcblib-newlib \
   --pcb "../src/pcb" --awk "awk"
awk: syntax error at source line 81
 context is
  match (comment, >>> /(.*)\[(.*)\]/, <<< fp);
awk: illegal statement at source line 82
awk: illegal statement at source line 82
make[2]: *** [pcblib-newlib.stamp] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

tags: added: osx
Revision history for this message
Chad Parker (parker-charles) wrote :

I pushed a fix for this to home/cparker/LP917308.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.