Module Name:    xsrc
Committed By:   christos
Date:           Fri Jan 25 17:11:49 UTC 2019

Modified Files:
        xsrc/external/mit/xf86-video-nouveau/dist/src: nv_proto.h

Log Message:
Explicitly include the headers in the right sequence to make the magic happen,
explaining why.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h
diff -u xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h:1.4 xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h:1.5
--- xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h:1.4	Fri Jan 25 10:53:09 2019
+++ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h	Fri Jan 25 12:11:49 2019
@@ -1,6 +1,25 @@
 #ifndef __NV_PROTO_H__
 #define __NV_PROTO_H__
 
+/*
+ * All this mess is needed because the X headers use "pointer" for two
+ * different purposes. Clearly this needs to be fixed there, but it is
+ * much more intrusive. So we include the headers in the right order to
+ * make the necessary magic happen.
+ */
+
+/* This defines _XTYPEDEF_POINTER to prevent <Xdefs.h> from doing the typedef */
+#include "dix-config.h"
+
+/* This uses "pointer" as a union tag, so include it first */
+#include <X11/Xproto.h>
+
+/* Undefine _XTYPEDEF_POINTER, because we need it as a type now */
+#undef _XTYPEDEF_POINTER
+
+/* This defines "pointer" as a type, so include it second */
+#include <X11/Xdefs.h>
+
 /* not defined in Xdefs.h for xorg-server 1.20. */
 #ifndef _XTYPEDEF_POINTER
 typedef void * pointer;

Reply via email to