Module Name: xsrc Committed By: christos Date: Thu Jan 31 19:52:31 UTC 2019
Modified Files: xsrc/external/mit/xf86-video-nouveau/dist/src: nouveau_present.h nouveau_sync.h nv_include.h nv_proto.h Added Files: xsrc/external/mit/xf86-video-nouveau/dist/src: nv_pointer.h Log Message: Put all the ugly include order dependent stuff in a separate file and arrange for that to be included first where needed. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_pointer.h cvs rdiff -u -r1.5 -r1.6 \ 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/nouveau_present.h diff -u xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h:1.1.1.2 xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h:1.2 --- xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h:1.1.1.2 Sun Aug 14 21:10:31 2016 +++ xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_present.h Thu Jan 31 14:52:31 2019 @@ -1,6 +1,7 @@ #ifndef __NOUVEAU_PRESENT_H__ #define __NOUVEAU_PRESENT_H__ +#include "nv_pointer.h" #include "xorg-server.h" #include "scrnintstr.h" Index: xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h diff -u xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h:1.1.1.1 xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h:1.2 --- xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h:1.1.1.1 Mon Oct 12 21:33:26 2015 +++ xsrc/external/mit/xf86-video-nouveau/dist/src/nouveau_sync.h Thu Jan 31 14:52:31 2019 @@ -1,6 +1,7 @@ #ifndef __NOUVEAU_SYNC_H__ #define __NOUVEAU_SYNC_H__ +#include "nv_pointer.h" #include "xorg-server.h" #include "scrnintstr.h" Index: xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h diff -u xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h:1.2 xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h:1.3 --- xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h:1.2 Tue Aug 16 03:43:03 2016 +++ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_include.h Thu Jan 31 14:52:31 2019 @@ -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" 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.5 xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h:1.6 --- xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h:1.5 Fri Jan 25 12:11:49 2019 +++ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_proto.h Thu Jan 31 14:52:31 2019 @@ -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); Added files: Index: xsrc/external/mit/xf86-video-nouveau/dist/src/nv_pointer.h diff -u /dev/null xsrc/external/mit/xf86-video-nouveau/dist/src/nv_pointer.h:1.1 --- /dev/null Thu Jan 31 14:52:31 2019 +++ xsrc/external/mit/xf86-video-nouveau/dist/src/nv_pointer.h Thu Jan 31 14:52:31 2019 @@ -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