aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xf86bigfont.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-03 11:20:18 +0000
committermarha <marha@users.sourceforge.net>2011-02-03 11:20:18 +0000
commit46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb (patch)
tree2ddc90cb6bc4f04db80d66a334ecaabf139c0176 /xorg-server/Xext/xf86bigfont.c
parent97f3d3043a79d6031787c246a67d2a02ff0a8d08 (diff)
parent83a4fe0dc71aafbef11477b284abe530d3877556 (diff)
downloadvcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.tar.gz
vcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.tar.bz2
vcxsrv-46fbac6f1b19416ee1dbca883f0d09d9fd75d1eb.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xext/xf86bigfont.c')
-rw-r--r--xorg-server/Xext/xf86bigfont.c89
1 files changed, 44 insertions, 45 deletions
diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c
index da3528783..de8274469 100644
--- a/xorg-server/Xext/xf86bigfont.c
+++ b/xorg-server/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
+ }
+}