From c761c6505d49e8381a3eae94f2e5e118cbdf6487 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 29 Jan 2014 12:54:26 -0800 Subject: Use font server ErrorF/VErrorF instead of private versions XTrans creates custom ErrorF/VErrorF functions when the including project doesn't provide them, however the test for that is weak and xtrans ends up using the private versions for the font server as well. This means that all xtrans error messages will not be included in the font server log. It also causes redefinition warnings when building the font server (which is how this problem was identified). However, the font server doesn't currently provide a VErrorF function, so instead of just always relying on the font server to provide these functions, this patch uses a new TRANS_HAS_ERRORF define to select whether the project-provided or internal versions will be used. A patch to the font server that adds VErrorF and defines TRANS_HAS_ERRORF will be required to fix this bug. Signed-off-by: Keith Packard --- Xtransint.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Xtransint.h b/Xtransint.h index 44d8b6d..b8f3b76 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -370,10 +370,11 @@ static int trans_mkdir ( #include /* - * The X server provides ErrorF() & VErrorF(), for other software that uses - * xtrans, we provide our own simple versions. + * The X server and the font server both provide ErrorF() & VErrorF(). For + * other software that uses xtrans, we provide our own simple + * versions. */ -# if defined(XSERV_t) && defined(TRANS_SERVER) +# if (defined(XSERV_t) || defined(TRANS_HAS_ERRORF)) && defined(TRANS_SERVER) # include "os.h" # else static inline void _X_ATTRIBUTE_PRINTF(1, 0) -- cgit v1.2.1