Age | Commit message (Collapse) | Author |
|
This eliminates the weak symbol adventures and makes all of the calls
back to the X server or Font server go through a table of functions
instead, clarifying the required API.
As this is a rather major change to the API for the library, it now
installs itself as libXfont2 instead of libXfont, and the package
config file is now xfont2.pc.
All of the installed headers remain the same as the original library;
there's now a new include file, libxfont2.h, which defines the X
server and Font server interfaces.
This moves util/atom.c to stubs/atom.c and reformats that file, hence
the diff being larger than it would otherwise be.
v2: Rename to libXfont2 instead of libXfont_2 as suggested by Emil Velikov
Fix whitespace in stubs/atom.c, which was moved from util/
v3: Remove select masks from API. Expose single 'font_init' function
for all library initialization.
v4: Change name of distributed tarballs to libXfont2 as well
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Weak symbols on PE platforms do not work the same way as on ELF
platforms, hence we have been unable to have a fully functional shared
libXfont until now. This patch works around these issues so that we
can fix that.
In summary, only when compiling shared libraries on NO_WEAK_SYMBOLS
platforms, when the first stub is called, the invoking program is first
checked to determine if it exports the stubbed functions. Then, for
every stub call, if the function is exported by the loader, it is called
instead of the stub code.
serverClient and serverGeneration are data pointers, and therefore are
replaced by getter functions. ErrorF is variadic, so the override is
routed through VErrorF instead. FatalError has no va_list equivalent,
but it is not actually used in libXfont and therefore should be safe to
remove.
This requires all X servers to export their symbols, which requires
forthcoming patches for hw/xwin and xfs; the other xservers (including
tigervnc) already do this via LD_EXPORT_SYMBOLS_FLAG.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Makes the definition match other declarations, and xserver's definition.
Debian bug#689439
Reported-by: Michael Tautschnig <mt@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Since we fix this by removing the serverGeneration symbol, assuming
an external definition will be provided, this means on Windows libXfont
can only be built as a static library (since PE shared libraries cannot
contain undefined symbols). This produces a libXfont which might only
be useful to the xserver, but the only other users we might care about
are xfs, which is obsolete, and bdftopcf, which fortunately doesn't
pull in any objects which reference serverGeneration from libXfont.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
|
|
X server doesn't need to understand fpe internals, so let it transparent
turning all registration functions in a single one. For that, fill the already
existent register_fpe_functions().
Some X servers don't want font server support, so this patch also sets font
server support to be configured in build time.
In my machine, I see 20kB of RSS being saved in libXfont mapped in Xorg
process when I disabled font server support and other kind of fonts in the
library (--disable-pcfformat --disable-bdfformat --disable-snfformat
--disable-freetype --disable-fc).
The default library built was taking:
text data bss dec hex filename
261847 4484 1536 267867 4165b ./lib/libXfont.so
and with these flags, it jumps to:
text data bss dec hex filename
157764 2428 1188 161380 27664 ./lib/libXfont.so
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
|
|
|
|
|
|
|
|
as weak symbols so that the linker will prefer the server's definition
when present.
|
|
found when building in the modular tree
|
|
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
source files in the xserver/xorg tree, predicated on defines of
HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
<X11/fonts/foo.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|