From 8c1dd40a04693f09f4fcea6e7f905af34c7589de Mon Sep 17 00:00:00 2001 From: Benjamin Close Date: Mon, 8 Dec 2008 14:49:38 +1030 Subject: [PATCH] Don't use gnu specific extensions to awk when builing symbols Traditional posix awk doesn't know about \W and whilst we check that awk exists in configure.ac we don't check which awk we are using. This corrects symbol generation for posix only awk. --- hw/xfree86/loader/sdksyms.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index 5b95cf427..2f62cd7ef 100755 --- a/hw/xfree86/loader/sdksyms.sh +++ b/hw/xfree86/loader/sdksyms.sh @@ -341,7 +341,7 @@ BEGIN { # type specifier may not be set, as in # extern _X_EXPORT unsigned name(...) - if ($n !~ /\W/) + if ($n !~ /[^[:alnum:]_]/) n++; # match @@ -349,12 +349,12 @@ BEGIN { if ($n == "{") n--; # extern _X_EXPORT type (* name[])(...) - else if ($n ~ /^\W+$/) + else if ($n ~ /^[^[:alnum:]_]+$/) n++; # match # extern _X_EXPORT const name *const ... - if ($n ~ /^(\W+)?const$/) + if ($n ~ /^([^[:alnum:]_]+)?const$/) n++; # actual name may be in the next line, as in @@ -370,10 +370,10 @@ BEGIN { symbol = $n; # remove starting non word chars - sub(/^\W+/, "",symbol); + sub(/^[^[:alnum:]_]+/, "",symbol); # remove from first non word to end of line - sub(/\W.*/, "", symbol); + sub(/[^[:alnum:]_].*/, "", symbol); #print; printf(" &%s,\n", symbol);