diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh index 356d490fa..f60b8ed74 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_]+$/) diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am index a5adc01ee..fb5d49e88 100644 --- a/hw/xfree86/parser/Makefile.am +++ b/hw/xfree86/parser/Makefile.am @@ -31,7 +31,7 @@ libxf86config_internal_la_SOURCES = \ $(INTERNAL_SOURCES) libxf86config_a_SOURCES = \ - $(TOP_SRCDIR)/os/xprintf.c \ + $(top_srcdir)/os/xprintf.c \ $(INTERNAL_SOURCES) libxf86config_a_CFLAGS = $(AM_CFLAGS) diff --git a/os/xprintf.c b/os/xprintf.c index 0a8bd0687..254b7374a 100644 --- a/os/xprintf.c +++ b/os/xprintf.c @@ -108,7 +108,7 @@ Xvasprintf(char **ret, const char * _X_RESTRICT_KYWD format, va_list va) return -1; vsnprintf(*ret, size + 1, format, va); - ret[size] = 0; + (*ret)[size] = 0; return size; #endif }