Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xf86-video-nouveau/dist/src Explicitly includ...
details: https://anonhg.NetBSD.org/xsrc/rev/994214567c8f
branches: trunk
changeset: 10097:994214567c8f
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 25 17:11:49 2019 +0000
description:
Explicitly include the headers in the right sequence to make the magic happen,
explaining why.
diffstat:
external/mit/xf86-video-nouveau/dist/src/nv_proto.h | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diffs (29 lines):
diff -r 5f0dd7dccc1d -r 994214567c8f external/mit/xf86-video-nouveau/dist/src/nv_proto.h
--- a/external/mit/xf86-video-nouveau/dist/src/nv_proto.h Fri Jan 25 15:53:09 2019 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nv_proto.h Fri Jan 25 17:11:49 2019 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index