Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add libXfont2 support with a compile-time switch #13

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Xext/xf86bigfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include "gcstruct.h"
#include "dixfontstr.h"
#include "extnsionst.h"
#include "xfont2_compat.h"

#define _XF86BIGFONT_SERVER_
#include <X11/extensions/xf86bigfproto.h>
Expand Down Expand Up @@ -511,7 +512,11 @@ ProcXF86BigfontQueryFont(ClientPtr client)
}
if (pDesc && !badSysCall) {
*(CARD32 *) (pCI + nCharInfos) = signature;
#ifdef XFONT2
if (!xfont2_font_set_private(pFont, FontShmdescIndex, pDesc)) {
#else
if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) {
#endif
shmdealloc(pDesc);
return BadAlloc;
}
Expand Down
14 changes: 13 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/"
AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
[ FONTPATH="$withval" ],
[ FONTPATH="${DEFAULT_FONT_PATH}" ])
AC_ARG_ENABLE(libXfont2, AS_HELP_STRING([--enable-libXfont2],
[Build with libXfont2 (default: disabled)]),
[XFONT2=$enableval], [XFONT2=no])

dnl Extensions.
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
Expand Down Expand Up @@ -319,9 +322,18 @@ XEXT_INC='-I$(top_srcdir)/Xext'
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'

AM_CONDITIONAL(DEBUG, test "x$DEBUGGING" = xyes)

if test "x$XFONT2" = xyes; then
AC_DEFINE(XFONT2, 1, [Build with libXfont2])
XFONT_LIB="xfont2"
else
XFONT_LIB="xfont"
fi

dnl Core modules for most extensions, et al.
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]"
REQUIRED_LIBS="xfont fontenc"
REQUIRED_LIBS="$XFONT_LIB fontenc"

AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes])
if test "x$SCREENSAVER" = xyes; then
Expand Down
1 change: 1 addition & 0 deletions dix/dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Equipment Corporation.
#include "dispatch.h"
#include "swaprep.h"
#include "swapreq.h"
#include "xfont2_compat.h"

#define mskcnt ((MAXCLIENTS + 31) / 32)
#define BITMASK(i) (1U << ((i) & 31))
Expand Down
Loading