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 Put all the ugly ...



details:   https://anonhg.NetBSD.org/xsrc/rev/f1dacf0efa69
branches:  trunk
changeset: 10099:f1dacf0efa69
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 31 19:52:31 2019 +0000

description:
Put all the ugly include order dependent stuff in a separate file
and arrange for that to be included first where needed.

diffstat:

 external/mit/xf86-video-nouveau/dist/src/nouveau_present.h |   1 +
 external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h    |   1 +
 external/mit/xf86-video-nouveau/dist/src/nv_include.h      |   2 +
 external/mit/xf86-video-nouveau/dist/src/nv_pointer.h      |  28 ++++++++++++++
 external/mit/xf86-video-nouveau/dist/src/nv_proto.h        |  27 -------------
 5 files changed, 32 insertions(+), 27 deletions(-)

diffs (103 lines):

diff -r 7d0142dd13c6 -r f1dacf0efa69 external/mit/xf86-video-nouveau/dist/src/nouveau_present.h
--- a/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h        Mon Jan 28 11:50:00 2019 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h        Thu Jan 31 19:52:31 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef __NOUVEAU_PRESENT_H__
 #define __NOUVEAU_PRESENT_H__
 
+#include "nv_pointer.h"
 #include "xorg-server.h"
 #include "scrnintstr.h"
 
diff -r 7d0142dd13c6 -r f1dacf0efa69 external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h
--- a/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h   Mon Jan 28 11:50:00 2019 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h   Thu Jan 31 19:52:31 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef __NOUVEAU_SYNC_H__
 #define __NOUVEAU_SYNC_H__
 
+#include "nv_pointer.h"
 #include "xorg-server.h"
 #include "scrnintstr.h"
 
diff -r 7d0142dd13c6 -r f1dacf0efa69 external/mit/xf86-video-nouveau/dist/src/nv_include.h
--- a/external/mit/xf86-video-nouveau/dist/src/nv_include.h     Mon Jan 28 11:50:00 2019 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nv_include.h     Thu Jan 31 19:52:31 2019 +0000
@@ -11,6 +11,8 @@
 #include <unistd.h>
 #include <stdlib.h>
 
+#include "nv_pointer.h"
+
 /* All drivers should typically include these */
 #include "xorg-config.h"
 #include "xf86.h"
diff -r 7d0142dd13c6 -r f1dacf0efa69 external/mit/xf86-video-nouveau/dist/src/nv_pointer.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nv_pointer.h     Thu Jan 31 19:52:31 2019 +0000
@@ -0,0 +1,28 @@
+#ifndef __NV_POINTER__
+#define __NV_POINTER__
+/*
+ * 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;
+#define _XTYPEDEF_POINTER
+#endif
+
+#endif
diff -r 7d0142dd13c6 -r f1dacf0efa69 external/mit/xf86-video-nouveau/dist/src/nv_proto.h
--- a/external/mit/xf86-video-nouveau/dist/src/nv_proto.h       Mon Jan 28 11:50:00 2019 +0000
+++ b/external/mit/xf86-video-nouveau/dist/src/nv_proto.h       Thu Jan 31 19:52:31 2019 +0000
@@ -1,33 +1,6 @@
 #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;
-#define _XTYPEDEF_POINTER
-#endif
-
-#include <Xdefs.h>
-
 /* in drmmode_display.c */
 Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
 void drmmode_adjust_frame(ScrnInfoPtr pScrn, int x, int y);



Home | Main Index | Thread Index | Old Index