[PATCH] - gpgme mkstatus
Wyllys Ingersoll
Wyllys.Ingersoll at Sun.COM
Wed Dec 2 18:07:59 CET 2009
Werner Koch wrote:
>> gpgme mkstatus should use "gawk" instead of "awk". On some platforms (Solaris),
>> awk and gawk are not the same and only 'gawk' will work correctly.
>
> Can you point out the gawk specific suff we use? The script is
> intended to work with a POSIX or other commonly used awk.
>
>
> Shalom-Salam,
>
> Werner
>
I get the following error when building with the standard 'awk' (/usr/bin/awk) in
Solaris:
./mkstatus < ./gpgme.h > status-table.h
awk: syntax error near line 3
awk: bailing out near line 3
The "awk" statement in mkstatus looks like this:
awk '
/GPGME_STATUS_ENTER/ { okay = 1 }
!okay { next }
/}/ { exit 0 }
/GPGME_STATUS_[A-Za-z_]*/ { sub (/,/, "", $1); printf " { \"%s\", %s },\n", substr($1,14), $1 }
' | sort
The standard Solaris awk doesn't like the "!okay" expression.
That is easy enough to fix, change it to "okay == 0" and it doesn't complain.
However, that exposes a larger issue with Solaris /usr/bin/awk - it doesn't support the "sub"
statement.
Switching to 'gawk' is the easiest fix.
-Wyllys
More information about the Gnupg-devel
mailing list