[PATCH v2] Bug 21827: faulty sdksyms.c generated by the awk script in sdksyms.sh

Alan Coopersmith alan.coopersmith at oracle.com
Wed Dec 15 16:05:17 PST 2010


From: David Barksdale <david.barksdale at adcedosolutions.com>

https://bugs.freedesktop.org/show_bug.cgi?id=21827

Tested-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: David Barksdale <david.barksdale at adcedosolutions.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 hw/xfree86/loader/sdksyms.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Indentation fixed as requested by Peter

diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 356d490..f60b8ed 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -359,7 +359,7 @@ BEGIN {
 	    # skip modifiers, if any
 	    $n ~ /^\*?(unsigned|const|volatile|struct)$/ ||
 	    # skip pointer
-	    $n ~ /\*$/)
+	    $n ~ /^[a-zA-Z0-9_]*\*$/)
 	    n++;
 
 	# type specifier may not be set, as in
@@ -367,6 +367,10 @@ BEGIN {
 	if ($n !~ /[^a-zA-Z0-9_]/)
 	    n++;
 
+	# go back if we are at the parameter list already
+	if ($n ~ /^[(]([^*].*)?$/)
+	    n--;
+
 	# match
 	#    extern _X_EXPORT type (* name[])(...)
 	if ($n ~ /^[^a-zA-Z0-9_]+$/)
-- 
1.7.3.2



More information about the xorg-devel mailing list