[PATCH] Fix compilation of xf86bigfont.c

Jon TURNEY jon.turney at dronecode.org.uk
Wed Jan 19 08:06:28 PST 2011


xf86bigfont.c: In function 'XFree86BigfontExtensionInit':
xf86bigfont.c:146: error: 'ProcXF86BigfontDispatch' undeclared (first use in this function)
xf86bigfont.c:147: error: 'SProcXF86BigfontDispatch' undeclared (first use in this function)

It seems this has been broken since commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e
"delete pervasively use of DISPATCH_PROC" (2010-09-28), which is a bit worrying as
that presumably indicates that no tinderbox is configuring with --enable-xf86bigfont.

In a similar fashion to that commit, fix by moving XFree86BigfontExtensionInit()
below the definitions of the static dispatch functions is references.

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 Xext/xf86bigfont.c |   89 +++++++++++++++++++++++++--------------------------
 1 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index da35287..c32c090 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -137,51 +137,6 @@ CheckForShmSyscall(void)
 
 #endif
 
-void
-XFree86BigfontExtensionInit(void)
-{
-    if (AddExtension(XF86BIGFONTNAME,
-		     XF86BigfontNumberEvents,
-		     XF86BigfontNumberErrors,
-		     ProcXF86BigfontDispatch,
-		     SProcXF86BigfontDispatch,
-		     XF86BigfontResetProc,
-		     StandardMinorOpcode)) {
-#ifdef HAS_SHM
-#ifdef MUST_CHECK_FOR_SHM_SYSCALL
-	/*
-	 * Note: Local-clients will not be optimized without shared memory
-	 * support. Remote-client optimization does not depend on shared
-	 * memory support.  Thus, the extension is still registered even
-	 * when shared memory support is not functional.  
-	 */
-	if (!CheckForShmSyscall()) {
-	    ErrorF(XF86BIGFONTNAME " extension local-client optimization disabled due to lack of shared memory support in the kernel\n");
-	    return;
-	}
-#endif
-
-	srand((unsigned int) time(NULL));
-	signature = ((unsigned int) (65536.0/(RAND_MAX+1.0) * rand()) << 16)
-	           + (unsigned int) (65536.0/(RAND_MAX+1.0) * rand());
-	/* fprintf(stderr, "signature = 0x%08X\n", signature); */
-
-	FontShmdescIndex = AllocateFontPrivateIndex();
-
-#if !defined(CSRG_BASED) && !defined(__CYGWIN__)
-	pagesize = SHMLBA;
-#else
-# ifdef _SC_PAGESIZE
-	pagesize = sysconf(_SC_PAGESIZE);
-# else
-	pagesize = getpagesize();
-# endif
-#endif
-#endif
-    }
-}
-
-
 /* ========== Management of shared memory segments ========== */
 
 #ifdef HAS_SHM
@@ -749,3 +704,47 @@ SProcXF86BigfontDispatch(
 	    return BadRequest;
     }
 }
+
+void
+XFree86BigfontExtensionInit(void)
+{
+    if (AddExtension(XF86BIGFONTNAME,
+		     XF86BigfontNumberEvents,
+		     XF86BigfontNumberErrors,
+		     ProcXF86BigfontDispatch,
+		     SProcXF86BigfontDispatch,
+		     XF86BigfontResetProc,
+		     StandardMinorOpcode)) {
+#ifdef HAS_SHM
+#ifdef MUST_CHECK_FOR_SHM_SYSCALL
+	/*
+	 * Note: Local-clients will not be optimized without shared memory
+	 * support. Remote-client optimization does not depend on shared
+	 * memory support.  Thus, the extension is still registered even
+	 * when shared memory support is not functional.  
+	 */
+	if (!CheckForShmSyscall()) {
+	    ErrorF(XF86BIGFONTNAME " extension local-client optimization disabled due to lack of shared memory support in the kernel\n");
+	    return;
+	}
+#endif
+
+	srand((unsigned int) time(NULL));
+	signature = ((unsigned int) (65536.0/(RAND_MAX+1.0) * rand()) << 16)
+	           + (unsigned int) (65536.0/(RAND_MAX+1.0) * rand());
+	/* fprintf(stderr, "signature = 0x%08X\n", signature); */
+
+	FontShmdescIndex = AllocateFontPrivateIndex();
+
+#if !defined(CSRG_BASED) && !defined(__CYGWIN__)
+	pagesize = SHMLBA;
+#else
+# ifdef _SC_PAGESIZE
+	pagesize = sysconf(_SC_PAGESIZE);
+# else
+	pagesize = getpagesize();
+# endif
+#endif
+#endif
+    }
+}
-- 
1.7.3.3



More information about the xorg-devel mailing list