- moved Xvnc sources to unix/xserver/hw/vnc directory to affect current X tree
- replaced unix/xc.patch by unix/xserver.patch
- completely deleted unneded unix/xc subtree (sources are in unix/xserver/hw/vnc)


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2439 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xc.patch b/unix/xc.patch
deleted file mode 100644
index a5927b9..0000000
--- a/unix/xc.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -bcr xc.org/programs/Xserver/Imakefile xc/programs/Xserver/Imakefile
-*** xc.org/programs/Xserver/Imakefile	2004-12-15 20:22:53.000000000 +0100
---- xc/programs/Xserver/Imakefile	2005-02-14 14:23:21.000000000 +0100
-***************
-*** 128,134 ****
-         LIBREGEX = RegexLibrary
-  
-  #if DoLoadableServer
-!     LIBCWRAPPER = os/libcwrapper.o
-  #endif
-  
-  #if BuildXprint
---- 128,134 ----
-         LIBREGEX = RegexLibrary
-  
-  #if DoLoadableServer
-!     LIBCWRAPPER = os/libcwrapper.o os/libos.a
-  #endif
-  
-  #if BuildXprint
-***************
-*** 414,419 ****
---- 414,430 ----
-  #define ServerToInstall Xsun
-  #endif
-  #endif /* XsunServer */
-+ XCOMM
-+ XCOMM X VNC server
-+ XCOMM
-+ FBSUBDIR = fb
-+ XVNCDDXDIR = vnc/Xvnc
-+ XVNCDIRS = $(STDDIRS) $(FBSUBDIR) miext/damage $(XVNCDDXDIR) $(DEPDIRS)
-+ XVNCLIBS = PreFbLibs vnc/Xvnc/LibraryTargetName(xvnc) FbPostFbLibs
-+ XVNCOBJS = $(XVNCDDXDIR)/stubs.o $(XVNCDDXDIR)/miinitext.o
-+ XVNCSYSLIBS = $(FONTLIBS) $(SYSLIBS)
-+ ServerTarget(Xvnc,$(XVNCDIRS),$(XVNCOBJS), \
-+ 	$(LIBCWRAPPER) $(XVNCLIBS) $(LOADABLEEXTS),$(XVNCSYSLIBS))
-  
-  
-  #if defined(Xsun24Server) && Xsun24Server
-diff -bcr xc.org/programs/Xserver/mi/miinitext.c xc/programs/Xserver/mi/miinitext.c
-*** xc.org/programs/Xserver/mi/miinitext.c	2004-12-13 06:48:41.000000000 +0100
---- xc/programs/Xserver/mi/miinitext.c	2005-02-11 16:47:34.000000000 +0100
-***************
-*** 286,291 ****
---- 286,294 ----
-  #ifdef MITMISC
-  extern void MITMiscExtensionInit(INITARGS);
-  #endif
-+ #ifdef VNCEXT
-+ extern void vncExtensionInit(INITARGS);
-+ #endif
-  #ifdef XIDLE
-  extern void XIdleExtensionInit(INITARGS);
-  #endif
-***************
-*** 587,592 ****
---- 590,598 ----
-  #ifdef MITMISC
-      if (!noMITMiscExtension) MITMiscExtensionInit();
-  #endif
-+ #ifdef VNCEXT
-+     vncExtensionInit();
-+ #endif
-  #ifdef XIDLE
-      if (!noXIdleExtension) XIdleExtensionInit();
-  #endif
diff --git a/unix/xc/config/cf/host.def b/unix/xc/config/cf/host.def
deleted file mode 100644
index 2de89af..0000000
--- a/unix/xc/config/cf/host.def
+++ /dev/null
@@ -1 +0,0 @@
-#include <vnc.def>
diff --git a/unix/xc/config/cf/vnc.def b/unix/xc/config/cf/vnc.def
deleted file mode 100644
index b7660a5..0000000
--- a/unix/xc/config/cf/vnc.def
+++ /dev/null
@@ -1,38 +0,0 @@
-#define BuildServersOnly YES
-#define BuildFonts NO
-#define BuildClients NO
-#define BuildDocs NO
-#define BuildPexExt NO
-#define BuildNls NO
-#define BuildXIE NO
-#define BuildGlxExt YES
-#define GlxBuiltInXMesa YES
-#define XnestServer YES
-#define XF86Server NO
-#define XprtServer NO
-#define BuildXFree86ConfigTools NO
-
-#ifdef SunArchitecture
-#define ProjectRoot /usr/openwin
-#define HasGcc3 YES
-#endif
-
-#define HasFreetype2 NO
-#define BuildVNCExt YES
-#define VNCExtDefines -DVNCEXT
-#define SiteExtensionDefines VNCExtDefines
-#define SiteExtensionDirs vnc
-
-#define VncUnixDir $(TOP)/..
-#define VncCommonDir VncUnixDir/../common
-#define VncExtLibs VncCommonDir/rfb/librfb.a \
-                   VncCommonDir/Xregion/libXregion.a \
-                   VncCommonDir/network/libnetwork.a \
-                   VncCommonDir/rdr/librdr.a \
-                   VncCommonDir/jpeg/build/libjpeg.a
-
-#define SiteExtensionLibs vnc/LibraryTargetName(vnc) VncExtLibs
-
-#define	ServerTarget(server,subdirs,objects,libs,syslibs)		@@\
-CCLINK = $(CXXENVSETUP) $(CXX) @@\
-ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_))
diff --git a/unix/xc/programs/Xserver/vnc/Imakefile b/unix/xc/programs/Xserver/vnc/Imakefile
deleted file mode 100644
index d260759..0000000
--- a/unix/xc/programs/Xserver/vnc/Imakefile
+++ /dev/null
@@ -1,45 +0,0 @@
-XCOMM CDEBUGFLAGS = -g
-XCOMM CXXDEBUGFLAGS = -g
-
-   VNCUNIXDIR = VncUnixDir
- VNCCOMMONDIR = VncCommonDir
-   VNCINCLUDE = -I$(VNCCOMMONDIR) -I$(VNCUNIXDIR)/vncconfig
-
-#define CplusplusSource
-
-#if DoLoadableServer
-#define IHaveSubdirs
-#endif
-
-#include <Server.tmpl>
-
-#if DoLoadableServer
-       MODULE_SUBDIRS = module
-#endif
-         SRCS = vncExtInit.cc vncHooks.cc XserverDesktop.cc
-         OBJS = vncExtInit.o vncHooks.o XserverDesktop.o
-     INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(FONTINCSRC) \
-                -I../render $(VNCINCLUDE)
-#if defined(XFree86Version) && XFree86Version >= 4000
-   VNCDEFINES = -DGC_HAS_COMPOSITE_CLIP
-#endif
-#if defined(ProjectX) && (ProjectX >= 604)
-   VNCDEFINES = -DGC_HAS_COMPOSITE_CLIP
-#endif
-      DEFINES = $(STD_DEFINES) $(VNCDEFINES) -UXFree86LOADER
-
-#define IHaveSubdirs
-SUBDIRS = Xvnc $(MODULE_SUBDIRS)
-
-NormalLibraryTarget(vnc,$(OBJS))
-LintLibraryTarget(vnc,$(SRCS))
-NormalLintTarget($(SRCS))
-
-NormalLibraryObjectRule()
-NormalCplusplusObjectRule()
-
-
-MakeSubdirs($(SUBDIRS))
-DependSubdirs($(SUBDIRS))
-
-DependTarget()
diff --git a/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile b/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile
deleted file mode 100644
index 57db671..0000000
--- a/unix/xc/programs/Xserver/vnc/Xvnc/Imakefile
+++ /dev/null
@@ -1,95 +0,0 @@
-
- VNCCOMMONDIR = VncCommonDir
-   VNCINCLUDE = -I$(VNCCOMMONDIR)
-      VNCLIBS = VncExtLibs
-
-#if defined(XFree86Version) && XFree86Version < 4000
-   VNCDEFINES = -DNO_INIT_BACKING_STORE
-#endif
-
-#define CplusplusSource
-
-#include <Server.tmpl>
-
-#if HasShm
-SHMDEF = -DHAS_SHM
-#endif
-
-XCOMM add more architectures here as we discover them
-#if defined(HPArchitecture) || \
-    (defined(SparcArchitecture) && !defined(LynxOSArchitecture)) || \
-    SystemV4 || \
-    defined(OSF1Architecture) || \
-    defined(i386BsdArchitecture) || \
-    defined(LinuxArchitecture) || \
-    defined(DarwinArchitecture)
-MMAPDEF = -DHAS_MMAP
-#endif
-
-#ifdef XVendorString
-VENDORSTRING = XVendorString
-#else
-VENDORSTRING = "unknown"
-#endif
-
-#ifdef XVendorRelease
-VENDORRELEASE = XVendorRelease
-#else
-VENDORRELEASE = 0
-#endif
-
-   VENDOR_STRING = -DVENDOR_STRING=\"$(VENDORSTRING)\"
-   VENDOR_RELEASE = -DVENDOR_RELEASE="$(VENDORRELEASE)"
-
-#ifdef OS2Architecture
-SRCS1 = os2_stubs.c
-OBJS1 = os2_stubs.o
-#endif
-
-FBINCLUDE = -I../../fb
-
-SRCSA =	xvnc.cc stubs.c $(SRCS1) miinitext.c $(SRCS2)
-
-OBJSA =	xvnc.o stubs.o $(OBJS1) miinitext.o $(OBJS2)
-
-INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
-           $(FBINCLUDE) -I../../mfb -I../../mi -I../../include -I../../os  \
-           -I$(EXTINCSRC) -I$(XINCLUDESRC)  -I$(SERVERSRC)/render $(VNCINCLUDE)
-
-DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) $(FB_DEFINES) \
-          $(VENDOR_STRING) $(VENDOR_RELEASE) $(STD_DEFINES) ServerOSDefines \
-          $(VNCDEFINES) -UXFree86LOADER
-
-#if defined(XFree86Version) || defined(XorgVersion)
-/* 
- * Make sure XINPUT, XF86VidTune, etc arent defined for the miinitext.o 
- * used by Xvnc 
- */
-EXT_DEFINES = ExtensionDefines -UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI
-#endif
-
-
-SRCS =	$(SRCSA) $(SRCSB) $(SRCSC)
-OBJS =	$(OBJSA) $(OBJSB) $(OBJSC)
-
-NormalLibraryObjectRule()
-NormalLibraryTarget(xvnc,$(OBJS) buildtime.o)
-
-#ifdef OS2Architecture
-LinkSourceFile(os2_stubs.c,../xfree86/os-support/os2)
-SpecialCObjectRule(os2_stubs,$(ICONFIGFILES),-DOS2NULLSELECT)
-#endif
-
-#ifdef HasGcc
-NO_OPERATOR_NAMES = -fno-operator-names
-#endif
-LinkSourceFile(stubs.c,../../Xi)
-SpecialCplusplusObjectRule(xvnc,$(ICONFIGFILES) xvnc,$(EXT_DEFINES) $(NO_OPERATOR_NAMES))
-
-LinkSourceFile(miinitext.c,$(SERVERSRC)/mi)
-SpecialCObjectRule(miinitext,$(ICONFIGFILES),$(EXT_DEFINES) $(PAN_DEFINES) -DNO_MODULE_EXTS $(EXT_MODULE_DEFINES) -UXFree86LOADER)
-
-/* InstallManPage(Xvfb,$(MANDIR)) */
-DependTarget()
-
-buildtime.o: $(OBJS) ../LibraryTargetName(vnc) $(VNCLIBS)
diff --git a/unix/xc/programs/Xserver/vnc/module/Imakefile b/unix/xc/programs/Xserver/vnc/module/Imakefile
deleted file mode 100644
index d2d34ed..0000000
--- a/unix/xc/programs/Xserver/vnc/module/Imakefile
+++ /dev/null
@@ -1,61 +0,0 @@
-
-   VNCUNIXDIR = VncUnixDir
- VNCCOMMONDIR = VncCommonDir
-      VNCLIBS = VncExtLibs
-   VNCINCLUDE = -I$(VNCCOMMONDIR) -I$(VNCUNIXDIR)/vncconfig
-
-#define CplusplusSource
-
-#define IHaveModules
-#include <Server.tmpl>
-
-    SRCS = vncExtInit.cc vncHooks.cc xf86vncModule.cc XserverDesktop.cc
-    OBJS = vncExtInit.o vncHooks.o xf86vncModule.o XserverDesktop.o
-INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) \
-           -I$(FONTINCSRC) -I$(XF86COMSRC) \
-           -I../../render $(VNCINCLUDE)
- DEFINES = $(STD_DEFINES) -DGC_HAS_COMPOSITE_CLIP -DXFree86LOADER
-
-LinkSourceFile(vncExtInit.cc,..)
-LinkSourceFile(vncHooks.cc,..)
-LinkSourceFile(xf86vncModule.cc,..)
-LinkSourceFile(XserverDesktop.cc,..)
-
-ModuleObjectRule()
-/*
- LibraryModuleTarget(vnc,$(OBJS) $(VNCLIBS))
- InstallLibraryModule(vnc,$(MODULEDIR),extensions)
-*/
-
-/* *** The imake rules don't define a ModuleCplusplusObjectRule so
-       for now we just assume that NormalCplusplusObjectRule will
-       do the job.
-   NB: If we don't do this then make will assume CC is the C++ compiler!
-*/
-NormalCplusplusObjectRule()
-
-/*
- * CplusplusDynamicModuleTarget - build a module to be dynamically loaded
- */
-#ifndef CplusplusDynamicModuleTarget
-#define CplusplusDynamicModuleTarget(module,modlist)			@@\
-AllTarget(module)							@@\
-									@@\
-module: modlist								@@\
-	RemoveFile($@)							@@\
-	$(CXX) -o $@ $(SHLIBLDFLAGS) modlist				@@\
-									@@\
-clean::									@@\
-	RemoveFile(module)
-#endif /* CplusplusDynamicModuleTarget */
-
-
-
-CplusplusDynamicModuleTarget(vnc.so,$(OBJS) $(VNCLIBS))
-InstallDynamicModule(vnc.so,$(MODULEDIR),extensions)
-
-DependTarget()
-
-/*
- InstallDriverSDKLibraryModule(vnc,$(DRIVERSDKMODULEDIR),extensions)
-*/
diff --git a/unix/xserver.patch b/unix/xserver.patch
new file mode 100644
index 0000000..fb90c56
--- /dev/null
+++ b/unix/xserver.patch
@@ -0,0 +1,68 @@
+diff -up os/WaitFor.c.orig xorg/os/WaitFor.c
+--- os/WaitFor.c.orig	2008-01-28 10:20:35.000000000 +0100
++++ os/WaitFor.c	2008-01-28 10:21:08.000000000 +0100
+@@ -332,13 +332,11 @@ WaitForSomething(int *pClientsReady)
+ 
+ 	    if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
+ 		break;
+-#ifdef WIN32
+ 	    /* Windows keyboard and mouse events are added to the input queue
+ 	       in Block- and WakupHandlers. There is no device to check if  
+ 	       data is ready. So check here if new input is available */
+ 	    if (*checkForInput[0] != *checkForInput[1])
+ 		return 0;
+-#endif
+ 	}
+     }
+ 
+diff -up mi/miinitext.c.orig xorg/mi/miinitext.c
+--- mi/miinitext.c.orig	2008-01-28 10:18:46.000000000 +0100
++++ mi/miinitext.c	2008-01-28 10:18:58.000000000 +0100
+@@ -289,6 +289,7 @@ extern void BigReqExtensionInit(INITARGS
+ #ifdef MITMISC
+ extern void MITMiscExtensionInit(INITARGS);
+ #endif
++extern void vncExtensionInit(INITARGS);
+ #ifdef XIDLE
+ extern void XIdleExtensionInit(INITARGS);
+ #endif
+@@ -560,6 +561,7 @@ InitExtensions(argc, argv)
+ #ifdef MITMISC
+     if (!noMITMiscExtension) MITMiscExtensionInit();
+ #endif
++    vncExtensionInit();
+ #ifdef XIDLE
+     if (!noXIdleExtension) XIdleExtensionInit();
+ #endif
+diff -up hw/Makefile.am.orig xorg/hw/Makefile.am
+--- hw/Makefile.am.orig	2008-01-28 10:18:46.000000000 +0100
++++ hw/Makefile.am	2008-01-28 10:18:58.000000000 +0100
+@@ -43,7 +43,8 @@ SUBDIRS =			\
+ 	$(DMX_SUBDIRS)		\
+ 	$(KDRIVE_SUBDIRS)	\
+ 	$(XQUARTZ_SUBDIRS)	\
+-	$(XPRINT_SUBDIRS)
++	$(XPRINT_SUBDIRS)	\
++	vnc
+ 
+ DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint
+ 
+diff -up configure.ac.orig xorg/configure.ac
+--- configure.ac.orig	2008-01-28 10:18:45.000000000 +0100
++++ configure.ac	2008-01-28 10:18:58.000000000 +0100
+@@ -29,7 +29,6 @@ AC_PREREQ(2.57)
+ AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AM_INIT_AUTOMAKE([dist-bzip2 foreign])
+-AM_MAINTAINER_MODE
+ 
+ dnl this gets generated by autoheader, and thus contains all the defines.  we
+ dnl don't ever actually use it, internally.
+@@ -2173,6 +2172,7 @@ hw/dmx/input/Makefile
+ hw/dmx/glxProxy/Makefile
+ hw/dmx/Makefile
+ hw/vfb/Makefile
++hw/vnc/Makefile
+ hw/xgl/Makefile
+ hw/xgl/egl/Makefile
+ hw/xgl/egl/module/Makefile
diff --git a/unix/xc/programs/Xserver/vnc/RegionHelper.h b/unix/xserver/hw/vnc/RegionHelper.h
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/RegionHelper.h
rename to unix/xserver/hw/vnc/RegionHelper.h
diff --git a/unix/xc/programs/Xserver/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/XserverDesktop.cc
rename to unix/xserver/hw/vnc/XserverDesktop.cc
diff --git a/unix/xc/programs/Xserver/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/XserverDesktop.h
rename to unix/xserver/hw/vnc/XserverDesktop.h
diff --git a/unix/xc/programs/Xserver/Xvnc.man b/unix/xserver/hw/vnc/Xvnc.man
similarity index 100%
rename from unix/xc/programs/Xserver/Xvnc.man
rename to unix/xserver/hw/vnc/Xvnc.man
diff --git a/unix/xc/programs/Xserver/vnc/Xvnc/buildtime.c b/unix/xserver/hw/vnc/buildtime.c
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/Xvnc/buildtime.c
rename to unix/xserver/hw/vnc/buildtime.c
diff --git a/unix/xc/programs/Xserver/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/vncExtInit.cc
rename to unix/xserver/hw/vnc/vncExtInit.cc
diff --git a/unix/xc/programs/Xserver/vnc/vncExtInit.h b/unix/xserver/hw/vnc/vncExtInit.h
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/vncExtInit.h
rename to unix/xserver/hw/vnc/vncExtInit.h
diff --git a/unix/xc/programs/Xserver/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/vncHooks.cc
rename to unix/xserver/hw/vnc/vncHooks.cc
diff --git a/unix/xc/programs/Xserver/vnc/vncHooks.h b/unix/xserver/hw/vnc/vncHooks.h
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/vncHooks.h
rename to unix/xserver/hw/vnc/vncHooks.h
diff --git a/unix/xc/programs/Xserver/vnc/xf86vncModule.cc b/unix/xserver/hw/vnc/xf86vncModule.cc
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/xf86vncModule.cc
rename to unix/xserver/hw/vnc/xf86vncModule.cc
diff --git a/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
similarity index 100%
rename from unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
rename to unix/xserver/hw/vnc/xvnc.cc