[PATCH 4/4] Define ddxBeforeReset stubs in platform-neutral DDXs

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Wed Oct 14 23:53:43 PDT 2009


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

XWin uses ddxBeforeReset, which is called in DIX.  Other DDXs need to
define these in order to avoid an undefined symbol error at link time
when building alongside XWin.  Xnest and Xvfb already provide empty stubs;
this does the same for Xdmx and the platform-neutral KDrive servers.

Also add a prototype to avoid a warning in all DDXs.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 hw/dmx/dmxinit.c            |    6 ++++++
 hw/kdrive/ephyr/ephyrinit.c |    7 +++++++
 hw/kdrive/fake/fakeinit.c   |    7 +++++++
 hw/kdrive/sdl/sdl.c         |    6 ++++++
 include/os.h                |    4 ++++
 5 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index e5598e3..f481cf5 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -846,6 +846,12 @@ void AbortDDX(void)
     }
 }
 
+#ifdef DDXBEFORERESET
+void ddxBeforeReset(void)
+{
+}
+#endif
+
 /** This function is called in Xserver/dix/main.c from \a main() when
  * dispatchException & DE_TERMINATE (which is the only way to exit the
  * main loop without an interruption. */
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index eecad7e..2b72b4e 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -93,6 +93,13 @@ InitInput (int argc, char **argv)
   KdInitInput();
 }
 
+#ifdef DDXBEFORERESET
+void
+ddxBeforeReset (void)
+{
+}
+#endif
+
 void
 ddxUseMsg (void)
 {
diff --git a/hw/kdrive/fake/fakeinit.c b/hw/kdrive/fake/fakeinit.c
index 2cfcbed..0472a71 100644
--- a/hw/kdrive/fake/fakeinit.c
+++ b/hw/kdrive/fake/fakeinit.c
@@ -60,6 +60,13 @@ InitInput (int argc, char **argv)
     KdInitInput ();
 }
 
+#ifdef DDXBEFORERESET
+void
+ddxBeforeReset (void)
+{
+}
+#endif
+
 void
 ddxUseMsg (void)
 {
diff --git a/hw/kdrive/sdl/sdl.c b/hw/kdrive/sdl/sdl.c
index a83c84a..df63fd1 100644
--- a/hw/kdrive/sdl/sdl.c
+++ b/hw/kdrive/sdl/sdl.c
@@ -240,6 +240,12 @@ void InitInput(int argc, char **argv)
         KdInitInput();
 }
 
+#ifdef DDXBEFORERESET
+void ddxBeforeReset(void)
+{
+}
+#endif
+
 void ddxUseMsg(void)
 {
 	KdUseMsg();
diff --git a/include/os.h b/include/os.h
index 2f6b0c0..dad1af7 100644
--- a/include/os.h
+++ b/include/os.h
@@ -83,6 +83,10 @@ typedef struct _NewClientRec *NewClientPtr;
 #include <stdio.h>
 #include <stdarg.h>
 
+#ifdef DDXBEFORERESET
+extern void ddxBeforeReset (void);
+#endif
+
 #ifdef DDXOSVERRORF
 extern _X_EXPORT void (*OsVendorVErrorFProc)(const char *, va_list args);
 #endif
-- 
1.6.4.2



More information about the xorg-devel mailing list