xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Apr 23 18:59:51 UTC 2018


 hw/xfree86/sdksyms.sh |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 8275903956d7876519fa55fb805669dc301bf243
Author: Thomas Klausner <wiz at NetBSD.org>
Date:   Mon Apr 23 14:56:17 2018 -0400

    sdksyms: Cope with __pid_t and __uint32_t
    
    Kludge sdksyms.c generator to not fail on GetClientPid.
    It returns pid_t which on NetBSD is #define pid_t __pid_t
    This slightly alters the GCC preprocessor output which this fragile
    code could not deal with when using GCC 5+
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index fc171d918..7897aae22 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -373,6 +373,17 @@ BEGIN {
                n = 1;
             }
         }
+	# hack: pid_t becomes __pid_t on NetBSD, same for uint32_t -> __uint32_t.
+	# GCC 5 inserts additional lines around this.
+        if (($1 == "__pid_t" || $1 == "__uint32_t") && NF == 1) {
+            getline;
+            n++;
+            # skip line numbers GCC 5 adds (after typedef return type?)
+            while ($n == "" || $0 ~ /^# [0-9]+ "/) {
+               getline;
+               n = 1;
+            }
+	}
 
 	# type specifier may not be set, as in
 	#   extern _X_EXPORT unsigned name(...)


More information about the xorg-commit mailing list