summaryrefslogtreecommitdiffstats
path: root/xorg/server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/server')
-rw-r--r--xorg/server/Makefile38
-rw-r--r--xorg/server/Makefile.am7
-rwxr-xr-xxorg/server/bootstrap36
-rw-r--r--xorg/server/configure.ac35
-rw-r--r--xorg/server/module/Makefile63
-rw-r--r--xorg/server/module/Makefile.am22
-rw-r--r--xorg/server/module/rdp.h3
-rw-r--r--xorg/server/module/rdpCapture.c2
-rw-r--r--xorg/server/module/rdpCapture.h12
-rw-r--r--xorg/server/module/rdpClientCon.c1
-rw-r--r--xorg/server/module/rdpClientCon.h44
-rw-r--r--xorg/server/module/rdpComposite.c1
-rw-r--r--xorg/server/module/rdpComposite.h6
-rw-r--r--xorg/server/module/rdpCopyArea.c2
-rw-r--r--xorg/server/module/rdpCopyArea.h4
-rw-r--r--xorg/server/module/rdpCopyPlane.c2
-rw-r--r--xorg/server/module/rdpCopyPlane.h4
-rw-r--r--xorg/server/module/rdpCursor.c2
-rw-r--r--xorg/server/module/rdpCursor.h13
-rw-r--r--xorg/server/module/rdpDraw.h20
-rw-r--r--xorg/server/module/rdpFillPolygon.c2
-rw-r--r--xorg/server/module/rdpFillPolygon.h6
-rw-r--r--xorg/server/module/rdpFillSpans.c2
-rw-r--r--xorg/server/module/rdpFillSpans.h4
-rw-r--r--xorg/server/module/rdpGC.c2
-rw-r--r--xorg/server/module/rdpGC.h6
-rw-r--r--xorg/server/module/rdpGlyphs.c1
-rw-r--r--xorg/server/module/rdpGlyphs.h8
-rw-r--r--xorg/server/module/rdpImageGlyphBlt.c2
-rw-r--r--xorg/server/module/rdpImageGlyphBlt.h6
-rw-r--r--xorg/server/module/rdpImageText16.c2
-rw-r--r--xorg/server/module/rdpImageText16.h6
-rw-r--r--xorg/server/module/rdpImageText8.c4
-rw-r--r--xorg/server/module/rdpImageText8.h6
-rw-r--r--xorg/server/module/rdpInput.c1
-rw-r--r--xorg/server/module/rdpInput.h14
-rw-r--r--xorg/server/module/rdpMain.c2
-rw-r--r--xorg/server/module/rdpMain.h6
-rw-r--r--xorg/server/module/rdpMisc.c3
-rw-r--r--xorg/server/module/rdpMisc.h56
-rw-r--r--xorg/server/module/rdpPixmap.h9
-rw-r--r--xorg/server/module/rdpPolyArc.c2
-rw-r--r--xorg/server/module/rdpPolyArc.h6
-rw-r--r--xorg/server/module/rdpPolyFillArc.c2
-rw-r--r--xorg/server/module/rdpPolyFillArc.h6
-rw-r--r--xorg/server/module/rdpPolyFillRect.c2
-rw-r--r--xorg/server/module/rdpPolyFillRect.h6
-rw-r--r--xorg/server/module/rdpPolyGlyphBlt.c2
-rw-r--r--xorg/server/module/rdpPolyGlyphBlt.h6
-rw-r--r--xorg/server/module/rdpPolyPoint.c2
-rw-r--r--xorg/server/module/rdpPolyPoint.h6
-rw-r--r--xorg/server/module/rdpPolyRectangle.c2
-rw-r--r--xorg/server/module/rdpPolyRectangle.h6
-rw-r--r--xorg/server/module/rdpPolySegment.c2
-rw-r--r--xorg/server/module/rdpPolySegment.h6
-rw-r--r--xorg/server/module/rdpPolyText16.c2
-rw-r--r--xorg/server/module/rdpPolyText16.h6
-rw-r--r--xorg/server/module/rdpPolyText8.c2
-rw-r--r--xorg/server/module/rdpPolyText8.h4
-rw-r--r--xorg/server/module/rdpPolylines.c2
-rw-r--r--xorg/server/module/rdpPolylines.h4
-rw-r--r--xorg/server/module/rdpPri.h18
-rw-r--r--xorg/server/module/rdpPushPixels.c4
-rw-r--r--xorg/server/module/rdpPushPixels.h6
-rw-r--r--xorg/server/module/rdpPutImage.c2
-rw-r--r--xorg/server/module/rdpPutImage.h6
-rw-r--r--xorg/server/module/rdpRandR.c1
-rw-r--r--xorg/server/module/rdpRandR.h30
-rw-r--r--xorg/server/module/rdpReg.c2
-rw-r--r--xorg/server/module/rdpReg.h40
-rw-r--r--xorg/server/module/rdpSetSpans.c2
-rw-r--r--xorg/server/module/rdpSetSpans.h6
-rw-r--r--xorg/server/module/rdpSimd.c1
-rw-r--r--xorg/server/module/rdpSimd.h2
-rw-r--r--xorg/server/module/rdpTrapezoids.c1
-rw-r--r--xorg/server/module/rdpTrapezoids.h6
-rw-r--r--xorg/server/module/rdpXv.c1
-rw-r--r--xorg/server/module/rdpXv.h11
-rw-r--r--xorg/server/xrdpdev/Makefile17
-rw-r--r--xorg/server/xrdpdev/Makefile.am17
-rw-r--r--xorg/server/xrdpdev/xrdpdev.c2
-rw-r--r--xorg/server/xrdpkeyb/Makefile17
-rw-r--r--xorg/server/xrdpkeyb/Makefile.am16
-rw-r--r--xorg/server/xrdpkeyb/rdpKeyboard.c1
-rw-r--r--xorg/server/xrdpmouse/Makefile17
-rw-r--r--xorg/server/xrdpmouse/Makefile.am16
-rw-r--r--xorg/server/xrdpmouse/rdpMouse.c1
87 files changed, 490 insertions, 294 deletions
diff --git a/xorg/server/Makefile b/xorg/server/Makefile
deleted file mode 100644
index 070da5fd..00000000
--- a/xorg/server/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-moduledir := $(shell pkg-config xorg-server --variable moduledir)
-
-all: allmake
-
-allmake:
- cd module; $(MAKE) $(MFLAGS)
- cd xrdpdev; $(MAKE) $(MFLAGS)
- cd xrdpkeyb; $(MAKE) $(MFLAGS)
- cd xrdpmouse; $(MAKE) $(MFLAGS)
-
-clean: allclean
-
-allclean:
- cd module; $(MAKE) clean
- cd xrdpdev; $(MAKE) clean
- cd xrdpkeyb; $(MAKE) clean
- cd xrdpmouse; $(MAKE) clean
-
-xinstall:
- strip module/libxorgxrdp.so
- strip xrdpdev/xrdpdev_drv.so
- strip xrdpmouse/xrdpmouse_drv.so
- strip xrdpkeyb/xrdpkeyb_drv.so
-
- mkdir -p $(HOME)/xorg-modules/drivers $(HOME)/xorg-modules/input
- cp module/libxorgxrdp.so $(HOME)/xorg-modules/
- cp xrdpdev/xrdpdev_drv.so $(HOME)/xorg-modules/drivers/
- cp xrdpmouse/xrdpmouse_drv.so $(HOME)/xorg-modules/input/
- cp xrdpkeyb/xrdpkeyb_drv.so $(HOME)/xorg-modules/input/
-
-install:
- install --directory $(DESTDIR)$(moduledir) $(DESTDIR)$(moduledir)/drivers $(DESTDIR)$(moduledir)/input
- install --mode=0644 --strip module/libxorgxrdp.so $(DESTDIR)$(moduledir)
- install --mode=0644 --strip xrdpdev/xrdpdev_drv.so $(DESTDIR)$(moduledir)/drivers/
- install --mode=0644 --strip xrdpmouse/xrdpmouse_drv.so $(DESTDIR)$(moduledir)/input/
- install --mode=0644 --strip xrdpkeyb/xrdpkeyb_drv.so $(DESTDIR)$(moduledir)/input/
- install --directory /etc/X11/xrdp
- install xrdpdev/xorg.conf /etc/X11/xrdp/
diff --git a/xorg/server/Makefile.am b/xorg/server/Makefile.am
new file mode 100644
index 00000000..bee2ef75
--- /dev/null
+++ b/xorg/server/Makefile.am
@@ -0,0 +1,7 @@
+EXTRA_DIST = bootstrap readme.txt
+
+SUBDIRS = \
+ module \
+ xrdpdev \
+ xrdpkeyb \
+ xrdpmouse
diff --git a/xorg/server/bootstrap b/xorg/server/bootstrap
new file mode 100755
index 00000000..ec344d3d
--- /dev/null
+++ b/xorg/server/bootstrap
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+which autoconf
+if ! test $? -eq 0
+then
+ echo "error, install autoconf"
+ exit 1
+fi
+
+which automake
+if ! test $? -eq 0
+then
+ echo "error, install automake"
+ exit 1
+fi
+
+which libtool
+if ! test $? -eq 0
+then
+ echo "error, install libtool"
+ exit 1
+fi
+
+which pkg-config
+if ! test $? -eq 0
+then
+ echo "error, install pkg-config"
+ exit 1
+fi
+
+touch configure.ac
+touch NEWS
+touch AUTHORS
+touch README
+touch ChangeLog
+autoreconf -fvi
diff --git a/xorg/server/configure.ac b/xorg/server/configure.ac
new file mode 100644
index 00000000..cb78dccf
--- /dev/null
+++ b/xorg/server/configure.ac
@@ -0,0 +1,35 @@
+# Process this file with autoconf to produce a configure script
+
+AC_PREREQ(2.59)
+AC_INIT([xrdpmod], [0.1.0], [xrdp-devel@lists.sourceforge.net])
+AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
+AM_INIT_AUTOMAKE([1.6 foreign])
+AC_PROG_CC
+AC_C_CONST
+AC_PROG_LIBTOOL
+
+AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
+
+AC_CHECK_HEADER([xorg/xorg-server.h], [],
+ [AC_MSG_ERROR([please install xserver-xorg-dev or xorg-x11-server-sdk])])
+
+PKG_CHECK_MODULES([XORG_SERVER], [xorg-server >= 0])
+AC_SUBST([XORG_SERVER_CFLAGS])
+AC_SUBST([XORG_SERVER_LIBS])
+
+moduledir=`pkg-config xorg-server --variable=moduledir`
+AC_SUBST([moduledir])
+
+if test "x${prefix}" = "xNONE" ; then
+sysconfdir="/etc";
+fi
+
+AC_CONFIG_FILES([Makefile
+ module/Makefile
+ xrdpdev/Makefile
+ xrdpkeyb/Makefile
+ xrdpmouse/Makefile
+])
+
+AC_OUTPUT
+
diff --git a/xorg/server/module/Makefile b/xorg/server/module/Makefile
deleted file mode 100644
index afcbc443..00000000
--- a/xorg/server/module/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-
-OBJS = rdpDraw.o rdpPri.o rdpGC.o rdpFillSpans.o rdpSetSpans.o rdpPutImage.o \
-rdpCopyArea.o rdpCopyPlane.o rdpPolyPoint.o rdpPolylines.o rdpPolySegment.o \
-rdpPolyRectangle.o rdpPolyArc.o rdpFillPolygon.o rdpPolyFillRect.o \
-rdpPolyFillArc.o rdpPolyText8.o rdpPolyText16.o rdpImageText8.o \
-rdpImageText16.o rdpImageGlyphBlt.o rdpPolyGlyphBlt.o rdpPushPixels.o \
-rdpCursor.o rdpMain.o rdpRandR.o rdpMisc.o rdpReg.o \
-rdpComposite.o rdpGlyphs.o rdpPixmap.o rdpInput.o rdpClientCon.o rdpCapture.o \
-rdpTrapezoids.o rdpXv.o rdpSimd.o
-
-;OBJS += cpuid_x86.o i420_to_rgb32_x86_sse2.o yv12_to_rgb32_x86_sse2.o yuy2_to_rgb32_x86_sse2.o uyvy_to_rgb32_x86_sse2.o a8r8g8b8_to_a8b8g8r8_box_x86_sse2.o
-;OBJS += cpuid_amd64.o i420_to_rgb32_amd64_sse2.o yv12_to_rgb32_amd64_sse2.o yuy2_to_rgb32_amd64_sse2.o uyvy_to_rgb32_amd64_sse2.o
-
-CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 \
--I../../../common
-
-;CFLAGS += -DSIMD_USE_ACCEL=1
-
-LDFLAGS =
-
-LIBS =
-
-all: libxorgxrdp.so
-
-libxorgxrdp.so: $(OBJS) Makefile
- $(CC) -shared -o libxorgxrdp.so $(LDFLAGS) $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) libxorgxrdp.so
-
-cpuid_x86.o: x86/cpuid_x86.asm
- yasm -f elf32 -g dwarf2 x86/cpuid_x86.asm
-
-i420_to_rgb32_x86_sse2.o: x86/i420_to_rgb32_x86_sse2.asm
- yasm -f elf32 -g dwarf2 x86/i420_to_rgb32_x86_sse2.asm
-
-yv12_to_rgb32_x86_sse2.o: x86/yv12_to_rgb32_x86_sse2.asm
- yasm -f elf32 -g dwarf2 x86/yv12_to_rgb32_x86_sse2.asm
-
-yuy2_to_rgb32_x86_sse2.o: x86/yuy2_to_rgb32_x86_sse2.asm
- yasm -f elf32 -g dwarf2 x86/yuy2_to_rgb32_x86_sse2.asm
-
-uyvy_to_rgb32_x86_sse2.o: x86/uyvy_to_rgb32_x86_sse2.asm
- yasm -f elf32 -g dwarf2 x86/uyvy_to_rgb32_x86_sse2.asm
-
-a8r8g8b8_to_a8b8g8r8_box_x86_sse2.o: x86/a8r8g8b8_to_a8b8g8r8_box_x86_sse2.asm
- yasm -f elf32 -g dwarf2 x86/a8r8g8b8_to_a8b8g8r8_box_x86_sse2.asm
-
-cpuid_amd64.o: amd64/cpuid_amd64.asm
- yasm -f elf64 -g dwarf2 amd64/cpuid_amd64.asm
-
-i420_to_rgb32_amd64_sse2.o: amd64/i420_to_rgb32_amd64_sse2.asm
- yasm -f elf64 -g dwarf2 amd64/i420_to_rgb32_amd64_sse2.asm
-
-yv12_to_rgb32_amd64_sse2.o: amd64/yv12_to_rgb32_amd64_sse2.asm
- yasm -f elf64 -g dwarf2 amd64/yv12_to_rgb32_amd64_sse2.asm
-
-yuy2_to_rgb32_amd64_sse2.o: amd64/yuy2_to_rgb32_amd64_sse2.asm
- yasm -f elf64 -g dwarf2 amd64/yuy2_to_rgb32_amd64_sse2.asm
-
-uyvy_to_rgb32_amd64_sse2.o: amd64/uyvy_to_rgb32_amd64_sse2.asm
- yasm -f elf64 -g dwarf2 amd64/uyvy_to_rgb32_amd64_sse2.asm
-
diff --git a/xorg/server/module/Makefile.am b/xorg/server/module/Makefile.am
new file mode 100644
index 00000000..07b24edc
--- /dev/null
+++ b/xorg/server/module/Makefile.am
@@ -0,0 +1,22 @@
+EXTRA_DIST =
+
+AM_CFLAGS = \
+ $(XORG_SERVER_CFLAGS) \
+ -I../../../common
+
+libxorgxrdp_la_LTLIBRARIES = libxorgxrdp.la
+
+libxorgxrdp_la_LDFLAGS = -module -avoid-version
+
+libxorgxrdp_ladir = $(moduledir)
+
+libxorgxrdp_la_SOURCES = rdpDraw.c rdpPri.c rdpGC.c rdpFillSpans.c \
+rdpSetSpans.c rdpPutImage.c rdpCopyArea.c rdpCopyPlane.c rdpPolyPoint.c \
+rdpPolylines.c rdpPolySegment.c rdpPolyRectangle.c rdpPolyArc.c \
+rdpFillPolygon.c rdpPolyFillRect.c rdpPolyFillArc.c rdpPolyText8.c \
+rdpPolyText16.c rdpImageText8.c rdpImageText16.c rdpImageGlyphBlt.c \
+rdpPolyGlyphBlt.c rdpPushPixels.c rdpCursor.c rdpMain.c rdpRandR.c \
+rdpMisc.c rdpReg.c rdpComposite.c rdpGlyphs.c rdpPixmap.c rdpInput.c \
+rdpClientCon.c rdpCapture.c rdpTrapezoids.c rdpXv.c rdpSimd.c
+
+libxorgxrdp_la_LIBADD =
diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h
index b39ebd3a..711750a2 100644
--- a/xorg/server/module/rdp.h
+++ b/xorg/server/module/rdp.h
@@ -23,6 +23,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define _RDP_H
#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
#include <scrnintstr.h>
#include <gcstruct.h>
#include <mipointer.h>
diff --git a/xorg/server/module/rdpCapture.c b/xorg/server/module/rdpCapture.c
index d29c8608..69a5f147 100644
--- a/xorg/server/module/rdpCapture.c
+++ b/xorg/server/module/rdpCapture.c
@@ -24,6 +24,7 @@
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@
#include "rdpClientCon.h"
#include "rdpReg.h"
#include "rdpMisc.h"
+#include "rdpCapture.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpCapture.h b/xorg/server/module/rdpCapture.h
index 8b4d4615..c138947a 100644
--- a/xorg/server/module/rdpCapture.h
+++ b/xorg/server/module/rdpCapture.h
@@ -18,7 +18,14 @@
* Routines to copy regions from framebuffer to shared memory
*/
-Bool
+#ifndef __RDPCAPTURE_H
+#define __RDPCAPTURE_H
+
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT Bool
rdpCapture(rdpClientCon *clientCon,
RegionPtr in_reg, BoxPtr *out_rects, int *num_out_rects,
void *src, int src_width, int src_height,
@@ -26,8 +33,9 @@ rdpCapture(rdpClientCon *clientCon,
void *dst, int dst_width, int dst_height,
int dst_stride, int dst_format, int mode);
-int
+extern _X_EXPORT int
a8r8g8b8_to_a8b8g8r8_box(char *s8, int src_stride,
char *d8, int dst_stride,
int width, int height);
+#endif
diff --git a/xorg/server/module/rdpClientCon.c b/xorg/server/module/rdpClientCon.c
index 35369063..21df291f 100644
--- a/xorg/server/module/rdpClientCon.c
+++ b/xorg/server/module/rdpClientCon.c
@@ -31,6 +31,7 @@ Client connection to xrdp
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/module/rdpClientCon.h b/xorg/server/module/rdpClientCon.h
index a66abbcd..954e3ab0 100644
--- a/xorg/server/module/rdpClientCon.h
+++ b/xorg/server/module/rdpClientCon.h
@@ -21,6 +21,10 @@ Client connection to xrdp
*/
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
/* in xrdp/common */
#include "xrdp_client_info.h"
#include "xrdp_constants.h"
@@ -108,55 +112,55 @@ struct _rdpClientCon
struct _rdpClientCon *next;
};
-int
+extern _X_EXPORT int
rdpClientConBeginUpdate(rdpPtr dev, rdpClientCon *clientCon);
-int
+extern _X_EXPORT int
rdpClientConEndUpdate(rdpPtr dev, rdpClientCon *clientCon);
-int
+extern _X_EXPORT int
rdpClientConSetFgcolor(rdpPtr dev, rdpClientCon *clientCon, int fgcolor);
-void
+extern _X_EXPORT void
rdpClientConSendArea(rdpPtr dev, rdpClientCon *clientCon,
struct image_data *id, int x, int y, int w, int h);
-int
+extern _X_EXPORT int
rdpClientConFillRect(rdpPtr dev, rdpClientCon *clientCon,
short x, short y, int cx, int cy);
-int
+extern _X_EXPORT int
rdpClientConCheck(ScreenPtr pScreen);
-int
+extern _X_EXPORT int
rdpClientConInit(rdpPtr dev);
-int
+extern _X_EXPORT int
rdpClientConDeinit(rdpPtr dev);
-int
+extern _X_EXPORT int
rdpClientConDeleteOsSurface(rdpPtr dev, rdpClientCon *clientCon, int rdpindex);
-int
+extern _X_EXPORT int
rdpClientConRemoveOsBitmap(rdpPtr dev, rdpClientCon *clientCon, int rdpindex);
-void
+extern _X_EXPORT void
rdpClientConScheduleDeferredUpdate(rdpPtr dev);
-int
+extern _X_EXPORT int
rdpClientConCheckDirtyScreen(rdpPtr dev, rdpClientCon *clientCon);
-int
+extern _X_EXPORT int
rdpClientConAddDirtyScreenReg(rdpPtr dev, rdpClientCon *clientCon,
RegionPtr reg);
-int
+extern _X_EXPORT int
rdpClientConAddDirtyScreenBox(rdpPtr dev, rdpClientCon *clientCon,
BoxPtr box);
-int
+extern _X_EXPORT int
rdpClientConAddDirtyScreen(rdpPtr dev, rdpClientCon *clientCon,
int x, int y, int cx, int cy);
-void
+extern _X_EXPORT void
rdpClientConGetScreenImageRect(rdpPtr dev, rdpClientCon *clientCon,
struct image_data *id);
-int
+extern _X_EXPORT int
rdpClientConAddAllReg(rdpPtr dev, RegionPtr reg, DrawablePtr pDrawable);
-int
+extern _X_EXPORT int
rdpClientConAddAllBox(rdpPtr dev, BoxPtr box, DrawablePtr pDrawable);
-int
+extern _X_EXPORT int
rdpClientConSetCursor(rdpPtr dev, rdpClientCon *clientCon,
short x, short y, char *cur_data, char *cur_mask);
-int
+extern _X_EXPORT int
rdpClientConSetCursorEx(rdpPtr dev, rdpClientCon *clientCon,
short x, short y, char *cur_data,
char *cur_mask, int bpp);
diff --git a/xorg/server/module/rdpComposite.c b/xorg/server/module/rdpComposite.c
index 7535d6c3..8c65ff1b 100644
--- a/xorg/server/module/rdpComposite.c
+++ b/xorg/server/module/rdpComposite.c
@@ -27,6 +27,7 @@ composite(alpha blending) calls
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/module/rdpComposite.h b/xorg/server/module/rdpComposite.h
index 017cb41d..1c052ed8 100644
--- a/xorg/server/module/rdpComposite.h
+++ b/xorg/server/module/rdpComposite.h
@@ -24,7 +24,11 @@ composite(alpha blending) calls
#ifndef _RDPCOMPOSITE_H
#define _RDPCOMPOSITE_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
INT16 yDst, CARD16 width, CARD16 height);
diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c
index 708891f6..f135af6e 100644
--- a/xorg/server/module/rdpCopyArea.c
+++ b/xorg/server/module/rdpCopyArea.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpCopyArea.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpCopyArea.h b/xorg/server/module/rdpCopyArea.h
index 654b6edc..881a8714 100644
--- a/xorg/server/module/rdpCopyArea.h
+++ b/xorg/server/module/rdpCopyArea.h
@@ -22,6 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPCOPYAREA_H
#define __RDPCOPYAREA_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
RegionPtr
rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty);
diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c
index 9ccf4c0a..3ce3d558 100644
--- a/xorg/server/module/rdpCopyPlane.c
+++ b/xorg/server/module/rdpCopyPlane.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpCopyPlane.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpCopyPlane.h b/xorg/server/module/rdpCopyPlane.h
index 6abd0293..66b372c9 100644
--- a/xorg/server/module/rdpCopyPlane.h
+++ b/xorg/server/module/rdpCopyPlane.h
@@ -22,6 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPCOPYPLANE_H
#define __RDPCOPYPLANE_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
RegionPtr
rdpCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
GCPtr pGC, int srcx, int srcy, int width, int height,
diff --git a/xorg/server/module/rdpCursor.c b/xorg/server/module/rdpCursor.c
index d4862df7..f85999de 100644
--- a/xorg/server/module/rdpCursor.c
+++ b/xorg/server/module/rdpCursor.c
@@ -27,6 +27,7 @@ cursor
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -45,6 +46,7 @@ cursor
#include "rdpMain.h"
#include "rdpDraw.h"
#include "rdpClientCon.h"
+#include "rdpCursor.h"
#ifndef X_BYTE_ORDER
#warning X_BYTE_ORDER not defined
diff --git a/xorg/server/module/rdpCursor.h b/xorg/server/module/rdpCursor.h
index 10a57d70..1be09f61 100644
--- a/xorg/server/module/rdpCursor.h
+++ b/xorg/server/module/rdpCursor.h
@@ -25,20 +25,21 @@ misc draw calls
#define __RDPCURSOR_H
#include <xorg-server.h>
+#include <xorgVersion.h>
#include <xf86.h>
-Bool
+extern _X_EXPORT Bool
rdpSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs);
-Bool
+extern _X_EXPORT Bool
rdpSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs);
-void
+extern _X_EXPORT void
rdpSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs,
int x, int y);
-void
+extern _X_EXPORT void
rdpSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScr, int x, int y);
-Bool
+extern _X_EXPORT Bool
rdpSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr);
-void
+extern _X_EXPORT void
rdpSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr);
#endif
diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h
index af65b46c..583ac7d1 100644
--- a/xorg/server/module/rdpDraw.h
+++ b/xorg/server/module/rdpDraw.h
@@ -65,29 +65,29 @@ do { \
extern GCOps g_rdpGCOps; /* in rdpGC.c */
-int
+extern _X_EXPORT int
rdpDrawGetClip(rdpPtr dev, RegionPtr pRegion, DrawablePtr pDrawable, GCPtr pGC);
-void
+extern _X_EXPORT void
GetTextBoundingBox(DrawablePtr pDrawable, FontPtr font, int x, int y,
int n, BoxPtr pbox);
-int
+extern _X_EXPORT int
rdpDrawItemAdd(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di);
-int
+extern _X_EXPORT int
rdpDrawItemRemove(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di);
-int
+extern _X_EXPORT int
rdpDrawItemRemoveAll(rdpPtr dev, rdpPixmapRec *priv);
-void
+extern _X_EXPORT void
rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion);
#if XRDP_CLOSESCR == 1
-Bool
+extern _X_EXPORT Bool
rdpCloseScreen(int index, ScreenPtr pScreen);
#else
-Bool
+extern _X_EXPORT Bool
rdpCloseScreen(ScreenPtr pScreen);
#endif
-WindowPtr
+extern _X_EXPORT WindowPtr
rdpGetRootWindowPtr(ScreenPtr pScreen);
-rdpPtr
+extern _X_EXPORT rdpPtr
rdpGetDevFromScreen(ScreenPtr pScreen);
#endif
diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c
index 34fe4096..fdcc3472 100644
--- a/xorg/server/module/rdpFillPolygon.c
+++ b/xorg/server/module/rdpFillPolygon.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpFillPolygon.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpFillPolygon.h b/xorg/server/module/rdpFillPolygon.h
index cdbfb13a..6c929dd9 100644
--- a/xorg/server/module/rdpFillPolygon.h
+++ b/xorg/server/module/rdpFillPolygon.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPFILLPOLYGON_H
#define __RDPFILLPOLYGON_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
int shape, int mode, int count,
DDXPointPtr pPts);
diff --git a/xorg/server/module/rdpFillSpans.c b/xorg/server/module/rdpFillSpans.c
index 8e98940a..0afb664d 100644
--- a/xorg/server/module/rdpFillSpans.c
+++ b/xorg/server/module/rdpFillSpans.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -32,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h"
#include "rdpDraw.h"
+#include "rdpFillSpans.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpFillSpans.h b/xorg/server/module/rdpFillSpans.h
index 5c1db533..ed1f6331 100644
--- a/xorg/server/module/rdpFillSpans.h
+++ b/xorg/server/module/rdpFillSpans.h
@@ -22,6 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPFILLSPANS_H
#define __RDPFILLSPANS_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
void
rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
DDXPointPtr pptInit, int* pwidthInit, int fSorted);
diff --git a/xorg/server/module/rdpGC.c b/xorg/server/module/rdpGC.c
index f2668f3d..db5983e2 100644
--- a/xorg/server/module/rdpGC.c
+++ b/xorg/server/module/rdpGC.c
@@ -27,6 +27,7 @@ GC related calls
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -59,6 +60,7 @@ GC related calls
#include "rdpPolyGlyphBlt.h"
#include "rdpPushPixels.h"
#include "rdpDraw.h"
+#include "rdpGC.h"
/******************************************************************************/
#define LOG_LEVEL 1
diff --git a/xorg/server/module/rdpGC.h b/xorg/server/module/rdpGC.h
index fcdd201d..11b0ef8b 100644
--- a/xorg/server/module/rdpGC.h
+++ b/xorg/server/module/rdpGC.h
@@ -24,7 +24,11 @@ GC related calls
#ifndef _RDPGC_H
#define _RDPGC_H
-Bool
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT Bool
rdpCreateGC(GCPtr pGC);
#endif
diff --git a/xorg/server/module/rdpGlyphs.c b/xorg/server/module/rdpGlyphs.c
index e6fcbb30..1f97c3f1 100644
--- a/xorg/server/module/rdpGlyphs.c
+++ b/xorg/server/module/rdpGlyphs.c
@@ -27,6 +27,7 @@ gylph(font) calls
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/module/rdpGlyphs.h b/xorg/server/module/rdpGlyphs.h
index 0128fe7c..cbb2ca8b 100644
--- a/xorg/server/module/rdpGlyphs.h
+++ b/xorg/server/module/rdpGlyphs.h
@@ -24,6 +24,10 @@ gylph(font) calls
#ifndef _RDPGLYPHS_H
#define _RDPGLYPHS_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
struct rdp_font_char
{
int offset; /* x */
@@ -51,9 +55,9 @@ struct rdp_text
struct rdp_text* next;
};
-int
+extern _X_EXPORT int
rdpGlyphDeleteRdpText(struct rdp_text* rtext);
-void
+extern _X_EXPORT void
rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat,
INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists,
diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c
index 74693fd9..0d1a7d6e 100644
--- a/xorg/server/module/rdpImageGlyphBlt.c
+++ b/xorg/server/module/rdpImageGlyphBlt.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpImageGlyphBlt.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpImageGlyphBlt.h b/xorg/server/module/rdpImageGlyphBlt.h
index b71e5730..6857ee1b 100644
--- a/xorg/server/module/rdpImageGlyphBlt.h
+++ b/xorg/server/module/rdpImageGlyphBlt.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPIMAGEGLYPHBLT_H
#define __RDPIMAGEGLYPHBLT_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr* ppci, pointer pglyphBase);
diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c
index 7ad8012b..d1038912 100644
--- a/xorg/server/module/rdpImageText16.c
+++ b/xorg/server/module/rdpImageText16.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpImageText16.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpImageText16.h b/xorg/server/module/rdpImageText16.h
index b7d0a861..e2f2b03e 100644
--- a/xorg/server/module/rdpImageText16.h
+++ b/xorg/server/module/rdpImageText16.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPIMAGETEXT16_H
#define __RDPIMAGETEXT16_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short* chars);
diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c
index abcfbff0..068f6d6d 100644
--- a/xorg/server/module/rdpImageText8.c
+++ b/xorg/server/module/rdpImageText8.c
@@ -25,7 +25,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
-
+#include <xorgVersion.h>
+
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpImageText8.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpImageText8.h b/xorg/server/module/rdpImageText8.h
index cf7dd1bb..fbc67a10 100644
--- a/xorg/server/module/rdpImageText8.h
+++ b/xorg/server/module/rdpImageText8.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPIMAGETEXT8_H
#define __RDPIMAGETEXT8_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char* chars);
diff --git a/xorg/server/module/rdpInput.c b/xorg/server/module/rdpInput.c
index 2344f4a1..baf1ff3c 100644
--- a/xorg/server/module/rdpInput.c
+++ b/xorg/server/module/rdpInput.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/module/rdpInput.h b/xorg/server/module/rdpInput.h
index c0991ace..98a0c239 100644
--- a/xorg/server/module/rdpInput.h
+++ b/xorg/server/module/rdpInput.h
@@ -24,23 +24,27 @@ input
#ifndef _RDPINPUT_H
#define _RDPINPUT_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
typedef int (*rdpInputEventProcPtr)(rdpPtr dev, int msg,
long param1, long param2,
long param3, long param4);
-int
+extern _X_EXPORT int
rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc);
-int
+extern _X_EXPORT int
rdpUnregisterInputCallback(rdpInputEventProcPtr proc);
-int
+extern _X_EXPORT int
rdpInputKeyboardEvent(rdpPtr dev, int msg,
long param1, long param2,
long param3, long param4);
-int
+extern _X_EXPORT int
rdpInputMouseEvent(rdpPtr dev, int msg,
long param1, long param2,
long param3, long param4);
-int
+extern _X_EXPORT int
rdpInputInit(void);
#endif
diff --git a/xorg/server/module/rdpMain.c b/xorg/server/module/rdpMain.c
index 2f6db7c7..835be9db 100644
--- a/xorg/server/module/rdpMain.c
+++ b/xorg/server/module/rdpMain.c
@@ -27,6 +27,7 @@ rdp module main
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -41,6 +42,7 @@ rdp module main
#include "rdpInput.h"
#include "rdpDraw.h"
#include "rdpClientCon.h"
+#include "rdpMain.h"
/******************************************************************************/
#define LOG_LEVEL 1
diff --git a/xorg/server/module/rdpMain.h b/xorg/server/module/rdpMain.h
index 2d2cfbe1..33fc0e04 100644
--- a/xorg/server/module/rdpMain.h
+++ b/xorg/server/module/rdpMain.h
@@ -24,7 +24,11 @@ rdp module main
#ifndef __RDPMAIN_H
#define __RDPMAIN_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
xorgxrdpDownDown(ScreenPtr pScreen);
#endif
diff --git a/xorg/server/module/rdpMisc.c b/xorg/server/module/rdpMisc.c
index 653342fe..c7a61fc8 100644
--- a/xorg/server/module/rdpMisc.c
+++ b/xorg/server/module/rdpMisc.c
@@ -36,11 +36,14 @@ the rest
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
#include <xf86_OSproc.h>
+#include "rdpMisc.h"
+
/******************************************************************************/
int
rdpBitsPerPixel(int depth)
diff --git a/xorg/server/module/rdpMisc.h b/xorg/server/module/rdpMisc.h
index 58f6bd31..07c6ec0d 100644
--- a/xorg/server/module/rdpMisc.h
+++ b/xorg/server/module/rdpMisc.h
@@ -24,59 +24,63 @@ the rest
#ifndef __RDPMISC_H
#define __RDPMISC_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
#include <X11/Xos.h>
-int
+extern _X_EXPORT int
rdpBitsPerPixel(int depth);
-int
+extern _X_EXPORT int
g_sck_can_recv(int sck, int millis);
-int
+extern _X_EXPORT int
g_sck_recv(int sck, void *ptr, int len, int flags);
-void
+extern _X_EXPORT void
g_sck_close(int sck);
-int
+extern _X_EXPORT int
g_sck_last_error_would_block(int sck);
-void
+extern _X_EXPORT void
g_sleep(int msecs);
-int
+extern _X_EXPORT int
g_sck_send(int sck, void *ptr, int len, int flags);
-void *
+extern _X_EXPORT void *
g_malloc(int size, int zero);
-void
+extern _X_EXPORT void
g_free(void *ptr);
-void
+extern _X_EXPORT void
g_sprintf(char *dest, char *format, ...);
-int
+extern _X_EXPORT int
g_sck_tcp_socket(void);
-int
+extern _X_EXPORT int
g_sck_local_socket_dgram(void);
-int
+extern _X_EXPORT int
g_sck_local_socket_stream(void);
-void
+extern _X_EXPORT void
g_memcpy(void *d_ptr, const void *s_ptr, int size);
-void
+extern _X_EXPORT void
g_memset(void *d_ptr, const unsigned char chr, int size);
-int
+extern _X_EXPORT int
g_sck_tcp_set_no_delay(int sck);
-int
+extern _X_EXPORT int
g_sck_set_non_blocking(int sck);
-int
+extern _X_EXPORT int
g_sck_accept(int sck);
-int
+extern _X_EXPORT int
g_sck_select(int sck1, int sck2, int sck3);
-int
+extern _X_EXPORT int
g_sck_tcp_bind(int sck, char *port);
-int
+extern _X_EXPORT int
g_sck_local_bind(int sck, char *port);
-int
+extern _X_EXPORT int
g_sck_listen(int sck);
-int
+extern _X_EXPORT int
g_create_dir(const char *dirname);
-int
+extern _X_EXPORT int
g_directory_exist(const char *dirname);
-int
+extern _X_EXPORT int
g_chmod_hex(const char *filename, int flags);
-void
+extern _X_EXPORT void
g_hexdump(void *p, long len);
#if defined(X_BYTE_ORDER)
diff --git a/xorg/server/module/rdpPixmap.h b/xorg/server/module/rdpPixmap.h
index 7fce3186..e1c7c7ac 100644
--- a/xorg/server/module/rdpPixmap.h
+++ b/xorg/server/module/rdpPixmap.h
@@ -26,6 +26,7 @@ pixmap calls
#include <xorg-server.h>
#include <xorgVersion.h>
+#include <xf86.h>
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 5, 0, 0, 0)
/* 1.1, 1.2, 1.3, 1.4 */
@@ -36,16 +37,16 @@ pixmap calls
#endif
#if XRDP_PIX == 2
-PixmapPtr
+extern _X_EXPORT PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint);
#else
-PixmapPtr
+extern _X_EXPORT PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth);
#endif
-Bool
+extern _X_EXPORT Bool
rdpDestroyPixmap(PixmapPtr pPixmap);
-Bool
+extern _X_EXPORT Bool
rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData);
diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c
index 9a701dd8..8db3cffe 100644
--- a/xorg/server/module/rdpPolyArc.c
+++ b/xorg/server/module/rdpPolyArc.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyArc.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyArc.h b/xorg/server/module/rdpPolyArc.h
index 7ebadc35..9af6566f 100644
--- a/xorg/server/module/rdpPolyArc.h
+++ b/xorg/server/module/rdpPolyArc.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYARC_H
#define __RDPPOLYARC_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
#endif
diff --git a/xorg/server/module/rdpPolyFillArc.c b/xorg/server/module/rdpPolyFillArc.c
index 437929ae..2ba49854 100644
--- a/xorg/server/module/rdpPolyFillArc.c
+++ b/xorg/server/module/rdpPolyFillArc.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyFillArc.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyFillArc.h b/xorg/server/module/rdpPolyFillArc.h
index 9a9846e1..708f8eae 100644
--- a/xorg/server/module/rdpPolyFillArc.h
+++ b/xorg/server/module/rdpPolyFillArc.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYFILLARC_H
#define __RDPPOLYFILLARC_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
#endif
diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c
index f61202b2..1b99b1e8 100644
--- a/xorg/server/module/rdpPolyFillRect.c
+++ b/xorg/server/module/rdpPolyFillRect.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyFillRect.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyFillRect.h b/xorg/server/module/rdpPolyFillRect.h
index 94ac4b59..ab2c3c5f 100644
--- a/xorg/server/module/rdpPolyFillRect.h
+++ b/xorg/server/module/rdpPolyFillRect.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYFILLRECT_H
#define __RDPPOLYFILLRECT_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
xRectangle* prectInit);
diff --git a/xorg/server/module/rdpPolyGlyphBlt.c b/xorg/server/module/rdpPolyGlyphBlt.c
index e43e676b..df48dcd4 100644
--- a/xorg/server/module/rdpPolyGlyphBlt.c
+++ b/xorg/server/module/rdpPolyGlyphBlt.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyGlyphBlt.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyGlyphBlt.h b/xorg/server/module/rdpPolyGlyphBlt.h
index 46ce1ac2..92b2dfbe 100644
--- a/xorg/server/module/rdpPolyGlyphBlt.h
+++ b/xorg/server/module/rdpPolyGlyphBlt.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYGLYPHBLT_H
#define __RDPPOLYGLYPHBLT_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr* ppci, pointer pglyphBase);
diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c
index 5dfac5ef..9624f829 100644
--- a/xorg/server/module/rdpPolyPoint.c
+++ b/xorg/server/module/rdpPolyPoint.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyPoint.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyPoint.h b/xorg/server/module/rdpPolyPoint.h
index 06d1d428..9acc4d10 100644
--- a/xorg/server/module/rdpPolyPoint.h
+++ b/xorg/server/module/rdpPolyPoint.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYPOINT_H
#define __RDPPOLYPOINT_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr in_pts);
diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c
index 18311907..946e798a 100644
--- a/xorg/server/module/rdpPolyRectangle.c
+++ b/xorg/server/module/rdpPolyRectangle.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyRectangle.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyRectangle.h b/xorg/server/module/rdpPolyRectangle.h
index d09446d5..6cd190d9 100644
--- a/xorg/server/module/rdpPolyRectangle.h
+++ b/xorg/server/module/rdpPolyRectangle.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYRECTANGLE_H
#define __RDPPOLYRECTANGLE_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
xRectangle* rects);
diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c
index 98e4eb1f..ad01bda1 100644
--- a/xorg/server/module/rdpPolySegment.c
+++ b/xorg/server/module/rdpPolySegment.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolySegment.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolySegment.h b/xorg/server/module/rdpPolySegment.h
index 104fc37d..37756ae1 100644
--- a/xorg/server/module/rdpPolySegment.h
+++ b/xorg/server/module/rdpPolySegment.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYSEGMENT_H
#define __RDPPOLYSEGMENT_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment* pSegs);
#endif
diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c
index 90d68a8c..eaa34323 100644
--- a/xorg/server/module/rdpPolyText16.c
+++ b/xorg/server/module/rdpPolyText16.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyText16.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyText16.h b/xorg/server/module/rdpPolyText16.h
index 9719a890..c94a8fd9 100644
--- a/xorg/server/module/rdpPolyText16.h
+++ b/xorg/server/module/rdpPolyText16.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYTEXT16_H
#define __RDPPOLYTEXT16_H
-int
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT int
rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short* chars);
diff --git a/xorg/server/module/rdpPolyText8.c b/xorg/server/module/rdpPolyText8.c
index 630bc04e..aa744b59 100644
--- a/xorg/server/module/rdpPolyText8.c
+++ b/xorg/server/module/rdpPolyText8.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolyText8.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolyText8.h b/xorg/server/module/rdpPolyText8.h
index 621251b9..64ce2f3e 100644
--- a/xorg/server/module/rdpPolyText8.h
+++ b/xorg/server/module/rdpPolyText8.h
@@ -22,6 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYTEXT8_H
#define __RDPPOLYTEXT8_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
int
rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char* chars);
diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c
index da979e9f..cd87ecf3 100644
--- a/xorg/server/module/rdpPolylines.c
+++ b/xorg/server/module/rdpPolylines.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPolylines.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPolylines.h b/xorg/server/module/rdpPolylines.h
index 56b66a77..db11d69c 100644
--- a/xorg/server/module/rdpPolylines.h
+++ b/xorg/server/module/rdpPolylines.h
@@ -22,6 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPOLYLINES_H
#define __RDPPOLYLINES_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
void
rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr pptInit);
diff --git a/xorg/server/module/rdpPri.h b/xorg/server/module/rdpPri.h
index 97e570f5..f312c88c 100644
--- a/xorg/server/module/rdpPri.h
+++ b/xorg/server/module/rdpPri.h
@@ -24,24 +24,28 @@ to deal with privates changing in xorg versions
#ifndef _XRDPPRI_H
#define _XRDPPRI_H
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
#include <screenint.h>
#include <gc.h>
typedef void* rdpDevPrivateKey;
-rdpDevPrivateKey
+extern _X_EXPORT rdpDevPrivateKey
rdpAllocateGCPrivate(ScreenPtr pScreen, int bytes);
-rdpDevPrivateKey
+extern _X_EXPORT rdpDevPrivateKey
rdpAllocatePixmapPrivate(ScreenPtr pScreen, int bytes);
-rdpDevPrivateKey
+extern _X_EXPORT rdpDevPrivateKey
rdpAllocateWindowPrivate(ScreenPtr pScreen, int bytes);
-void*
+extern _X_EXPORT void*
rdpGetGCPrivate(GCPtr pGC, rdpDevPrivateKey key);
-void*
+extern _X_EXPORT void*
rdpGetPixmapPrivate(PixmapPtr pPixmap, rdpDevPrivateKey key);
-void*
+extern _X_EXPORT void*
rdpGetWindowPrivate(WindowPtr pWindow, rdpDevPrivateKey key);
-int
+extern _X_EXPORT int
rdpPrivateInit(void);
#endif
diff --git a/xorg/server/module/rdpPushPixels.c b/xorg/server/module/rdpPushPixels.c
index 8ab046b8..902b4251 100644
--- a/xorg/server/module/rdpPushPixels.c
+++ b/xorg/server/module/rdpPushPixels.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -32,13 +33,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h"
#include "rdpDraw.h"
+#include "rdpPushPixels.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
/******************************************************************************/
-void
+static void
rdpPushPixelsOrg(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
int w, int h, int x, int y)
{
diff --git a/xorg/server/module/rdpPushPixels.h b/xorg/server/module/rdpPushPixels.h
index a3e49482..afc336de 100644
--- a/xorg/server/module/rdpPushPixels.h
+++ b/xorg/server/module/rdpPushPixels.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPUSHPIXELS_H
#define __RDPPUSHPIXELS_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
int w, int h, int x, int y);
diff --git a/xorg/server/module/rdpPutImage.c b/xorg/server/module/rdpPutImage.c
index b7134479..39bf284e 100644
--- a/xorg/server/module/rdpPutImage.c
+++ b/xorg/server/module/rdpPutImage.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -34,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
+#include "rdpPutImage.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpPutImage.h b/xorg/server/module/rdpPutImage.h
index f50a9528..2df9a801 100644
--- a/xorg/server/module/rdpPutImage.h
+++ b/xorg/server/module/rdpPutImage.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPPUTIMAGE_H
#define __RDPPUTIMAGE_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
int w, int h, int leftPad, int format, char* pBits);
diff --git a/xorg/server/module/rdpRandR.c b/xorg/server/module/rdpRandR.c
index 220774e3..049aafab 100644
--- a/xorg/server/module/rdpRandR.c
+++ b/xorg/server/module/rdpRandR.c
@@ -42,6 +42,7 @@ RandR draw calls
#include "rdpDraw.h"
#include "rdpReg.h"
#include "rdpMisc.h"
+#include "rdpRandR.h"
/******************************************************************************/
#define LOG_LEVEL 1
diff --git a/xorg/server/module/rdpRandR.h b/xorg/server/module/rdpRandR.h
index caadf336..ab31e345 100644
--- a/xorg/server/module/rdpRandR.h
+++ b/xorg/server/module/rdpRandR.h
@@ -22,38 +22,42 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _RDPRANDR_H
#define _RDPRANDR_H
-Bool
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT Bool
rdpRRRegisterSize(ScreenPtr pScreen, int width, int height);
-Bool
+extern _X_EXPORT Bool
rdpRRGetInfo(ScreenPtr pScreen, Rotation* pRotations);
-Bool
+extern _X_EXPORT Bool
rdpRRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
RRScreenSizePtr pSize);
-Bool
+extern _X_EXPORT Bool
rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
CARD32 mmWidth, CARD32 mmHeight);
-Bool
+extern _X_EXPORT Bool
rdpRRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode,
int x, int y, Rotation rotation, int numOutputs,
RROutputPtr* outputs);
-Bool
+extern _X_EXPORT Bool
rdpRRCrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr crtc);
-Bool
+extern _X_EXPORT Bool
rdpRRCrtcGetGamma(ScreenPtr pScreen, RRCrtcPtr crtc);
-Bool
+extern _X_EXPORT Bool
rdpRROutputSetProperty(ScreenPtr pScreen, RROutputPtr output, Atom property,
RRPropertyValuePtr value);
-Bool
+extern _X_EXPORT Bool
rdpRROutputValidateMode(ScreenPtr pScreen, RROutputPtr output,
RRModePtr mode);
-void
+extern _X_EXPORT void
rdpRRModeDestroy(ScreenPtr pScreen, RRModePtr mode);
-Bool
+extern _X_EXPORT Bool
rdpRROutputGetProperty(ScreenPtr pScreen, RROutputPtr output, Atom property);
-Bool
+extern _X_EXPORT Bool
rdpRRGetPanning(ScreenPtr pScrn, RRCrtcPtr crtc, BoxPtr totalArea,
BoxPtr trackingArea, INT16* border);
-Bool
+extern _X_EXPORT Bool
rdpRRSetPanning(ScreenPtr pScrn, RRCrtcPtr crtc, BoxPtr totalArea,
BoxPtr trackingArea, INT16* border);
diff --git a/xorg/server/module/rdpReg.c b/xorg/server/module/rdpReg.c
index 8ff7d79d..30b13438 100644
--- a/xorg/server/module/rdpReg.c
+++ b/xorg/server/module/rdpReg.c
@@ -33,6 +33,8 @@ to deal with regions changing in xorg versions
#include <xf86.h>
#include <xf86_OSproc.h>
+#include "rdpReg.h"
+
/*
miRegionCopy -> RegionCopy
miTranslateRegion -> RegionTranslate
diff --git a/xorg/server/module/rdpReg.h b/xorg/server/module/rdpReg.h
index a5cd73bf..053cf6dd 100644
--- a/xorg/server/module/rdpReg.h
+++ b/xorg/server/module/rdpReg.h
@@ -24,41 +24,45 @@ to deal with regions changing in xorg versions
#ifndef __RDPREG_H
#define __RDPREG_H
-Bool
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT Bool
rdpRegionCopy(RegionPtr dst, RegionPtr src);
-void
+extern _X_EXPORT void
rdpRegionTranslate(RegionPtr pReg, int x, int y);
-Bool
+extern _X_EXPORT Bool
rdpRegionNotEmpty(RegionPtr pReg);
-Bool
+extern _X_EXPORT Bool
rdpRegionIntersect(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
-int
+extern _X_EXPORT int
rdpRegionContainsRect(RegionPtr region, BoxPtr prect);
-void
+extern _X_EXPORT void
rdpRegionInit(RegionPtr pReg, BoxPtr rect, int size);
-void
+extern _X_EXPORT void
rdpRegionUninit(RegionPtr pReg);
-RegionPtr
+extern _X_EXPORT RegionPtr
rdpRegionFromRects(int nrects, xRectanglePtr prect, int ctype);
-void
+extern _X_EXPORT void
rdpRegionDestroy(RegionPtr pReg);
-RegionPtr
+extern _X_EXPORT RegionPtr
rdpRegionCreate(BoxPtr rect, int size);
-Bool
+extern _X_EXPORT Bool
rdpRegionUnion(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
-Bool
+extern _X_EXPORT Bool
rdpRegionSubtract(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
-Bool
+extern _X_EXPORT Bool
rdpRegionInverse(RegionPtr newReg, RegionPtr reg1, BoxPtr invRect);
-BoxPtr
+extern _X_EXPORT BoxPtr
rdpRegionExtents(RegionPtr pReg);
-void
+extern _X_EXPORT void
rdpRegionReset(RegionPtr pReg, BoxPtr pBox);
-Bool
+extern _X_EXPORT Bool
rdpRegionBreak(RegionPtr pReg);
-void
+extern _X_EXPORT void
rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect);
-int
+extern _X_EXPORT int
rdpRegionPixelCount(RegionPtr pReg);
#endif
diff --git a/xorg/server/module/rdpSetSpans.c b/xorg/server/module/rdpSetSpans.c
index e31ec6d4..3cb30321 100644
--- a/xorg/server/module/rdpSetSpans.c
+++ b/xorg/server/module/rdpSetSpans.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
@@ -32,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h"
#include "rdpDraw.h"
+#include "rdpSetSpans.h"
#define LDEBUG 0
diff --git a/xorg/server/module/rdpSetSpans.h b/xorg/server/module/rdpSetSpans.h
index c6f73642..3b277f92 100644
--- a/xorg/server/module/rdpSetSpans.h
+++ b/xorg/server/module/rdpSetSpans.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RDPSETSPANS_H
#define __RDPSETSPANS_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
DDXPointPtr ppt, int* pwidth, int nspans, int fSorted);
diff --git a/xorg/server/module/rdpSimd.c b/xorg/server/module/rdpSimd.c
index 849ab7a2..be4bc736 100644
--- a/xorg/server/module/rdpSimd.c
+++ b/xorg/server/module/rdpSimd.c
@@ -36,6 +36,7 @@ SIMD function asign
#include "rdp.h"
#include "rdpXv.h"
#include "rdpCapture.h"
+#include "rdpSimd.h"
/* use simd, run time */
int g_simd_use_accel = 1;
diff --git a/xorg/server/module/rdpSimd.h b/xorg/server/module/rdpSimd.h
index 73bf1ba5..f73e110f 100644
--- a/xorg/server/module/rdpSimd.h
+++ b/xorg/server/module/rdpSimd.h
@@ -28,7 +28,7 @@ SIMD function asign
#include <xorgVersion.h>
#include <xf86.h>
-Bool
+extern _X_EXPORT Bool
rdpSimdInit(ScreenPtr pScreen, ScrnInfoPtr pScrn);
#endif
diff --git a/xorg/server/module/rdpTrapezoids.c b/xorg/server/module/rdpTrapezoids.c
index 212780ce..41304a71 100644
--- a/xorg/server/module/rdpTrapezoids.c
+++ b/xorg/server/module/rdpTrapezoids.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/module/rdpTrapezoids.h b/xorg/server/module/rdpTrapezoids.h
index 77738dc4..a98cacd3 100644
--- a/xorg/server/module/rdpTrapezoids.h
+++ b/xorg/server/module/rdpTrapezoids.h
@@ -22,7 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _RDPTRAPEZOIDS_H
#define _RDPTRAPEZOIDS_H
-void
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#include <xf86.h>
+
+extern _X_EXPORT void
rdpTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntrap, xTrapezoid *traps);
diff --git a/xorg/server/module/rdpXv.c b/xorg/server/module/rdpXv.c
index c820e299..15375720 100644
--- a/xorg/server/module/rdpXv.c
+++ b/xorg/server/module/rdpXv.c
@@ -43,6 +43,7 @@ XVideo
#include "rdpMisc.h"
#include "rdpReg.h"
#include "rdpClientCon.h"
+#include "rdpXv.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
diff --git a/xorg/server/module/rdpXv.h b/xorg/server/module/rdpXv.h
index 9cf28700..2dbbc729 100644
--- a/xorg/server/module/rdpXv.h
+++ b/xorg/server/module/rdpXv.h
@@ -28,16 +28,15 @@ XVideo
#include <xorgVersion.h>
#include <xf86.h>
-Bool
+extern _X_EXPORT Bool
rdpXvInit(ScreenPtr pScreen, ScrnInfoPtr pScrn);
-
-int
+extern _X_EXPORT int
YV12_to_RGB32(unsigned char *yuvs, int width, int height, int *rgbs);
-int
+extern _X_EXPORT int
I420_to_RGB32(unsigned char *yuvs, int width, int height, int *rgbs);
-int
+extern _X_EXPORT int
YUY2_to_RGB32(unsigned char *yuvs, int width, int height, int *rgbs);
-int
+extern _X_EXPORT int
UYVY_to_RGB32(unsigned char *yuvs, int width, int height, int *rgbs);
#endif
diff --git a/xorg/server/xrdpdev/Makefile b/xorg/server/xrdpdev/Makefile
deleted file mode 100644
index bd17699f..00000000
--- a/xorg/server/xrdpdev/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-
-OBJS = xrdpdev.o
-
-CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 \
--I../module -I../../../common
-
-LDFLAGS =
-
-LIBS =
-
-all: xrdpdev_drv.so
-
-xrdpdev_drv.so: $(OBJS) Makefile
- $(CC) -shared -o xrdpdev_drv.so $(LDFLAGS) $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) xrdpdev_drv.so
diff --git a/xorg/server/xrdpdev/Makefile.am b/xorg/server/xrdpdev/Makefile.am
new file mode 100644
index 00000000..be7f3689
--- /dev/null
+++ b/xorg/server/xrdpdev/Makefile.am
@@ -0,0 +1,17 @@
+EXTRA_DIST = \
+ xorg.conf
+
+AM_CFLAGS = \
+ $(XORG_SERVER_CFLAGS) \
+ -I../module \
+ -I../../../common
+
+xrdpdev_drv_la_LTLIBRARIES = xrdpdev_drv.la
+
+xrdpdev_drv_la_LDFLAGS = -module -avoid-version
+
+xrdpdev_drv_ladir = $(moduledir)/drivers
+
+xrdpdev_drv_la_SOURCES = xrdpdev.c
+
+xrdpdev_drv_la_LIBADD =
diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c
index 034e2fb4..29de4688 100644
--- a/xorg/server/xrdpdev/xrdpdev.c
+++ b/xorg/server/xrdpdev/xrdpdev.c
@@ -322,7 +322,7 @@ rdpDeferredRandR(OsTimerPtr timer, CARD32 now, pointer arg)
pScreen = (ScreenPtr) arg;
dev = rdpGetDevFromScreen(pScreen);
- LLOGLN(10, ("rdpDeferredRandR:"));
+ LLOGLN(0, ("rdpDeferredRandR:"));
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv == 0)
{
diff --git a/xorg/server/xrdpkeyb/Makefile b/xorg/server/xrdpkeyb/Makefile
deleted file mode 100644
index 8c81fcee..00000000
--- a/xorg/server/xrdpkeyb/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-
-OBJS = rdpKeyboard.o
-
-CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 \
--I../module -I../../../common
-
-LDFLAGS =
-
-LIBS =
-
-all: xrdpkeyb_drv.so
-
-xrdpkeyb_drv.so: $(OBJS) Makefile
- $(CC) -shared -o xrdpkeyb_drv.so $(LDFLAGS) $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) xrdpkeyb_drv.so
diff --git a/xorg/server/xrdpkeyb/Makefile.am b/xorg/server/xrdpkeyb/Makefile.am
new file mode 100644
index 00000000..f79f7af2
--- /dev/null
+++ b/xorg/server/xrdpkeyb/Makefile.am
@@ -0,0 +1,16 @@
+EXTRA_DIST =
+
+AM_CFLAGS = \
+ $(XORG_SERVER_CFLAGS) \
+ -I../module \
+ -I../../../common
+
+xrdpkeyb_drv_la_LTLIBRARIES = xrdpkeyb_drv.la
+
+xrdpkeyb_drv_la_LDFLAGS = -module -avoid-version
+
+xrdpkeyb_drv_ladir = $(moduledir)/input
+
+xrdpkeyb_drv_la_SOURCES = rdpKeyboard.c
+
+xrdpkeyb_drv_la_LIBADD =
diff --git a/xorg/server/xrdpkeyb/rdpKeyboard.c b/xorg/server/xrdpkeyb/rdpKeyboard.c
index 20e8a469..8c8a7c27 100644
--- a/xorg/server/xrdpkeyb/rdpKeyboard.c
+++ b/xorg/server/xrdpkeyb/rdpKeyboard.c
@@ -27,6 +27,7 @@ xrdp keyboard module
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>
diff --git a/xorg/server/xrdpmouse/Makefile b/xorg/server/xrdpmouse/Makefile
deleted file mode 100644
index 905308ad..00000000
--- a/xorg/server/xrdpmouse/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-
-OBJS = rdpMouse.o
-
-CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 \
--I../module -I../../../common
-
-LDFLAGS =
-
-LIBS =
-
-all: xrdpmouse_drv.so
-
-xrdpmouse_drv.so: $(OBJS) Makefile
- $(CC) -shared -o xrdpmouse_drv.so $(LDFLAGS) $(OBJS) $(LIBS)
-
-clean:
- rm -f $(OBJS) xrdpmouse_drv.so
diff --git a/xorg/server/xrdpmouse/Makefile.am b/xorg/server/xrdpmouse/Makefile.am
new file mode 100644
index 00000000..367342a4
--- /dev/null
+++ b/xorg/server/xrdpmouse/Makefile.am
@@ -0,0 +1,16 @@
+EXTRA_DIST =
+
+AM_CFLAGS = \
+ $(XORG_SERVER_CFLAGS) \
+ -I../module \
+ -I../../../common
+
+xrdpmouse_drv_la_LTLIBRARIES = xrdpmouse_drv.la
+
+xrdpmouse_drv_la_LDFLAGS = -module -avoid-version
+
+xrdpmouse_drv_ladir = $(moduledir)/input
+
+xrdpmouse_drv_la_SOURCES = rdpMouse.c
+
+xrdpmouse_drv_la_LIBADD =
diff --git a/xorg/server/xrdpmouse/rdpMouse.c b/xorg/server/xrdpmouse/rdpMouse.c
index 60b97945..bb70e8a7 100644
--- a/xorg/server/xrdpmouse/rdpMouse.c
+++ b/xorg/server/xrdpmouse/rdpMouse.c
@@ -27,6 +27,7 @@ xrdp mouse module
/* this should be before all X11 .h files */
#include <xorg-server.h>
+#include <xorgVersion.h>
/* all driver need this */
#include <xf86.h>