aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/sdksyms.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/sdksyms.sh')
-rw-r--r--xorg-server/hw/xfree86/sdksyms.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh
index 2305073a0..05ac41096 100644
--- a/xorg-server/hw/xfree86/sdksyms.sh
+++ b/xorg-server/hw/xfree86/sdksyms.sh
@@ -350,13 +350,25 @@ BEGIN {
if (sdk) {
n = 3;
+ # skip line numbers GCC 5 adds before __attribute__
+ while ($n == "" || $0 ~ /^# [0-9]+ "/) {
+ getline;
+ n = 1;
+ }
+
# skip attribute, if any
while ($n ~ /^(__attribute__|__global)/ ||
# skip modifiers, if any
$n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
# skip pointer
- $n ~ /^[a-zA-Z0-9_]*\*$/)
+ $n ~ /^[a-zA-Z0-9_]*\*$/) {
n++;
+ # skip line numbers GCC 5 adds after __attribute__
+ while ($n == "" || $0 ~ /^# [0-9]+ "/) {
+ getline;
+ n = 1;
+ }
+ }
# type specifier may not be set, as in
# extern _X_EXPORT unsigned name(...)