aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-07-08 16:16:40 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-12-28 13:15:24 +0100
commit433d8186588698ce6a435fbff5e9d40a37b78be9 (patch)
tree1f13c31901460fd31786b6d50b6c9841d25be99e /nx-X11/programs/Xserver/hw
parentf58006d932d907dc13d76084e9171de59ee27f16 (diff)
downloadnx-libs-433d8186588698ce6a435fbff5e9d40a37b78be9.tar.gz
nx-libs-433d8186588698ce6a435fbff5e9d40a37b78be9.tar.bz2
nx-libs-433d8186588698ce6a435fbff5e9d40a37b78be9.zip
Clear header file namespace separation (<X11/...> vs. <nx-X11/...>).
In the process of building nxagent against more and more system-wide installed X.org libraries, we come to the limit of including structs from this (bundled nx-X11) and that (system-wide X.Org) library. This commit introduces a clear namespace separation of headers provided by nx-X11 and headers provided by X.Org. This approach is only temporary as we want to drop all nx-X11 bundled libraries from nx-libs. However, for a while we need to make this separation clear and also ship some reduced fake X.Org headers that avoid pulling in libX* and libNX_X* symbols at the same time. This patch has been tested on Debian jessie and unstable and requires no overall testing on various distros and distro versions, as we finally will drop all libNX_X* libraries and build against X.org's client libs. For now, this hack eases our development / cleanup process.
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Agent.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Holder.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Icons.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c11
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXextension.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXproperty.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrender.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXresource.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXshm.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/TestExt.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h105
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h259
-rw-r--r--nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h2
29 files changed, 435 insertions, 70 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Agent.h b/nx-X11/programs/Xserver/hw/nxagent/Agent.h
index dbed1e0d8..ec312bad2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Agent.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Agent.h
@@ -103,8 +103,8 @@ typedef XID KeySym64;
#define NX_TRANS_SOCKET
#define GC XlibGC
-#include "Xlib.h"
-#include "X11/extensions/shape.h"
+#include <nx-X11/Xlib.h>
+#include <nx-X11/extensions/shape.h>
#undef GC
#ifdef _XSERVER64_tmp
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 557798e7f..21bcc60e5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -33,7 +33,7 @@
#include "gcstruct.h"
#include "xfixeswire.h"
-#include <X11/extensions/Xfixes.h>
+#include <nx-X11/extensions/Xfixes.h>
/*
* Use asyncronous get property replies.
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
index 0fb9491a4..63c3b73c1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
@@ -25,7 +25,7 @@
#include "scrnintstr.h"
#include "Agent.h"
-#include <X11/Xlib.h>
+#include <nx-X11/Xlib.h>
#include "opaque.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 862ce57d0..abc6a9380 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -38,8 +38,8 @@ is" without express or implied warranty.
#include <time.h>
#include <errno.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xproto.h>
#include "screenint.h"
#include "input.h"
#include "misc.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index c33564092..d965d574c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -66,7 +66,7 @@
#define Window XlibWindow
#define Atom XlibAtom
#define Time XlibXID
-#include <X11/extensions/Xfixes.h>
+#include <nx-X11/extensions/Xfixes.h>
#undef Window
#undef Atom
#undef Time
@@ -90,10 +90,10 @@
#undef KeySym
#undef XID
-#include <X11/cursorfont.h>
+#include <nx-X11/cursorfont.h>
#include "Shadow.h"
-#include <X11/extensions/Xrandr.h>
+#include "X11/include/Xrandr_nxagent.h"
#include "NXlib.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h
index c74fa151f..02b2b8cbe 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h
@@ -18,7 +18,7 @@
#ifndef __Events_H__
#define __Events_H__
-#include <X11/Xmd.h>
+#include <nx-X11/Xmd.h>
#define ProcessedExpose (LASTEvent + 1)
#define ProcessedNotify (LASTEvent + 2)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.c b/nx-X11/programs/Xserver/hw/nxagent/Holder.c
index 4aca1ecdb..64ffb24a4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Holder.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.c
@@ -33,7 +33,7 @@
#include "../../include/gc.h"
#include "../../include/window.h"
-#include <X11/xpm.h>
+#include "X11/include/xpm_nxagent.h"
#include "Agent.h"
#include "Pixmaps.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
index 98e879662..b307f42e6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h
@@ -19,7 +19,7 @@
#define __Icons_H__
#define Pixel XpmPixel
-#include <X11/xpm.h>
+#include "X11/include/xpm_nxagent.h"
#undef Pixel
#define NXAGENT_ICON_NAME "nxagent.xpm"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 835aebeb6..9ead48de1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -64,13 +64,13 @@ is" without express or implied warranty.
#include "property.h"
#include "Init.h"
-#include <X11/extensions/XKB.h>
+#include <nx-X11/extensions/XKB.h>
#define XKBSRV_NEED_FILE_FUNCS
-#include <X11/extensions/XKBsrv.h>
-#include <X11/extensions/XKBconfig.h>
+#include <nx-X11/extensions/XKBsrv.h>
+#include <nx-X11/extensions/XKBconfig.h>
-#include "X11/extensions/XKBrules.h"
+#include <nx-X11/extensions/XKBrules.h>
#include "Xatom.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h
index d11561e18..a274b8a39 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h
@@ -33,12 +33,12 @@
#else
-#include <X11/extensions/composite.h>
-#include <X11/extensions/Xfixes.h>
+#include <nx-X11/extensions/composite.h>
+#include <nx-X11/extensions/Xfixes.h>
#endif
-#include <X11/Xfuncproto.h>
+#include <nx-X11/Xfuncproto.h>
/*
* This revision number also appears in configure.ac, they have
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h
index 8667ded16..b4433d6c1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h
@@ -27,7 +27,7 @@
#ifndef NXAGENT_SERVER
-#include <X11/extensions/xfixeswire.h>
+#include <nx-X11/extensions/xfixeswire.h>
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index af76ed4c2..704bfcc0d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -109,12 +109,13 @@ int ProcInitialConnection();
#define True 1
#endif
+#include <X11/fonts/fontstruct.h>
+
#define GC XlibGC
-#include <X11/Xlib.h>
+#include <nx-X11/Xlib.h>
#undef GC
#include "windowstr.h"
-#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
#include "gcstruct.h"
#include "selection.h"
@@ -135,15 +136,15 @@ int ProcInitialConnection();
#endif
#ifdef XCSECURITY
#define _SECURITY_SERVER
-#include <X11/extensions/security.h>
+#include <nx-X11/extensions/security.h>
#endif
#ifdef XAPPGROUP
-#include <X11/extensions/Xagsrv.h>
+#include <nx-X11/extensions/Xagsrv.h>
#endif
#ifdef XKB
#define XKB_IN_SERVER
#include "inputstr.h"
-#include <X11/extensions/XKBsrv.h>
+#include <nx-X11/extensions/XKBsrv.h>
#endif
#include "Atoms.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
index 4f41ee228..2f3a75147 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
@@ -73,16 +73,16 @@ Equipment Corporation.
#include <dix-config.h>
#endif
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include <X11/Xproto.h>
+#include <X11/fonts/fontstruct.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xmd.h>
+#include <nx-X11/Xproto.h>
#include "scrnintstr.h"
#include "resource.h"
#include "dixstruct.h"
#include "cursorstr.h"
#include "misc.h"
#include "opaque.h"
-#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
#include "closestr.h"
@@ -172,7 +172,7 @@ _NXGetFontPathError:
#ifdef XF86BIGFONT
#define _XF86BIGFONT_SERVER_
-#include <X11/extensions/xf86bigfont.h>
+#include <nx-X11/extensions/xf86bigfont.h>
#endif
#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 5940fe7d1..11ff62947 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -132,13 +132,13 @@ of the copyright holder.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#include "Xlib.h"
#include "misc.h"
#include "resource.h"
#define NEED_EVENTS
#define NEED_REPLIES
-#include <X11/Xproto.h>
+#include <nx-X11/Xproto.h>
#include "windowstr.h"
#include "inputstr.h"
#include "scrnintstr.h"
@@ -152,13 +152,13 @@ of the copyright holder.
#include "globals.h"
#ifdef XKB
-#include <X11/extensions/XKBsrv.h>
+#include <nx-X11/extensions/XKBsrv.h>
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
#endif
#ifdef XCSECURITY
#define _SECURITY_SERVER
-#include <X11/extensions/security.h>
+#include <nx-X11/extensions/security.h>
#endif
#ifdef XEVIE
@@ -175,7 +175,7 @@ int xeviegrabState = 0;
xEvent *xeviexE;
#endif
-#include <X11/extensions/XIproto.h>
+#include <nx-X11/extensions/XIproto.h>
#include "exevents.h"
#include "extnsionst.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
index f964e2fd8..962367bf2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c
@@ -68,10 +68,10 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#define NEED_EVENTS
#define NEED_REPLIES
-#include <X11/Xproto.h>
+#include <nx-X11/Xproto.h>
#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
@@ -80,7 +80,7 @@ SOFTWARE.
#include "../../dix/dispatch.h"
#ifdef XCSECURITY
#define _SECURITY_SERVER
-#include <X11/extensions/security.h>
+#include <nx-X11/extensions/security.h>
#endif
#ifdef LBX
#include "lbxserve.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
index e7bb2d841..5d7fcf640 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h
@@ -50,7 +50,7 @@
#ifndef _GLYPHSTR_H_
#define _GLYPHSTR_H_
-#include <X11/extensions/renderproto.h>
+#include <nx-X11/extensions/renderproto.h>
#include "../../render/picture.h"
#include "screenint.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
index e1c6b6d8c..aa3c606f8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
@@ -97,10 +97,10 @@ Equipment Corporation.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#define NEED_EVENTS
-#include <X11/Xproto.h>
-#include <X11/Xprotostr.h>
+#include <nx-X11/Xproto.h>
+#include <nx-X11/Xprotostr.h>
#include "misc.h"
#include "regionstr.h"
@@ -112,7 +112,7 @@ Equipment Corporation.
#include "dixstruct.h"
#include "mi.h"
-#include <X11/Xmd.h>
+#include <nx-X11/Xmd.h>
#include "globals.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
index 8132e9dd0..a720cafbf 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
@@ -67,7 +67,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#include "regionstr.h"
#include "region.h"
#include "mi.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
index a2d4a8e52..d6c5aa4dd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
@@ -68,10 +68,10 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#define NEED_REPLIES
#define NEED_EVENTS
-#include <X11/Xproto.h>
+#include <nx-X11/Xproto.h>
#include "windowstr.h"
#include "propertyst.h"
#include "dixstruct.h"
@@ -79,7 +79,7 @@ SOFTWARE.
#include "swaprep.h"
#ifdef XCSECURITY
#define _SECURITY_SERVER
-#include <X11/extensions/security.h>
+#include <nx-X11/extensions/security.h>
#endif
#ifdef LBX
#include "lbxserve.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
index 260355c6e..dc1d2387e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
@@ -47,8 +47,8 @@
#include <dix-config.h>
#endif
-#include <X11/X.h>
-#include <X11/Xproto.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xproto.h>
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
@@ -59,9 +59,9 @@
#include "colormapst.h"
#include "extnsionst.h"
#include "servermd.h"
-#include <X11/extensions/render.h>
-#include <X11/extensions/renderproto.h>
-#include <X11/Xfuncproto.h>
+#include <nx-X11/extensions/render.h>
+#include <nx-X11/extensions/renderproto.h>
+#include <nx-X11/Xfuncproto.h>
#include "cursorstr.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
index 833a33fd3..39a1992de 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c
@@ -123,7 +123,7 @@ Equipment Corporation.
#include <dix-config.h>
#endif
-#include <X11/X.h>
+#include <nx-X11/X.h>
#include "misc.h"
#include "os.h"
#include "resource.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
index 3b40b82f7..95905fde7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
@@ -64,8 +64,8 @@ in this Software without prior written authorization from The Open Group.
#include <sys/stat.h>
#define NEED_REPLIES
#define NEED_EVENTS
-#include <X11/X.h>
-#include <X11/Xproto.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xproto.h>
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
@@ -77,8 +77,8 @@ in this Software without prior written authorization from The Open Group.
#include "extnsionst.h"
#include "servermd.h"
#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
-#include <X11/Xfuncproto.h>
+#include <nx-X11/extensions/shmstr.h>
+#include <nx-X11/Xfuncproto.h>
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 4017099e9..4552ad563 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -123,11 +123,11 @@ Equipment Corporation.
#include "globals.h"
#ifdef XAPPGROUP
-#include <X11/extensions/Xagsrv.h>
+#include <nx-X11/extensions/Xagsrv.h>
#endif
#ifdef XCSECURITY
#define _SECURITY_SERVER
-#include <X11/extensions/security.h>
+#include <nx-X11/extensions/security.h>
#endif
#include "Screen.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c
index cfce34463..1724374a0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c
@@ -71,8 +71,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h>
-#include <X11/Xproto.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xproto.h>
#include "misc.h"
#include "scrnintstr.h"
#include "windowstr.h"
@@ -82,12 +82,12 @@ SOFTWARE.
#include "resource.h"
#include "opaque.h"
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvproto.h>
+#include <nx-X11/extensions/Xv.h>
+#include <nx-X11/extensions/Xvproto.h>
#include "xvdix.h"
#ifdef MITSHM
#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <nx-X11/extensions/shmstr.h>
#endif
#include "Trap.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 095aa7b08..491a92c2f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -77,13 +77,13 @@ is" without express or implied warranty.
#include "Shadow.h"
#include "Utils.h"
-#include <X11/extensions/Xrandr.h>
+#include "X11/include/Xrandr_nxagent.h"
#define GC XlibGC
#define Font XlibFont
#define KeySym XlibKeySym
#define XID XlibXID
-#include <X11/Xlibint.h>
+#include <nx-X11/Xlibint.h>
#undef GC
#undef Font
#undef KeySym
diff --git a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
index 6bce2eaeb..30fe1968e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c
@@ -29,9 +29,9 @@ is" without express or implied warranty.
*/
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xlib.h>
+#include <nx-X11/X.h>
+#include <nx-X11/Xproto.h>
+#include <nx-X11/Xlib.h>
#undef Bool
#include "screenint.h"
#include "input.h"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h
new file mode 100644
index 000000000..acfc5834e
--- /dev/null
+++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation, Inc.
+ * Copyright © 2002 Hewlett-Packard Company, Inc.
+ * Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
+ * Keith Packard, Intel Corporation
+ */
+
+/*
+ * This file is a reduced version of the header file of
+ * <X11/extensions/Xrandr.h>
+ *
+ * This copy of code has been introduced to allow a clear namespace
+ * separation between <X11/...> and <nx-X11/...> header files.
+ *
+ * This version of the Xrandr library header file only contains symbols
+ * required by nxagent and strictly avoids indirectly including
+ * from an X11 library that is also shipped in nx-X11/lib/.
+ *
+ * When using <X11/extensions/Xrandr.h> instead for inclusion in
+ * nxagent, it will attempt pulling in the <X11/extensions/Xrender.h>
+ * header which in turn will include <X11/Xlib.h>. However, the headers of
+ * the same name from <nx-X11/...> should be used instead.
+ *
+ * FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this
+ * hack can be removed.
+ *
+ * 2015/06/26, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ */
+
+#ifndef _XRANDR_H_
+#define _XRANDR_H_
+
+#include <X11/extensions/randr.h>
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+typedef XID RRProvider;
+typedef XID RRMode;
+
+/*
+ * Events.
+ */
+
+typedef struct {
+ int type; /* event base */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window which selected for this event */
+ Window root; /* Root window for changed screen */
+ Time timestamp; /* when the screen change occurred */
+ Time config_timestamp; /* when the last configuration change */
+ SizeID size_index;
+ SubpixelOrder subpixel_order;
+ Rotation rotation;
+ int width;
+ int height;
+ int mwidth;
+ int mheight;
+} XRRScreenChangeNotifyEvent;
+
+typedef unsigned long XRRModeFlags;
+
+typedef struct _XRRModeInfo {
+ RRMode id;
+ unsigned int width;
+ unsigned int height;
+ unsigned long dotClock;
+ unsigned int hSyncStart;
+ unsigned int hSyncEnd;
+ unsigned int hTotal;
+ unsigned int hSkew;
+ unsigned int vSyncStart;
+ unsigned int vSyncEnd;
+ unsigned int vTotal;
+ char *name;
+ unsigned int nameLength;
+ XRRModeFlags modeFlags;
+} XRRModeInfo;
+
+_XFUNCPROTOEND
+
+#endif /* _XRANDR_H_ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h
new file mode 100644
index 000000000..b02e5a913
--- /dev/null
+++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h
@@ -0,0 +1,259 @@
+/*
+ * Copyright (C) 1989-95 GROUPE BULL
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of GROUPE BULL shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from GROUPE BULL.
+ */
+
+/*****************************************************************************\
+* xpm.h: *
+* *
+* XPM library *
+* Include file *
+* *
+* Developed by Arnaud Le Hors *
+\*****************************************************************************/
+
+/*
+ * This file is a reduced version of the header file of
+ * <X11/xpm.h>
+ *
+ * This copy of code has been introduced to allow a clear namespace
+ * separation between <X11/...> and <nx-X11/...> header files.
+ *
+ * This version of the Xpm library header file only contains symbols
+ * required by nxagent and strictly avoids indirectly including
+ * from an X11 library that is also shipped in nx-X11/lib/.
+ *
+ * When using <X11/xpm.h> instead for inclusion in nxagent, it will
+ * attempt pulling in the <X11/extensions/Xlib.h> header file.
+ * However, the headers of the same name from <nx-X11/...> should be
+ * used instead.
+ *
+ * FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this
+ * hack can be removed.
+ *
+ * 2015/06/26, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ */
+
+#ifndef XPM_h
+#define XPM_h
+
+/*
+ * first some identification numbers:
+ * the version and revision numbers are determined with the following rule:
+ * SO Major number = LIB minor version number.
+ * SO Minor number = LIB sub-minor version number.
+ * e.g: Xpm version 3.2f
+ * we forget the 3 which is the format number, 2 gives 2, and f gives 6.
+ * thus we have XpmVersion = 2 and XpmRevision = 6
+ * which gives SOXPMLIBREV = 2.6
+ *
+ * Then the XpmIncludeVersion number is built from these numbers.
+ */
+#define XpmFormat 3
+#define XpmVersion 4
+#define XpmRevision 11
+#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision)
+
+#ifndef XPM_NUMBERS
+
+/* let's define Pixel if it is not done yet */
+#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED)
+typedef unsigned long Pixel; /* Index into colormap */
+# define PIXEL_ALREADY_TYPEDEFED
+#endif
+
+/* include headers from <nx-X11/...> instead of <X11/...> */
+#include <nx-X11/Xlib.h>
+#include <nx-X11/Xutil.h>
+
+/* Return ErrorStatus codes:
+ * null if full success
+ * positive if partial success
+ * negative if failure
+ */
+
+#define XpmColorError 1
+#define XpmSuccess 0
+#define XpmOpenFailed -1
+#define XpmFileInvalid -2
+#define XpmNoMemory -3
+#define XpmColorFailed -4
+
+typedef struct {
+ char *name; /* Symbolic color name */
+ char *value; /* Color value */
+ Pixel pixel; /* Color pixel */
+} XpmColorSymbol;
+
+typedef struct {
+ char *name; /* name of the extension */
+ unsigned int nlines; /* number of lines in this extension */
+ char **lines; /* pointer to the extension array of strings */
+} XpmExtension;
+
+typedef struct {
+ char *string; /* characters string */
+ char *symbolic; /* symbolic name */
+ char *m_color; /* monochrom default */
+ char *g4_color; /* 4 level grayscale default */
+ char *g_color; /* other level grayscale default */
+ char *c_color; /* color default */
+} XpmColor;
+
+typedef struct {
+ unsigned int width; /* image width */
+ unsigned int height; /* image height */
+ unsigned int cpp; /* number of characters per pixel */
+ unsigned int ncolors; /* number of colors */
+ XpmColor *colorTable; /* list of related colors */
+ unsigned int *data; /* image data */
+} XpmImage;
+
+typedef struct {
+ unsigned long valuemask; /* Specifies which attributes are defined */
+ char *hints_cmt; /* Comment of the hints section */
+ char *colors_cmt; /* Comment of the colors section */
+ char *pixels_cmt; /* Comment of the pixels section */
+ unsigned int x_hotspot; /* Returns the x hotspot's coordinate */
+ unsigned int y_hotspot; /* Returns the y hotspot's coordinate */
+ unsigned int nextensions; /* number of extensions */
+ XpmExtension *extensions; /* pointer to array of extensions */
+} XpmInfo;
+
+typedef int (*XpmAllocColorFunc)(
+ Display* /* display */,
+ Colormap /* colormap */,
+ char* /* colorname */,
+ XColor* /* xcolor */,
+ void* /* closure */
+);
+
+typedef int (*XpmFreeColorsFunc)(
+ Display* /* display */,
+ Colormap /* colormap */,
+ Pixel* /* pixels */,
+ int /* npixels */,
+ void* /* closure */
+);
+
+
+/* required struct for hw/nxagent/Holder.c */
+typedef struct {
+ unsigned long valuemask; /* Specifies which attributes are
+ defined */
+
+ Visual *visual; /* Specifies the visual to use */
+ Colormap colormap; /* Specifies the colormap to use */
+ unsigned int depth; /* Specifies the depth */
+ unsigned int width; /* Returns the width of the created
+ pixmap */
+ unsigned int height; /* Returns the height of the created
+ pixmap */
+ unsigned int x_hotspot; /* Returns the x hotspot's
+ coordinate */
+ unsigned int y_hotspot; /* Returns the y hotspot's
+ coordinate */
+ unsigned int cpp; /* Specifies the number of char per
+ pixel */
+ Pixel *pixels; /* List of used color pixels */
+ unsigned int npixels; /* Number of used pixels */
+ XpmColorSymbol *colorsymbols; /* List of color symbols to override */
+ unsigned int numsymbols; /* Number of symbols */
+ char *rgb_fname; /* RGB text file name */
+ unsigned int nextensions; /* Number of extensions */
+ XpmExtension *extensions; /* List of extensions */
+
+ unsigned int ncolors; /* Number of colors */
+ XpmColor *colorTable; /* List of colors */
+/* 3.2 backward compatibility code */
+ char *hints_cmt; /* Comment of the hints section */
+ char *colors_cmt; /* Comment of the colors section */
+ char *pixels_cmt; /* Comment of the pixels section */
+/* end 3.2 bc */
+ unsigned int mask_pixel; /* Color table index of transparent
+ color */
+
+ /* Color Allocation Directives */
+ Bool exactColors; /* Only use exact colors for visual */
+ unsigned int closeness; /* Allowable RGB deviation */
+ unsigned int red_closeness; /* Allowable red deviation */
+ unsigned int green_closeness; /* Allowable green deviation */
+ unsigned int blue_closeness; /* Allowable blue deviation */
+ int color_key; /* Use colors from this color set */
+
+ Pixel *alloc_pixels; /* Returns the list of alloc'ed color
+ pixels */
+ int nalloc_pixels; /* Returns the number of alloc'ed
+ color pixels */
+
+ Bool alloc_close_colors; /* Specify whether close colors should
+ be allocated using XAllocColor
+ or not */
+ int bitmap_format; /* Specify the format of 1bit depth
+ images: ZPixmap or XYBitmap */
+
+ /* Color functions */
+ XpmAllocColorFunc alloc_color; /* Application color allocator */
+ XpmFreeColorsFunc free_colors; /* Application color de-allocator */
+ void *color_closure; /* Application private data to pass to
+ alloc_color and free_colors */
+
+} XpmAttributes;
+
+/* XpmAttributes value masks bits */
+
+/* required masks bits for hw/nxagent/Holder.c */
+#define XpmDepth (1L<<2)
+#define XpmSize (1L<<3) /* width & height */
+
+/* macros for forward declarations of functions with prototypes */
+#define FUNC(f, t, p) extern t f p
+#define LFUNC(f, t, p) static t f p
+
+
+/*
+ * functions declarations (for building nxagent against system wide libXpm4,
+ * but also against libNX_X11 (as opposed to system-wide libX11).
+ */
+
+_XFUNCPROTOBEGIN
+
+/* Keep for hw/nxagent/Holder.c */
+FUNC(XpmCreatePixmapFromData, int, (Display *display,
+ Drawable d,
+ char **data,
+ Pixmap *pixmap_return,
+ Pixmap *shapemask_return,
+ XpmAttributes *attributes));
+/* Keep for hw/nxagent/Display.c */
+FUNC(XpmReadFileToPixmap, int, (Display *display,
+ Drawable d,
+ const char *filename,
+ Pixmap *pixmap_return,
+ Pixmap *shapemask_return,
+ XpmAttributes *attributes));
+
+_XFUNCPROTOEND
+
+#endif /* XPM_NUMBERS */
+#endif
diff --git a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
index c51e0ee14..ca68c1b63 100644
--- a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
+++ b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
@@ -45,7 +45,7 @@
#ifndef XF86_LIBC_H
#define XF86_LIBC_H 1
-#include <X11/Xfuncs.h>
+#include <nx-X11/Xfuncs.h>
#include <stddef.h>
/*