diff options
author | Egbert Eich <eich@freedesktop.org> | 2015-03-03 16:27:05 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2015-06-03 09:05:35 -0400 |
commit | 7a45d1684f626f3045305328c3aab85eed0673ea (patch) | |
tree | 3c63c35c8b6969ebdf62d8ccbc9ce4fa24fc89e7 /hw/xfree86/sdksyms.sh | |
parent | 3b0d1ba2266d2780bfc111bab74885b90458eca4 (diff) |
symbols: Fix sdksyms.sh to cope with gcc5
Gcc5 adds additional lines stating line numbers before and
after __attribute__() which need to be skipped.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Tested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 21b896939c5bb242f3aacc37baf12379e43254b6)
Diffstat (limited to 'hw/xfree86/sdksyms.sh')
-rwxr-xr-x | hw/xfree86/sdksyms.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh index 2305073a0..05ac41096 100755 --- a/hw/xfree86/sdksyms.sh +++ b/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(...) |