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

Alan Coopersmith alan.coopersmith at oracle.com
Mon Dec 13 20:13:33 PST 2010


From: David Barksdale <amatus.amongus at gmail.com>

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

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

David: if you agree to have this patch included in X.Org's xserver release
and can certify you created it, please respond with a "Signed-off-by" line
as described in 
http://lxr.linux.no/#linux+v2.6.36/Documentation/SubmittingPatches#L297

diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 356d490..2f4125a 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