OSX awk does not support third argument to "match" function
Bug #1542870 reported by
Chad Parker
This bug report is a duplicate of:
Bug #917308: m4lib_to_newlib.sh does not work with mawk.
Edit
Remove
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: | added: osx |
To post a comment you must log in.
make fails with:
/bin/sh ./m4lib_ to_newlib. sh --contents \ newlib. stamp] Error 2
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-
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2